-
Notifications
You must be signed in to change notification settings - Fork 497
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
## Another drag and swipe library? | ||
|
||
There are a bunch of tutorials, libraries, and examples for implementing “drag & drop” and “swipe-to-dismiss” in Android, using `RecyclerView`. Many of them are still using the old `View.OnDragListener`, and [Roman Nurik’s Swipe-to-Dismiss](https://github.com/romannurik/Android-SwipeToDismiss) approach, even though there are newer (and better) methods available. A few of these solutions use the newer APIs, but often rely on `GestureDetector` and `onInterceptTouchEvent`, or the implementation is overly complex. There’s actually a really simple way to add these features to RecyclerView, and it’s part of the Android Support Library: [ItemTouchHelper](https://developer.android.com/reference/android/support/v7/widget/helper/ItemTouchHelper.html). | ||
|
||
This project is an example of basic drag and swipe using `ItemTouchHelper`. It corresponds with a soon-to-be-published article series exploring the approach. | ||
|
||
The classes in `co.paulburke.android.itemtouchhelperdemo.helper` can easily be used in other projects. | ||
|
||
Download the apk from [releases](https://github.com/ipaulpro/Android-ItemTouchHelper-Demo/releases). | ||
|
||
## Credits | ||
|
||
Developed by Paul Burke ([iPaulPro](https://github.com/iPaulPro)) - [paulburke.co](http://paulburke.co/) | ||
|
||
## License | ||
|
||
Copyright (C) 2015 Paul Burke | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. |