Android列表,刷卡動作
我有一些文字列表.我想在滑動動作中顯示影象(幾乎像在gmail應用程式中).例如,如果我從左到右滑動 – 我的列表專案正在移動,影象從左側滑動.我的列表項可以移動不超過影象寬度.刷卡停止後,列表專案正在移動到開始位置.我該怎麼做這樣的事情?
.
在那裡,您可以看到右側的列表檢視滑動顯示檢視.
快:
main_activity.xml:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:swipe="http://schemas.android.com/apk/res-auto" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <com.fortysevendeg.swipelistview.SwipeListView android:id="@+id/example_swipe_lv_list" android:listSelector="#00000000" android:layout_width="fill_parent" android:layout_height="wrap_content" swipe:swipeFrontView="@+id/front" swipe:swipeBackView="@+id/back" swipe:swipeDrawableChecked="@drawable/choice_selected" swipe:swipeDrawableUnchecked="@drawable/choice_unselected" swipe:swipeCloseAllItemsWhenMoveList="true" swipe:swipeMode="both" /> </LinearLayout>
程式碼日誌版權宣告:
翻譯自:http://stackoverflow.com/questions/18386395/android-listview-swipe-to-action