A simple example project which shows you how you can setup a RecyclerView to make your items collapse when you swipe them.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
app
gradle/wrapper
.gitignore
README.md
build.gradle
gradle.properties
gradlew
gradlew.bat
settings.gradle

README.md

Android Swipe Collapse Animation (Java)

A simple example project which shows you how you can setup a RecyclerView to make your items collapse when you swipe them.

Blog post with more exaplanation can be found on my blog: Click here to view the blog post

Result

Versions

The example is broken down into 5 separate versions so it's easier to follow all the features.

V1 Setup RecyclerView with CustomAdapter, using a POJO called Item

V2 Make items swipeable

V3 Add colored background and icons to the swiped items

V4 Make items collapse after swiping them

V5 An example on how to setup a custom listener which fires after the animation finished