文件名称:SlideCutListView
介绍说明--下载内容均来自于网络,请自行研究使用
本款Android源码实现两种功能演示,一是使用Scroller实现漂亮的ListView左右滑动效果,另外是删除Item效果,虽然是一些小技巧,但对于学习android的界面编写挺有帮助。在当前界面滑动的ListView,内部定义了一个滑动类,在这个滑动类中标记出item滑出屏幕的方向,向左或者向右,用一个枚举值来标记,并包括分发事件,主要做的是判断点击的是那个item, 以及通过postDelayed来设置响应左右滑动事件;
往右滑动,getScrollX()返回的是左边缘的距离,就是以View左边缘为原点到开始滑动的距离,所以向右边滑动为负值,根据手指滚动itemView的距离来判断是滚动到开始位置还是向左或者向右滚动,手指拖动itemView滚动, deltaX大于0向左滚动,小于0向右滚。-This paragraph demonstrates Android source code for two functions, one is to use Scroller sliding around ListView achieve beautiful results, in addition to delete Item effect, although some tips, but for learning to write android interface quite helpful. In the current interface sliding ListView, sliding inside the class definition of a mark in this class, the direction of the item slide slide the screen to the left or to the right, marked with an enumeration value, and include the distribution of events, mainly to do Click the judgment is that item, as well as to set up in response to sliding around events through postDelayed
Right slide, getScrollX () returns the distance from the left edge to the left edge is to the origin of View to the start of sliding distance, so the slide to the right is negative, according to the distance of the finger rolling itemView scroll to determine the start position or scroll left or right, drag your finger itemView rolling, deltaX scroll left is gre
往右滑动,getScrollX()返回的是左边缘的距离,就是以View左边缘为原点到开始滑动的距离,所以向右边滑动为负值,根据手指滚动itemView的距离来判断是滚动到开始位置还是向左或者向右滚动,手指拖动itemView滚动, deltaX大于0向左滚动,小于0向右滚。-This paragraph demonstrates Android source code for two functions, one is to use Scroller sliding around ListView achieve beautiful results, in addition to delete Item effect, although some tips, but for learning to write android interface quite helpful. In the current interface sliding ListView, sliding inside the class definition of a mark in this class, the direction of the item slide slide the screen to the left or to the right, marked with an enumeration value, and include the distribution of events, mainly to do Click the judgment is that item, as well as to set up in response to sliding around events through postDelayed
Right slide, getScrollX () returns the distance from the left edge to the left edge is to the origin of View to the start of sliding distance, so the slide to the right is negative, according to the distance of the finger rolling itemView scroll to determine the start position or scroll left or right, drag your finger itemView rolling, deltaX scroll left is gre
(系统自动生成,下载前可以参看下载内容)
下载文件列表
SlideCutListView\.classpath
................\.project
................\.settings\org.eclipse.jdt.core.prefs
................\AndroidManifest.xml
................\bin\AndroidManifest.xml
................\...\classes\com\example\slidecutlistview\BuildConfig.class
................\...\.......\...\.......\................\MainActivity$1.class
................\...\.......\...\.......\................\MainActivity.class
................\...\.......\...\.......\................\R$attr.class
................\...\.......\...\.......\................\R$drawable.class
................\...\.......\...\.......\................\R$id.class
................\...\.......\...\.......\................\R$layout.class
................\...\.......\...\.......\................\R$menu.class
................\...\.......\...\.......\................\R$string.class
................\...\.......\...\.......\................\R$style.class
................\...\.......\...\.......\................\R.class
................\...\.......\...\.......\................\SlideCutListView$RemoveDirection.class
................\...\.......\...\.......\................\SlideCutListView$RemoveListener.class
................\...\.......\...\.......\................\SlideCutListView.class
................\...\classes.dex
................\...\dexedLibs\android-support-v4-64e40abe7d72907c3b6c986a2e149b16.jar
................\...\.........\android-support-v4-697bc69dbef2908df6b6e0f7928330fd.jar
................\...\.........\android-support-v4-7aaf9ee3f51761c5835fd47809095b3a.jar
................\...\.........\android-support-v4-7b360f1a6a538f2cf0874c33b67823dc.jar
................\...\.........\android-support-v4-a18e4f26741405bd3fb9ace528ac486f.jar
................\...\.........\android-support-v4-fbfe5839f28e35ae53dd2a813a64f849.jar
................\...\jarlist.cache
................\...\MainActivity.apk
................\...\res\drawable-hdpi\ic_launcher.png
................\...\...\.............\reader_item_divider.png
................\...\...\.........ldpi\ic_launcher.png
................\...\...\.........mdpi\ic_launcher.png
................\...\...\.........xhdpi\ic_launcher.png
................\...\resources.ap_
................\...\SlideCutListView.apk
................\gen\com\example\slidecutlistview\BuildConfig.java
................\...\...\.......\................\R.java
................\ic_launcher-web.png
................\libs\android-support-v4.jar
................\proguard-project.txt
................\project.properties
................\res\drawable-hdpi\friendactivity_comment_detail_list2.9.png
................\...\.............\ic_launcher.png
................\...\.............\reader_item_divider.png
................\...\.........ldpi\ic_launcher.png
................\...\.........mdpi\ic_launcher.png
................\...\.........xhdpi\ic_launcher.png
................\...\layout\activity_main.xml
................\...\......\listview_item.xml
................\...\menu\activity_main.xml
................\...\values\strings.xml
................\...\......\styles.xml
................\...\......-v11\styles.xml
................\...\.........4\styles.xml
................\src\com\example\slidecutlistview\MainActivity.java
................\...\...\.......\................\SlideCutListView.java
................\bin\classes\com\example\slidecutlistview
................\...\.......\...\example
................\gen\com\example\slidecutlistview
................\src\com\example\slidecutlistview
................\bin\classes\com
................\...\res\drawable-hdpi
................\...\...\drawable-ldpi
................\...\...\drawable-mdpi
................\...\...\drawable-xhdpi
................\gen\com\example
................\src\com\example
................\bin\classes
................\...\dexedLibs
................\...\res
................\gen\com
................\res\drawable-hdpi
................\...\drawable-ldpi
................\...\drawable-mdpi
................\...\drawable-xhdpi
................\...\layout
................\...\menu
................\..