zoukankan      html  css  js  c++  java
  • 网格布局(GridLayout)计算器界面

    <?xml version="1.0" encoding="utf-8"?>
    <GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:rowCount="6"
        android:columnCount="4">
        <TextView
            android:layout_width="match_parent"
            android:layout_height="200dp"
            android:layout_columnSpan="4"
            android:hint="0"
            android:gravity="bottom|right"/>
        <Button
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:text="C"
            android:layout_columnWeight="1"
            android:layout_rowWeight="1"/>
        <Button
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:text="DEL"
            android:layout_columnWeight="1"
            android:layout_rowWeight="1"/>
        <Button
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:text="/"
            android:layout_columnWeight="1"
            android:layout_rowWeight="1"/>
        <Button
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:text="X"
            android:layout_columnWeight="1"
            android:layout_rowWeight="1"/>
        <Button
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:text="7"
            android:layout_columnWeight="1"
            android:layout_rowWeight="1"/>
        <Button
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:text="8"
            android:layout_columnWeight="1"
            android:layout_rowWeight="1"/>
        <Button
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:text="9"
            android:layout_columnWeight="1"
            android:layout_rowWeight="1"/>
        <Button
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:text="-"
            android:layout_columnWeight="1"
            android:layout_rowWeight="1"/>
        <Button
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:text="4"
            android:layout_columnWeight="1"
            android:layout_rowWeight="1"/>
        <Button
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:text="5"
            android:layout_columnWeight="1"
            android:layout_rowWeight="1"/>
        <Button
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:text="6"
            android:layout_columnWeight="1"
            android:layout_rowWeight="1"/>
        <Button
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:text="+"
            android:layout_columnWeight="1"
            android:layout_rowWeight="1"/>
        <Button
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:text="1"
            android:layout_columnWeight="1"
            android:layout_rowWeight="1"/>
        <Button
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:text="2"
            android:layout_columnWeight="1"
            android:layout_rowWeight="1"/>
        <Button
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:text="3"
            android:layout_columnWeight="1"
            android:layout_rowWeight="1"/>
        <Button
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:text="="
            android:layout_columnWeight="1"
            android:layout_rowSpan="2"
            android:layout_rowWeight="1"/>
        <Button
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:text="0"
            android:layout_columnWeight="1"
            android:layout_columnSpan="2"
            android:layout_rowWeight="1"/>
        <Button
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:text="."
            android:layout_columnWeight="1"
            android:layout_rowWeight="1"/>
    
    </GridLayout>

  • 相关阅读:
    《Perceptual Losses for Real-Time Style Transfer and Super-Resolution》论文笔记
    《StackGAN: Text to Photo-realistic Image Synthesis with Stacked GAN》论文笔记
    《Image-to-Image Translation with Conditional Adversarial Networks》论文笔记
    深度学习模型相关知识(2)
    深度学习模型相关知识(1)
    常用深度学习模型介绍(2)
    1111111111111111111
    常用深度学习模型介绍(1)
    tensorflow函数介绍 (5)
    tensorboard可视化(先写一点点)
  • 原文地址:https://www.cnblogs.com/beens/p/5420102.html
Copyright © 2011-2022 走看看