我有我的自定义listselector这样的:ListSelector在列表视图不工作
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:state_pressed="true"
android:drawable="@drawable/bg_list_hover"></item>
<item
android:state_focused="true"
android:drawable="@drawable/bg_list"></item>
</selector>
和我的列表视图:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@drawable/bg_dasar" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="StoreCategory"
android:textSize="15sp"
android:paddingLeft="10dip"
android:paddingTop="10dip"
android:paddingRight="10dip"
android:textColor="@color/textcolor"/>
<ListView
android:id="@+id/listView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dip"
android:listSelector="@drawable/listselector">
</ListView>
我的问题是,当我不上的ListView点击, listview项目不使用集中状态背景(@drawable/bg_list
)...
任何可以帮助我吗?
仍然没有工作对我来说,, :) – ZeeDroid