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>

  • 相关阅读:
    Openresty+redis实现灰度发布
    Nginx keepalived
    Nginx反向代理、负载均衡、动静分离、缓存、压缩、防盗链、跨域访问
    MYCAT扩容
    MYCAT全局序列
    MYCAT分库分表
    MySQL主从复制
    [redis] linux下集群篇(4) docker部署
    [nginx] CORS配置多域名
    [mysql] 归档工具pt-archiver,binlog格式由mixed变成row
  • 原文地址:https://www.cnblogs.com/beens/p/5420102.html
Copyright © 2011-2022 走看看