Android列表,刷卡动作

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

内容简介:我有一些文本列表.我想在滑动动作中显示图像(几乎像在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列表,刷卡动作》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

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

Bulletproof Ajax中文版

Bulletproof Ajax中文版

Jeremy Keith / 刘申、宋薇 / 人民邮电出版社 / 2007-11 / 39.00元

本书介绍了如何构建无懈可击的Ajax Web应用程序,重点讲述如何在已有Web站点使用Ajax增强网站用户体验,从而尽可能地保证网站拥有最大限度的可移植性和亲和力,这正是目前大多数网站面临的需求。书中主要介绍了JavaScript、DOM、XMLHttpRequest、数据格式等,同时还提出了一种Hijax方法,即可以让Web应用程序平稳退化的方法。 本书适合各层次Web开发和设计人员阅读......一起来看看 《Bulletproof Ajax中文版》 这本书的介绍吧!

随机密码生成器
随机密码生成器

多种字符组合密码

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具