自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. java poi Excel导入 整数浮点数转换问题解决

    /**     * 获取单元格数据     */    protected static String getCellValue(Cell cell) {        String cellValu ...

  2. Ajax案例:三级联动查询员工的信息(三张表进行内连接)

    需求分析: 通过数据库连接池,可以查询到数据库中员工的各种信息,通过点击下拉框的方式实现三级联动,即:没有点击city下拉框,后面两个下拉框中没有值,这样,点击city下拉框,department下拉 ...

  3. Emag eht htiw Em Pleh 分类: POJ 2015-06-29 18:54 10人阅读 评论(0) 收藏

    Emag eht htiw Em Pleh Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 2937   Accepted: ...

  4. SSH配置私钥登陆服务器

    前言 本文基于实际Linux管理工作,实例讲解工作中使用ssh证书登录的实际流程,讲解ssh证书登录的配置原理,基于配置原理,解决实际工作中,windows下使用SecureCRT证书登录的各种问题, ...

  5. 编写shell管理脚本(二)

    8.1  先测试“/etc/vsftpd”.“/etc/hosts”是否为目录,并通过“$?”变量查看返回状态值,据此判断测试结果.[root@localhost ~]# [ -d /etc/vsft ...

  6. Java过滤器原理方法

    过滤器可以对资源的请求和相应提供过滤功能,配置在web.xml文件中.过滤器可用来实现以下功能1. 权限过滤2. 登陆和检查验证3. 图像转换4. 数据压缩5. 加密6. 令牌验证7. 触发访问资源的 ...

  7. UIEdgeInsetsMake, CGRectOffset等API参数详解

    1, UIEdgeInsetsMake ( CGFloat top, CGFloat left, CGFloat bottom, CGFloat right ) 2,position点是相对suerL ...

  8. 修改 OWA 修改密码的生效时间

    从 Exchange 中文站之前的文章配置 OWA 下次登录时更改密码中, 我们知道在 Exchange 2010 SP1 当中是可以配置在 OWA 中修改域用户的密码的,那么不知道你是否有发现,当用 ...

  9. DataList数据的绑定

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Index.aspx.cs& ...

  10. netsh winsock reset 11003

    netsh winsock reset 11003 http://files.cnblogs.com/xsmhero/winsock.zip