├── .classpath
├── .project
├── .settings
├── org.eclipse.core.resources.prefs
└── org.eclipse.jdt.core.prefs
├── AndroidManifest.xml
├── README.md
├── bin
├── AndroidManifest.xml
├── SlideCutListView.apk
├── SwipeListView.apk
├── classes.dex
├── classes
│ └── .gitignore
├── dexedLibs
│ ├── android-support-v4-73d58af958a64e093609dffccf15ea3f.jar
│ ├── android-support-v4-9b5ca60c9170b69618d2bd794bdb5e4a.jar
│ └── android-support-v4-a9bda8fdf8afe3fe35f9883f0f8d0f19.jar
├── jarlist.cache
├── res
│ └── crunch
│ │ ├── drawable-hdpi
│ │ ├── ic_action_undo.png
│ │ ├── ic_launcher.png
│ │ └── reader_item_divider.png
│ │ ├── drawable-ldpi
│ │ └── ic_launcher.png
│ │ ├── drawable-mdpi
│ │ └── ic_launcher.png
│ │ └── drawable-xhdpi
│ │ └── ic_launcher.png
└── resources.ap_
├── gen
└── .gitignore
├── ic_launcher-web.png
├── libs
└── android-support-v4.jar
├── proguard-project.txt
├── project.properties
├── res
├── anim
│ ├── canceldialog_enter.xml
│ ├── canceldialog_exit.xml
│ ├── canceldialog_push_left_in.xml
│ └── canceldialog_push_right_in.xml
├── drawable-hdpi
│ ├── friendactivity_comment_detail_list2.9.png
│ ├── ic_action_undo.png
│ ├── ic_launcher.png
│ └── reader_item_divider.png
├── drawable-ldpi
│ └── ic_launcher.png
├── drawable-mdpi
│ └── ic_launcher.png
├── drawable-xhdpi
│ └── ic_launcher.png
├── drawable
│ ├── customswipe_canceldialog_shape.xml
│ ├── list_selector.xml
│ └── test_listview_item_selector.xml
├── layout
│ ├── activity_main.xml
│ ├── customswipe_canceldialog_view.xml
│ └── test_listview_item_view.xml
├── menu
│ └── activity_main.xml
├── values-v11
│ └── styles.xml
├── values-v14
│ └── styles.xml
└── values
│ ├── color.xml
│ ├── dimens.xml
│ ├── strings.xml
│ └── styles.xml
└── src
└── com
└── example
└── slidecutlistview
├── CancelListener.java
├── CustomSwipeAdapter.java
├── CustomSwipeCancelDialog.java
├── CustomSwipeListView.java
├── CustomSwipeUtils.java
├── MainActivity.java
└── TestModel.java
/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | SwipeListView
4 |
5 |
6 |
7 |
8 |
9 | com.android.ide.eclipse.adt.ResourceManagerBuilder
10 |
11 |
12 |
13 |
14 | com.android.ide.eclipse.adt.PreCompilerBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.jdt.core.javabuilder
20 |
21 |
22 |
23 |
24 | com.android.ide.eclipse.adt.ApkBuilder
25 |
26 |
27 |
28 |
29 |
30 | com.android.ide.eclipse.adt.AndroidNature
31 | org.eclipse.jdt.core.javanature
32 |
33 |
34 |
--------------------------------------------------------------------------------
/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding/=GBK
3 |
--------------------------------------------------------------------------------
/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
3 | org.eclipse.jdt.core.compiler.compliance=1.6
4 | org.eclipse.jdt.core.compiler.source=1.6
5 |
--------------------------------------------------------------------------------
/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
16 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ##这是一个仿知乎安卓客户端滑动删除撤销的ListView
2 |
3 | 效果图:
4 |
5 | ###使用方法:
6 |
7 | layout里
8 |
9 | ```
10 |
16 |
17 |
18 | ```
19 |
20 | 代码里
21 |
22 | ```
23 | CustomSwipeListView slideListView = (CustomSwipeListView) findViewById(R.id.slideCutListView);
24 | CustomSwipeAdapter adapter = new CustomSwipeAdapter(this, makeData());
25 |
26 | slideListView.setAdapter(adapter);
27 | slideListView.setRemoveListener(adapter)
28 | ```
29 |
30 | ###代码的分析请看[我的博客介绍](http://blog.csdn.net/asdzheng/article/details/44278469)
31 |
32 | 感谢这个开源项目提供部分源码及思路[custom-swipelistview](https://github.com/xyczero/custom-swipelistview)
33 |
--------------------------------------------------------------------------------
/bin/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
16 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/bin/SlideCutListView.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asdzheng/SwipeListView/ff168c32265b214a1eedb80a89b70dc1b6c85203/bin/SlideCutListView.apk
--------------------------------------------------------------------------------
/bin/SwipeListView.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asdzheng/SwipeListView/ff168c32265b214a1eedb80a89b70dc1b6c85203/bin/SwipeListView.apk
--------------------------------------------------------------------------------
/bin/classes.dex:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asdzheng/SwipeListView/ff168c32265b214a1eedb80a89b70dc1b6c85203/bin/classes.dex
--------------------------------------------------------------------------------
/bin/classes/.gitignore:
--------------------------------------------------------------------------------
1 | /com/
2 |
--------------------------------------------------------------------------------
/bin/dexedLibs/android-support-v4-73d58af958a64e093609dffccf15ea3f.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asdzheng/SwipeListView/ff168c32265b214a1eedb80a89b70dc1b6c85203/bin/dexedLibs/android-support-v4-73d58af958a64e093609dffccf15ea3f.jar
--------------------------------------------------------------------------------
/bin/dexedLibs/android-support-v4-9b5ca60c9170b69618d2bd794bdb5e4a.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asdzheng/SwipeListView/ff168c32265b214a1eedb80a89b70dc1b6c85203/bin/dexedLibs/android-support-v4-9b5ca60c9170b69618d2bd794bdb5e4a.jar
--------------------------------------------------------------------------------
/bin/dexedLibs/android-support-v4-a9bda8fdf8afe3fe35f9883f0f8d0f19.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asdzheng/SwipeListView/ff168c32265b214a1eedb80a89b70dc1b6c85203/bin/dexedLibs/android-support-v4-a9bda8fdf8afe3fe35f9883f0f8d0f19.jar
--------------------------------------------------------------------------------
/bin/jarlist.cache:
--------------------------------------------------------------------------------
1 | # cache for current jar dependency. DO NOT EDIT.
2 | # format is
3 | # Encoding is UTF-8
4 |
--------------------------------------------------------------------------------
/bin/res/crunch/drawable-hdpi/ic_action_undo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asdzheng/SwipeListView/ff168c32265b214a1eedb80a89b70dc1b6c85203/bin/res/crunch/drawable-hdpi/ic_action_undo.png
--------------------------------------------------------------------------------
/bin/res/crunch/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asdzheng/SwipeListView/ff168c32265b214a1eedb80a89b70dc1b6c85203/bin/res/crunch/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/bin/res/crunch/drawable-hdpi/reader_item_divider.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asdzheng/SwipeListView/ff168c32265b214a1eedb80a89b70dc1b6c85203/bin/res/crunch/drawable-hdpi/reader_item_divider.png
--------------------------------------------------------------------------------
/bin/res/crunch/drawable-ldpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asdzheng/SwipeListView/ff168c32265b214a1eedb80a89b70dc1b6c85203/bin/res/crunch/drawable-ldpi/ic_launcher.png
--------------------------------------------------------------------------------
/bin/res/crunch/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asdzheng/SwipeListView/ff168c32265b214a1eedb80a89b70dc1b6c85203/bin/res/crunch/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/bin/res/crunch/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asdzheng/SwipeListView/ff168c32265b214a1eedb80a89b70dc1b6c85203/bin/res/crunch/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/bin/resources.ap_:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asdzheng/SwipeListView/ff168c32265b214a1eedb80a89b70dc1b6c85203/bin/resources.ap_
--------------------------------------------------------------------------------
/gen/.gitignore:
--------------------------------------------------------------------------------
1 | /com/
2 |
--------------------------------------------------------------------------------
/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asdzheng/SwipeListView/ff168c32265b214a1eedb80a89b70dc1b6c85203/ic_launcher-web.png
--------------------------------------------------------------------------------
/libs/android-support-v4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asdzheng/SwipeListView/ff168c32265b214a1eedb80a89b70dc1b6c85203/libs/android-support-v4.jar
--------------------------------------------------------------------------------
/proguard-project.txt:
--------------------------------------------------------------------------------
1 | # To enable ProGuard in your project, edit project.properties
2 | # to define the proguard.config property as described in that file.
3 | #
4 | # Add project specific ProGuard rules here.
5 | # By default, the flags in this file are appended to flags specified
6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt
7 | # You can edit the include path and order by changing the ProGuard
8 | # include property in project.properties.
9 | #
10 | # For more details, see
11 | # http://developer.android.com/guide/developing/tools/proguard.html
12 |
13 | # Add any project specific keep options here:
14 |
15 | # If your project uses WebView with JS, uncomment the following
16 | # and specify the fully qualified class name to the JavaScript interface
17 | # class:
18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19 | # public *;
20 | #}
21 |
--------------------------------------------------------------------------------
/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system edit
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 | #
10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12 |
13 | # Project target.
14 | target=android-17
15 |
--------------------------------------------------------------------------------
/res/anim/canceldialog_enter.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
--------------------------------------------------------------------------------
/res/anim/canceldialog_exit.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
--------------------------------------------------------------------------------
/res/anim/canceldialog_push_left_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
13 |
14 |
--------------------------------------------------------------------------------
/res/anim/canceldialog_push_right_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
13 |
14 |
--------------------------------------------------------------------------------
/res/drawable-hdpi/friendactivity_comment_detail_list2.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asdzheng/SwipeListView/ff168c32265b214a1eedb80a89b70dc1b6c85203/res/drawable-hdpi/friendactivity_comment_detail_list2.9.png
--------------------------------------------------------------------------------
/res/drawable-hdpi/ic_action_undo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asdzheng/SwipeListView/ff168c32265b214a1eedb80a89b70dc1b6c85203/res/drawable-hdpi/ic_action_undo.png
--------------------------------------------------------------------------------
/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asdzheng/SwipeListView/ff168c32265b214a1eedb80a89b70dc1b6c85203/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/res/drawable-hdpi/reader_item_divider.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asdzheng/SwipeListView/ff168c32265b214a1eedb80a89b70dc1b6c85203/res/drawable-hdpi/reader_item_divider.png
--------------------------------------------------------------------------------
/res/drawable-ldpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asdzheng/SwipeListView/ff168c32265b214a1eedb80a89b70dc1b6c85203/res/drawable-ldpi/ic_launcher.png
--------------------------------------------------------------------------------
/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asdzheng/SwipeListView/ff168c32265b214a1eedb80a89b70dc1b6c85203/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asdzheng/SwipeListView/ff168c32265b214a1eedb80a89b70dc1b6c85203/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/res/drawable/customswipe_canceldialog_shape.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/res/drawable/list_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/res/drawable/test_listview_item_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/res/layout/customswipe_canceldialog_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
20 |
21 |
31 |
32 |
--------------------------------------------------------------------------------
/res/layout/test_listview_item_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
17 |
18 |
25 |
26 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/res/menu/activity_main.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/res/values-v11/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/res/values-v14/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/res/values/color.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | #525252
5 | #BFBFBF
6 | #ffffffff
7 |
8 | #1E90FF
9 |
--------------------------------------------------------------------------------
/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 45dp
5 | 14sp
6 |
7 |
--------------------------------------------------------------------------------
/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | SlideCutListView
5 | Hello world!
6 | Settings
7 |
8 |
--------------------------------------------------------------------------------
/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
14 |
15 |
16 |
19 |
20 |
30 |
31 |
35 |
36 |
--------------------------------------------------------------------------------
/src/com/example/slidecutlistview/CancelListener.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asdzheng/SwipeListView/ff168c32265b214a1eedb80a89b70dc1b6c85203/src/com/example/slidecutlistview/CancelListener.java
--------------------------------------------------------------------------------
/src/com/example/slidecutlistview/CustomSwipeAdapter.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asdzheng/SwipeListView/ff168c32265b214a1eedb80a89b70dc1b6c85203/src/com/example/slidecutlistview/CustomSwipeAdapter.java
--------------------------------------------------------------------------------
/src/com/example/slidecutlistview/CustomSwipeCancelDialog.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asdzheng/SwipeListView/ff168c32265b214a1eedb80a89b70dc1b6c85203/src/com/example/slidecutlistview/CustomSwipeCancelDialog.java
--------------------------------------------------------------------------------
/src/com/example/slidecutlistview/CustomSwipeListView.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asdzheng/SwipeListView/ff168c32265b214a1eedb80a89b70dc1b6c85203/src/com/example/slidecutlistview/CustomSwipeListView.java
--------------------------------------------------------------------------------
/src/com/example/slidecutlistview/CustomSwipeUtils.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asdzheng/SwipeListView/ff168c32265b214a1eedb80a89b70dc1b6c85203/src/com/example/slidecutlistview/CustomSwipeUtils.java
--------------------------------------------------------------------------------
/src/com/example/slidecutlistview/MainActivity.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asdzheng/SwipeListView/ff168c32265b214a1eedb80a89b70dc1b6c85203/src/com/example/slidecutlistview/MainActivity.java
--------------------------------------------------------------------------------
/src/com/example/slidecutlistview/TestModel.java:
--------------------------------------------------------------------------------
1 | package com.example.slidecutlistview;
2 |
3 | public class TestModel {
4 |
5 | private String mTestTitle;
6 | private String mTestDate;
7 |
8 | public String getTestTitle() {
9 | return mTestTitle;
10 | }
11 |
12 | public void setTestTitle(String name) {
13 | this.mTestTitle = name;
14 | }
15 |
16 | public String getTestDate() {
17 | return mTestDate;
18 | }
19 |
20 | public void setTestDate(String date) {
21 | this.mTestDate = date;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------