[英]Why is my ListView black?
我的ListView有以下代码:
<ListView android:id="@android:id/list" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:scrollbarStyle="insideOverlay"
android:background="@android:color/white"
android:cacheColorHint="@android:color/white"
android:fadingEdgeLength="16dip" />
我的活动中的主题为“ Holo.Light.DarkActionBar”。 我试图将ListView的样式更改为相同的内容,但是我没有获得正确的颜色。 在Eclipse的布局编辑器中,它显示如下:
但是在我的手机上我得到了这个:
如果我将主题应用于活动,为什么它不改变颜色?
只是解决了我一段时间前类似问题的一个想法:
您是否将主题或样式应用于ListItems或仅应用于ListView?
如果这是问题所在,您可以在此处找到有关操作方法的详细说明:
http://codehenge.net/blog/2011/05/customizing-android-listview-item-layout/
(我会在评论中询问,但我可能还没有这样做^^)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.