Android列表,刷卡动作

栏目: IOS · Android · 发布时间: 6年前

内容简介:我有一些文本列表.我想在滑动动作中显示图像(几乎像在gmail应用程序中).例如,如果我从左到右滑动 – 我的列表项目正在移动,图像从左侧滑动.我的列表项可以移动不超过图像宽度.刷卡停止后,列表项目正在移动到开始位置.我该怎么做这样的事情?代码日志版权声明:翻译自:http://stackoverflow.com/questions/18386395/android-listview-swipe-to-action

我有一些文本列表.我想在滑动动作中显示图像(几乎像在gmail应用程序中).例如,如果我从左到右滑动 – 我的列表项目正在移动,图像从左侧滑动.我的列表项可以移动不超过图像宽度.刷卡停止后,列表项目正在移动到开始位置.我该怎么做这样的事情?

查看 this

.

在那里,您可以看到右侧的列表视图滑动显示视图.

快:

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


以上所述就是小编给大家介绍的《Android列表,刷卡动作》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Programming From The Ground Up

Programming From The Ground Up

Jonathan Bartlett / Bartlett Publishing / 2004-07-31 / USD 34.95

Programming from the Ground Up is an introduction to programming using assembly language on the Linux platform for x86 machines. It is a great book for novices who are just learning to program as wel......一起来看看 《Programming From The Ground Up》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

MD5 加密
MD5 加密

MD5 加密工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换