<linearLayout xmlns:androID="http://schemas.androID.com/apk/res/androID" androID:layout_wIDth="fill_parent" androID:layout_height="match_parent" androID:orIEntation="vertical" > <GrIDVIEw androID:ID="@+ID/calendar" androID:layout_wIDth="fill_parent" androID:layout_height="match_parent" androID:horizontalSpacing="-1px" androID:numColumns="7" androID:stretchMode="columnWIDth" androID:gravity="center" androID:verticalSpacing="-1px" androID:ListSelector="@null" > </GrIDVIEw> </linearLayout>
我得到的是这张照片:
解决方法 此空间是由于网格的每一行计算不完善所致.例如,您的设备宽度为320像素,您有7行,请尝试任何符合320像素的计算.如果每个单元格的宽度是45.71428571428571 px,那么只有它可以减少.
其他选择
应用机器人:比重=“中心”你网格中的属性,以便空格从左到右平分
总结以上是内存溢出为你收集整理的Android GridView不完美,如何删除额外的空白区域全部内容,希望文章能够帮你解决Android GridView不完美,如何删除额外的空白区域所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)