finds.dev← search

// the find

romannurik/Android-SwipeToDismiss

★ 1,272 · Java · Apache-2.0 · updated Mar 2017

Android swipe-to-dismiss mini-library and sample code

Sample code from 2012 showing how to add swipe-to-dismiss behavior to ListView and arbitrary views on Android. This is a historical reference, not a library — the author explicitly badges it as unmaintained.

The touch listener implementation is clean and well-structured for its era; separating SwipeDismissTouchListener (generic view) from SwipeDismissListViewTouchListener (ListView-aware) was the right split. Roman Nurik wrote this while at Google, so the interaction math — velocity thresholds, translation animations — was informed by the Android UX team's own guidelines.

Abandoned in 2017 and predates RecyclerView by years — the ListView-specific code is dead weight in any modern project. ItemTouchHelper shipped in RecyclerView 1.0 and handles this natively; there is no reason to adopt this. No Gradle build file, no Maven artifact, no tests — this was always sample code, not a library. The Google+ discussion link in the README 404s since Google+ was shut down.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →