ListView高级应用问题 求急救啊
我是想实现这样一个效果:
listview中包含了ImageView与TextView
在点击的时候
android:listSelector="@drawable/background_title2" background_title2为一个背景图片
问题是在listview item(子项目)中的textView有一块白色的,这个问题怎么解决啊
相关布局为:
<ListView
android:id="@+id/forumListLeft"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:scrollbars="none"
android:cacheColorHint="#00000000"
android:fadingEdge="none"
android:divider="@drawable/line"
android:dividerHeight="1dip"
android:layout_gravity="left"
android:background="@android:color/white"
android:listSelector="@drawable/background_title2"
></ListView>
viewHolder:
<ImageView
android:id="@+id/ivforumlistHoler"
android:layout_width="40dip"
android:layout_height="40dip"
android:gravity="center_vertical"
/>
<TextView
android:id="@+id/tvforumlistHoler"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="10dip"
android:layout_gravity="center_horizontal"
android:background="#00000000"
/>
[解决办法]
把这句:android:background="#00000000"拿掉试试