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>

  • 相关阅读:
    Spring AOP实现方式一【附源码】
    Java-Swing嵌入浏览器(二)
    Java-Swing嵌入浏览器(一)
    JAVA实现word doc docx pdf excel的在线浏览
    湿空气性质计算,随笔与学习记录(合订)
    湿空气性质计算,随笔与学习记录 (5.空气比焓)
    湿空气性质计算,随笔与学习记录 (4.空气比容,空气密度)
    湿空气性质计算,随笔与学习记录 (3.露点温度,绝对湿度)
    湿空气性质计算,随笔与学习记录(2.水蒸气分压,含湿量,相对湿度)
    湿空气性质计算,随笔与学习记录(1.饱和水蒸气压力计算)
  • 原文地址:https://www.cnblogs.com/beens/p/5420102.html
Copyright © 2011-2022 走看看