【问题标题】:How to reduce space in GridView using Android?如何使用 Android 减少 GridView 中的空间?
【发布时间】:2014-03-06 22:17:09
【问题描述】:

我有以下 xml 代码,我想减少单元格之间的空间。

字符串数组

String[] numbers = new String[] { 
            "A", "B", "C", "D", "E",
            "F", "G", "H", "I", "J",
            "K", "L", "M", "N", "O",
            "P", "Q", "R", "S", "T",
            "U", "V", "W", "X", "Y", "Z"};  

XML 代码-:

 <GridView

android:id="@+id/gridView"
android:numColumns="5"
android:gravity="center"
android:columnWidth="5dp"
android:verticalSpacing="2dp"
android:horizontalSpacing="2dp"
android:padding="0dp"
android:stretchMode="columnWidth"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >

 </GridView>

我想减少单元格之间的空格,但我没有找到它的代码或 xml 属性。请建议我该怎么做。

【问题讨论】:

    标签: android xml grid


    【解决方案1】:

    我认为链接会解决你的问题

    Check this out

    And this one

    【讨论】:

      猜你喜欢
      • 2011-11-17
      • 2013-08-03
      • 1970-01-01
      • 2012-12-08
      • 1970-01-01
      • 1970-01-01
      • 2015-10-28
      • 2011-11-19
      • 2016-08-12
      相关资源
      最近更新 更多