How to save an element in MvxListView selected until it is selected or until another element is selected?
My program has an MvxListView that correctly displays a list of items. The user can select an item by clicking it, and then click the "Save" button. The selected item is stored in MyChosenItem until the save button code needs it. Currently, the selected item remains flare for a second of a second before returning to an unselected color.
This creates the MvxListView :
<Mvx.MvxListView android:layout_width="match_parent" android:layout_height="260dp" android:layout_marginTop="40dp" android:id="@+id/MyMvxListViewControl" local:MvxBind="ItemsSource MyItems; SelectedItem MyChosenItem" local:MvxItemTemplate="@layout/my_item_layout" />
This is Layout/my_item_layout.xaml :
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:local="http://schemas.android.com/apk/res/Project.Ui.Droid" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content"> <TextView android:layout_width="300.0dp" android:layout_height="wrap_content" android:padding="5dp" android:textSize="20dp" android:textColor="#000000" local:MvxBind="Text Field1" /> <TextView android:layout_width="250.0dp" android:layout_height="wrap_content" android:padding="5dp" android:textSize="20dp" android:textColor="#000000" local:MvxBind="Text Field2" /> </LinearLayout>
source share