I needed to use custom title bar so I changed the manifest and created my custom theme. Till here every thing was fine, but same activity was having a list view, so I used custom list view and changed accordingly. Every thing went fine, But on click of any item in list view, item was not getting highlighted. I went through various links but not found the solution. I have gone through this link which has similar problem but solution is not working in my case. If any body could help.
My attempt: My list_bg.xml is
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@color/grey" />
<item android:state_pressed="true"
android:drawable="@color/blue" />
<item android:state_selected="true"
android:state_pressed="false"
android:drawable="@color/blue" />
</selector>
I have added the above code in color folder and gave the reference as android:background="@color/list_bg"
in list view item xml.
Any help will be appreciated, thanks in advance