UI组件——GridLayout

1 GridLayout(网格布局) 在Android4.0开始引入。GridLayout可以把布局分为几行和几列。GridLayout可以设置一个组件横框多少行,纵夸多少列。GridLayout和TableLayout很相似,但是如果要设计行列布局,GridLayout使用更方便、更高效。因为:GridLayout works with a flat-view hie
摘要由CSDN通过智能技术生成
1 GridLayout(网格布局) 在Android4.0开始引入。
GridLayout可以把布局分为几行和几列。
GridLayout可以设置一个组件横框多少行,纵夸多少列。
GridLayout和TableLayout很相似,但是如果要设计行列布局,GridLayout使用更方便、更高效。因为:
GridLayout  works with a flat-view hierarchy, where child views set their locations in the grid by specifying the rows and columns they should be in. By maintaining a flat hierarchy, GridLayout is able to more swiftly layout its child views. 
The new GridLayout control for Android 4.0 is very powerful and we've just scratched the surface of what it can do

2 GridLayout常见属性
GridLayout常用的XML属性和方法说明
XML属性 相关方法 说明
android:alignmentMode setAlignmentMode(int) 设置该布局管理器采用的对齐模式
android:rowCount
setRowCount(int)
设置该网格的行数
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值