i try to create a multiplichoice listview, but i just can select one. Here is my code:
Selector (multiselect_background.xml):
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/blue" android:state_checked="true"/>
<item android:drawable="@color/red" android:state_pressed="true"/>
<item android:drawable="@color/grey"/>
</selector>
ListView (list.xml):
<ListView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:choiceMode="multipleChoice"
/>
Layout (select_item.xml):
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@drawable/multiselect_background">
Somebody knows, why the multiselect isn't possible? Thanks a lot!!