Bir öğeyi, seçili olmayana veya başka bir öğe seçilene kadar vurgulanan bir MvxListView
içinde nasıl saklayabilirim?Seçilen öğenin bir MvxListView öğesinde vurgulanması
Programım, öğelerin bir listesini doğru olarak görüntüleyen bir MvxListView
vardır. Kullanıcı, bir öğeyi tıklayıp, ardından bir kaydetme düğmesine tıklayabilir. Seçilen öğe, kaydetme düğmesi kodu gerekene kadar MyChosenItem
'da saklanır. Şu anda seçili öğe, seçili olmayan renge dönmeden önce ayrık saniye için öne çıkar.
Bu
MvxListView
böyle ortaya çıkıyor:
<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" />
Bu Layout/my_item_layout.xaml
geçerli:
<?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>
http://stackoverflow.com/questions/5058291/highlight-listview-selected-row yardımcı olur mu? – Stuart