Android布局_网格布局GirdLayout
自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的更多相关文章
- 鸿蒙的js开发部模式16:鸿蒙布局Grid网格布局的应用一
鸿蒙入门指南,小白速来!从萌新到高手,怎样快速掌握鸿蒙开发?[课程入口]目录:1.Grid简介2.使用Grid布局实现的效果3.grid-row-gap和grid-colunm-gap属性4.< ...
- android——学习:网格布局——GridLayout
Android一开始就提供了几种布局控件,如线性布局LinearLayout.相对布局RelativeLayout和表格布局TableLayout等,但在很多情况下,这些布局控件是不能满足要求的,因此 ...
- android的布局-----GridLayout(网格布局)
学习导图 (一)简介 网格布局由GridLayout所代表,在android4.0之后新增加的布局管理器,因此需要android4.0之后的版本中使用,如果在更早的平台使用该布局管理器,则需要导入相应 ...
- Android之GridLayout网格布局
1.相关属性 GridLayout网格布局是4.0之后引入的布局方式! android:columnCount="4" //设置列数(4列) android:rowCount=&q ...
- 控件布局_FrameLayout(网格布局)
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools=&qu ...
- css布局 弹性布局 和 网格布局
这里就不写这两种布局的内容了 弹性布局链接:http://www.ruanyifeng.com/blog/2015/07/flex-grammar.html 网格布局链接:https://www.ji ...
- CSS3_伸缩盒模型_弹性布局_等分布局_flex 布局
伸缩盒模型 CSS3 引入的布局模式 Flexbox 布局 主要思想: 让容器有能力让其子项目能够改变其宽度,高度,以最佳方式填充可用空间. 特点: display: flex; 只能控制其子元 ...
- Android布局_表格布局TableLayout
一.TableLayout概述 TableLayout表格布局模型以行列的形式管理子控件,每一行为一个TableRow的对象,当然也可以是一个View的对象 二.TableLayout的全局属性 1 ...
- Android布局_帧布局FrameLayout
一.FrameLayout布局概述 在这个布局中,所有的子元素都不能被指定放置的位置,他们统统放于这块区域的左上角,并且后面的子元素直接覆盖在前面的子元素之上,将前面的子元素部分和全部遮挡 如下面的 ...
随机推荐
- c#记事本
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...
- Session机制(是对cookie的作用的提升,使用较多)
1.Session作用类似于购物车,第一次,放入物品,可以获得Session的id,并可以设置id失效的时间,这样便于多次将物品放在购物车里面,使用的就是获取的Session的id: 2.Sessio ...
- 20151224001 GridView 多按钮的各种使用方法
<asp:GridView ID="GridView1" runat="server" AllowPaging=" ...
- css3 resize box-sizing outline-offset
resize:设置用户可以自己调整大小 box-sizing: box-sizing属性可以为三个值之一:content-box(default),border-box,padding-box. co ...
- webform数据导出
把数据放到一个泛型集合里,再把泛型集合里面的数据放到一个table中,设置好文件路径,然后进行文件读取,最后供用户下载. 数据导出放在一个按钮中就可以了 using System; using Sys ...
- Prompt isNaN 数组 function DOM window.open/close/location/history
1.prompt的利用 <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Defa ...
- centos6.5用户管理
一.centOS6.5用户管理命令 useradd 新增用户 userdel 删除用户 passwd 修改用户密码 二.命令的使用 useradd useradd admin userdel us ...
- Myeclipse 添加server library
来自网络资料 (1)File->New->Other (2)弹出窗口勾上Show All Wizards,然后在type fiter text那里输入Server,选中server-> ...
- C++vector迭代器失效的问题
转载:http://blog.csdn.net/olanmomo/article/details/38420907 转载:http://blog.csdn.net/stpeace/article/de ...
- SqlSever基础 getdate函数 返回系统当前的年月日,时分秒 毫秒
镇场诗:---大梦谁觉,水月中建博客.百千磨难,才知世事无常.---今持佛语,技术无量愿学.愿尽所学,铸一良心博客.------------------------------------------ ...