移动开发 Android ,如何让GridView的宽度为60%match_parent,并且水平居中?
<GridViewandroid:id="@+id/text_gridView"android:layout_width=""android:layout_height=...
<GridView android:id="@+id/text_gridView" android:layout_width="
" android:layout_height="match_parent" android:layout_below="@+id/liner2" android:layout_above="@+id/speech" android:layout_margin="15dip" android:background="#00FFFFFF" android:cacheColorHint="@android:color/transparent" android:clipChildren="true" android:columnWidth="69dip" android:gravity="center" android:horizontalSpacing="5dip" android:listSelector="@android:color/transparent" android:numColumns="auto_fit" android:scrollbars="@null" android:verticalSpacing="5dip" > </GridView> 展开
" android:layout_height="match_parent" android:layout_below="@+id/liner2" android:layout_above="@+id/speech" android:layout_margin="15dip" android:background="#00FFFFFF" android:cacheColorHint="@android:color/transparent" android:clipChildren="true" android:columnWidth="69dip" android:gravity="center" android:horizontalSpacing="5dip" android:listSelector="@android:color/transparent" android:numColumns="auto_fit" android:scrollbars="@null" android:verticalSpacing="5dip" > </GridView> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询