zoukankan      html  css  js  c++  java
  • 网格布局

    <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="0dp"
        android:layout_columnSpan="4"
        android:layout_rowWeight="15"
        android:hint="0"
        android:gravity="bottom|right"
        android:textSize="30dp"
    
        />
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_rowWeight="1"
            android:layout_columnWeight="1"
            android:text="C"
            android:textSize="30dp"/>
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_rowWeight="1"
            android:layout_columnWeight="1"
            android:text="◀"
            android:textSize="30dp"/>
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_rowWeight="1"
            android:layout_columnWeight="1"
            android:text="÷"
            android:textSize="30dp"/>
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_rowWeight="1"
            android:layout_columnWeight="1"
            android:text="×"
            android:textSize="30dp"/>
    
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_rowWeight="1"
            android:layout_columnWeight="1"
            android:text="1"
            android:textSize="30dp"/>
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_rowWeight="1"
            android:layout_columnWeight="1"
            android:text="2"
            android:textSize="30dp"/>
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_rowWeight="1"
            android:layout_columnWeight="1"
            android:text="3"
            android:textSize="30dp"/>
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_rowWeight="1"
            android:layout_columnWeight="1"
            android:text="-"
            android:textSize="30dp"/>
    
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_rowWeight="1"
            android:layout_columnWeight="1"
            android:text="4"
            android:textSize="30dp"
            />
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_rowWeight="1"
            android:layout_columnWeight="1"
            android:text="5"
            android:textSize="30dp"/>
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_rowWeight="1"
            android:layout_columnWeight="1"
            android:text="6"
            android:textSize="30dp"/>
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_rowWeight="1"
            android:layout_columnWeight="1"
            android:text="+"
            android:textSize="30dp"/>
    
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_rowWeight="1"
            android:layout_columnWeight="1"
            android:text="7"
            android:textSize="30dp"/>
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_rowWeight="1"
            android:layout_columnWeight="1"
            android:text="8"
            android:textSize="30dp"/>
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_rowWeight="1"
            android:layout_columnWeight="1"
            android:text="9"
            android:textSize="30dp"/>
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_rowWeight="1"
            android:layout_columnWeight="1"
            android:layout_rowSpan="2"
            android:text="="
            android:textSize="30dp"/>
    
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_rowWeight="1"
            android:layout_columnWeight="1"
            android:layout_columnSpan="2"
            android:text="0"
            android:textSize="30dp"/>
    
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_rowWeight="1"
            android:layout_columnWeight="1"
            android:text="."
            android:textSize="30dp"/>
    
    
    
    </GridLayout>

  • 相关阅读:
    The difference between applicationContext.xml in Spring and xxx-servlet.xml in SpringMVC
    01Java代码是怎么运行的
    Qt5.7不能加载MySql驱动问题(需要重新编译驱动)
    大前端工具介绍
    ARTS 第 1 周
    【标题】行动派
    Matlib’s lsqnonlin 和 scipy.optimize’s least_square
    每日背单词
    AngularJS入门篇
    吴裕雄 Bootstrap 前端框架开发——Bootstrap 字体图标(Glyphicons):glyphicon glyphicon-adjust
  • 原文地址:https://www.cnblogs.com/storm47/p/5419867.html
Copyright © 2011-2022 走看看