自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. XPath 元素及属性查找

    实例 1 基本的XPath语法类似于在一个文件系统中定位文件,如果路径以斜线 / 开始, 那么该路径就表示到一个元素的绝对路径 /AAA 选择根元素AAA       <AAA>      ...

  2. Channel Allocation

    Channel Allocation Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 13231 Accepted: 6774 D ...

  3. asp.net学习资料,mvc学习资料

    http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/adding-validation-to-the-model

  4. JS中的call()和apply()方法和bind()

    1.方法定义 call方法: 语法:call([thisObj[,arg1[, arg2[,   [,.argN]]]]]) 定义:调用一个对象的一个方法,以另一个对象替换当前对象. 说明: call ...

  5. Codeforces Round #372 (Div. 2) C

    Description ZS the Coder is playing a game. There is a number displayed on the screen and there are ...

  6. 《redis-php中文参考手册》

    <redis中文手册>,将示例代码用php来实现,注意php-redis与redis_cli的区别(主要是返回值类型和参数用法). phpredis是redis的php的一个扩展,效率是相 ...

  7. shell中sed用法

    简介 sed 是一种在线编辑器,它一次处理一行内容.处理时,把当前处理的行存储在临时缓冲区中,称为“模式空间”(pattern space),接着用sed命令处理缓冲区中的内容,处理完成后,把缓冲区的 ...

  8. 电脑能上网,手机连上wifi不能上网

    电脑能上网,手机连上wifi不能上网  ,其实只要把手机的dhcp 改为我们熟悉的就行了 我此处就设置为114.114.114.114

  9. http_load的安装及使用方法

    http_load 程序非常小,解压后也不到100K http_load以并行复用的方式运行,用以测试web服务器的吞吐量与负载.但是它不同于大多数压力测试工 具,它可以以一个单一的进程运行,一般不会 ...

  10. 各种编码中汉字所占字节数;中文字符集编码Unicode ,gb2312 , cp936 ,GBK,GB18030

    vim settings set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936,latin1set termencoding=utf-8se ...