码迷,mamicode.com
首页 > 其他好文 > 详细

GridView的属性---stretchMode详解

时间:2014-08-28 16:16:39      阅读:197      评论:0      收藏:0      [点我收藏+]

标签:gridview   columnwidth   stretchmode   

<!-- grid元素之间的竖直间隔 -->

android:verticalSpacing="5px"

<!--grid元素之间的水平间隔 -->

android:horizontalSpacing="5px" 

<!--表示有多少列,如果设置为auto_fit,将根据columnWidth和Spacing来自动计算 -->

android:numColumns="auto_fit"

<!-- 一般建议采用有像素密度无关的dip或者dp来表示-->

android:columnWidth="100px" 

android:stretchMode="columnWidth"

<!--如何填满空余的位置,模拟器采用WVGA800*480,每排4列,有4*100+5*3=415,还余65px的空间,如果是  columnWidth,则这剩余的65将分摊给4列,每列增加16/17px。如果采用SpacingWidth,则分摊给3个间隔空隙 -->


 



GridView的属性---stretchMode详解

标签:gridview   columnwidth   stretchmode   

原文地址:http://blog.csdn.net/tangnengwu/article/details/38898309

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!