自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. 20150618_Andriod _set Dialog_弹出式菜单

    参考地址: http://blog.csdn.net/zhyl8157121/article/details/8169172                   http://blog.csdn.ne ...

  2. Android GridView 第一个Item 点击没反应

    @Override public View getView(final int position, View convertView, ViewGroup parent) { final ViewHo ...

  3. CRB and String

    CRB and String Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Tota ...

  4. SQL锁行 解决多台服务器发送统一请求并发问题

    锁行信息SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED 存储过程:SET Transaction Isolation Level Read语法的四种情 ...

  5. JavaScript的学习

    学习了一段时间了,oop 的JavaScript .但是理解了还不是很深入,所以,决定.通过写博客的方式来,加深JavaScript的程度.2016的目标: 第一阶段:oop的JavaScript 第 ...

  6. Keytool生成csr

    一. 首先生成密钥库 keytool -genkey -keyalg RSA -keysize 4096 -keystore c:\keystore4096.jks 二.生成csr keytool - ...

  7. Maven打jar发布包的常用配置

    1.修改pom.xml增加如下内容 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifac ...

  8. CodeForces 651B Beautiful Paintings 贪心

    A. Joysticks time limit per test 1 second memory limit per test 256 megabytes input standard input o ...

  9. 【leetcode❤python】342. Power of Four

    #-*- coding: UTF-8 -*- class Solution(object):    def isPowerOfFour(self, num):        ""& ...

  10. JAVA语法基础——数据类型

    ---恢复内容开始--- JAVA数据类型分为:数值型和字符型和布尔型 数值型分为整数型(整型)和浮点型(小数点), 整型分为四种,byte比特型.short型.int型.long型. byte是最小 ...