android – API中的GridView填充少于10

android – API中的GridView填充少于10,第1张

概述我需要在 Android API中没有填充的GridView小于10.我的布局: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:tools="http://schemas.android.com/tools"android:layout_width="fill_parent"an 我需要在 Android API中没有填充的GrIDVIEw小于10.我的布局:

<relativeLayout xmlns:androID="http://schemas.androID.com/apk/res/androID"xmlns:tools="http://schemas.androID.com/tools"androID:layout_wIDth="fill_parent"androID:layout_height="fill_parent"tools:context=".MainActivity" ><GrIDVIEw    androID:ID="@+ID/grID"    androID:layout_wIDth="wrap_content"    androID:layout_height="wrap_content"    androID:layout_alignParentBottom="true"    androID:layout_alignParentleft="true"    androID:layout_alignParentRight="true"    androID:layout_alignParenttop="true"    androID:alwaysDrawnWithCache="true"    androID:background="@color/grIDvIEw_background"    androID:clipChildren="true"    androID:horizontalSpacing="1dp"    androID:numColumns="6"    androID:verticalSpacing="1dp" />

结果:

填充上显示红色箭头.它只在AndroID< 3.0我需要的结果 没有填充物. 附: AndroID 3.0上完全相同的代码没有填充.这是为什么?

解决方法 我几乎找不到答案=). On 2.x AndroID in styles是你的ListSelector,而它的4.x.在4.x他可能是空的,并且2.x它可能是空的,并且填充了他需要放置属性的吠叫:

androID: ListSelector="@null"
总结

以上是内存溢出为你收集整理的android – API中的GridView填充少于10全部内容,希望文章能够帮你解决android – API中的GridView填充少于10所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1129189.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-30
下一篇 2022-05-30

发表评论

登录后才能评论

评论列表(0条)

保存