自Android4.0版本后新增的GirdLayout网格布局(API 14)

<?xml version="1.0" encoding="utf-8"?>
<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"> <Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="C"
android:id="@+id/button13"
android:layout_row="0"
android:layout_column="0" /> <Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="DEL"
android:id="@+id/button14"
android:layout_row="0"
android:layout_column="1" /> <Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="/"
android:id="@+id/button15"
android:layout_row="0"
android:layout_column="2" /> <Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="X"
android:id="@+id/button16"
android:layout_row="0"
android:layout_column="3" /> <Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="7"
android:id="@+id/button9"
android:layout_row="1"
android:layout_column="0" /> <Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="8"
android:id="@+id/button10"
android:layout_row="1"
android:layout_column="1" /> <Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="9"
android:id="@+id/button11"
android:layout_row="1"
android:layout_column="2" /> <Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="-"
android:id="@+id/button12"
android:layout_row="1"
android:layout_column="3" /> <Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="4"
android:id="@+id/button17"
android:layout_row="2"
android:layout_column="0" /> <Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="5"
android:id="@+id/button18"
android:layout_row="2"
android:layout_column="1" /> <Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="6"
android:id="@+id/button19"
android:layout_row="2"
android:layout_column="2" /> <Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/button20"
android:layout_row="2"
android:layout_column="3"
android:text="+" /> <Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="1"
android:id="@+id/button21"
android:layout_row="3"
android:layout_column="0" /> <Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="2"
android:id="@+id/button22"
android:layout_row="3"
android:layout_column="1" /> <Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="3"
android:id="@+id/button23"
android:layout_row="3"
android:layout_column="2" /> <Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="="
android:layout_gravity="fill"
android:id="@+id/button26"
android:layout_row="3"
android:layout_column="3"
android:layout_rowSpan="2" /> <Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="0"
android:id="@+id/button24"
android:layout_gravity="fill"
android:layout_row="4"
android:layout_column="0"
android:layout_columnSpan="2" /> <Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="."
android:id="@+id/button25"
android:layout_row="4"
android:layout_column="2" /> </GridLayout>

Android布局_网格布局GirdLayout的更多相关文章

  1. 鸿蒙的js开发部模式16:鸿蒙布局Grid网格布局的应用一

    鸿蒙入门指南,小白速来!从萌新到高手,怎样快速掌握鸿蒙开发?[课程入口]目录:1.Grid简介2.使用Grid布局实现的效果3.grid-row-gap和grid-colunm-gap属性4.< ...

  2. android——学习:网格布局——GridLayout

    Android一开始就提供了几种布局控件,如线性布局LinearLayout.相对布局RelativeLayout和表格布局TableLayout等,但在很多情况下,这些布局控件是不能满足要求的,因此 ...

  3. android的布局-----GridLayout(网格布局)

    学习导图 (一)简介 网格布局由GridLayout所代表,在android4.0之后新增加的布局管理器,因此需要android4.0之后的版本中使用,如果在更早的平台使用该布局管理器,则需要导入相应 ...

  4. Android之GridLayout网格布局

    1.相关属性 GridLayout网格布局是4.0之后引入的布局方式! android:columnCount="4" //设置列数(4列) android:rowCount=&q ...

  5. 控件布局_FrameLayout(网格布局)

    <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools=&qu ...

  6. css布局 弹性布局 和 网格布局

    这里就不写这两种布局的内容了 弹性布局链接:http://www.ruanyifeng.com/blog/2015/07/flex-grammar.html 网格布局链接:https://www.ji ...

  7. CSS3_伸缩盒模型_弹性布局_等分布局_flex 布局

    伸缩盒模型 CSS3 引入的布局模式 Flexbox 布局 主要思想: 让容器有能力让其子项目能够改变其宽度,高度,以最佳方式填充可用空间. 特点: display: flex;    只能控制其子元 ...

  8. Android布局_表格布局TableLayout

    一.TableLayout概述 TableLayout表格布局模型以行列的形式管理子控件,每一行为一个TableRow的对象,当然也可以是一个View的对象 二.TableLayout的全局属性  1 ...

  9. Android布局_帧布局FrameLayout

    一.FrameLayout布局概述 在这个布局中,所有的子元素都不能被指定放置的位置,他们统统放于这块区域的左上角,并且后面的子元素直接覆盖在前面的子元素之上,将前面的子元素部分和全部遮挡  如下面的 ...

随机推荐

  1. 发现数据库错误模式(AppScan扫描结果)

    最近工作要求解决下web的项目的漏洞问题,扫描漏洞是用的AppScan工具,其中此篇文章是关于发现数据库错误模式问题的.下面就把这块东西分享出来. 原创文章,转载请注明 --------------- ...

  2. Linux内存模型

    http://blog.csdn.net/sunyubo458/article/details/6090946 了解linux的内存模型,或许不能让你大幅度提高编程能力,但是作为一个基本知识点应该熟悉 ...

  3. vilte/vowifi

    vendor/mediatek/proprietary/packages/services/Ims/src/com/mediatek/ims/ImsService.java ¦ ¦ ¦ ¦ ¦ ¦ v ...

  4. ssh 配置自动登录

    假定 机器A 连接至 机器B . 1. 在机器A上,生成RSA秘钥对 ssh-keygen -t rsa 期间passphrase不输入密码.默认生成文件至 ~/.ssh/ -rw------- we ...

  5. 解决保存快照失败后redis无法写入的问题

    用命令行工具连上后执行“set test 0”出现以下错误提示: MISCONF Redis is configured to save RDB snapshots, but is currently ...

  6. Intent官方教程(1)简介和作用

    Intents An Intent is a messaging object you can use to request an action from another app component. ...

  7. log4j.properties详解与例子

    在项目中的classes 中新建立一个log4j.properties文件即可: 在实际编程时,要使Log4j真正在系统中运行事先还要对配置文件进行定义.定义步骤就是对Logger.Appender及 ...

  8. 在vs中怎样一次性的添加一个文件夹到解决方案里

    这个方法通常用到编译源码库方面,在这里我以编译静态库为例: 1.首先建立自己的工程Mytest 第二步 选择静态库 点击finish 完成工程的建立 第三步 点击PROJECT菜单项 选中Show A ...

  9. thinkphp nginx 配置

    thinkphp convention配置:'URL_MODEL' => '2', //URL模式 nginx rewrite配置: if (!-e $request_filename) { r ...

  10. Threads in Spring

    使用Spring时经常会问,我们定义的Bean应该是Singleton还是Prototype?多个客户端同时调用Dao层,需要考虑线程安全吗?通过阅读官方文档和Spring的源代码,这类问题的答案是: ...