I have ListView (a derived JazzyListView) that is here in the main layout of my activity :
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/lib/com.toto.toto"
android:id="@+id/main"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/background" >
<com.twotoasters.jazzylistview.JazzyListView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
app:effect="cards"
app:max_velocity="0"
app:only_animate_fling="false"
app:only_animate_new_items="false"
/>
</RelativeLayout>
The main layout sets a color background.
For my list, I use items with this layout :
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="10dp"
android:background="@color/item_background" >
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="15dp" />
...
</RelativeLayout>
Here @color/item_background has not the same value that @color/background. So my main layout has a background color specific and list items also.
With that method, when I click on items in my list, there is no selected background state and there is no the classic background selected applied on my list.
Someone would know how I can create a custom selector (perhaps ?) or other thing to have a custom color for my items and also that when I click on item the classic selected background effect be applied ?
Thanks for your help.
Sylvain