中心元素B. GridView
我有 GridView 从 6 图片B. 2 列。 我想展示这些 6 屏幕中间的图像。 我将重力的属性安装到中心,但这个元素中心只是水平。 GridView 它需要整个屏幕。
<gridview android:background="#ffffff" android:gravity="center" android:horizontalspacing="10dp" android:id="@+id/gridview" android:layout_above="@id/ad" android:layout_alignparenttop="true" android:layout_height="fill_parent" android:layout_width="fill_parent" android:numcolumns="2" android:stretchmode="columnWidth" android:verticalspacing="10dp"></gridview>
没有找到相关结果
已邀请:
9 个回复
涵秋
赞同来自:
我花了一些时间来理解这一点,但是,用这些各种价值观饲养,我能够强迫他们专注。
郭文康
赞同来自:
江南孤鹜
赞同来自:
...和...
喜特乐
赞同来自:
android:gravity="center"
到你的布局 single_row.. 我希望这将是一个伎俩 :/
IE,
涵秋
赞同来自:
到
所以我刚又回来了 try catch, 如果是旧版本 /null/ 失败的。
詹大官人
赞同来自:
在
现在你说你的重塑完全填充父母的身高和宽度。
二哥
赞同来自:
风见雨下
赞同来自:
wrap 在
和
.
它将以他需要的规模为中心,但如果您有合适的父母。 您在技术上,基于大量父母的空白空间补偿您的孩子。
窦买办
赞同来自:
不使用
或者
, 如果您不需要它,因为它可能导致其他想法的问题。
还要注意
已经过时了。