Skip to content

Android Swipe Layout

An Android library that adds swipe-to-reveal actions to list and view items.

Stars
12.3k
Forks
2.6k
Licence
MIT
Language
Java
Last update
3.0 years ago
Type
Library

No commits in over a year — check for forks or alternatives before adopting.

What it is

Android Swipe Layout is a Java library for Android apps. It lets you wrap a list item or view so the user can swipe it to reveal hidden buttons or content underneath, such as delete or more-options actions. The README says it is meant to work in many containers, not only ListView, and it offers open, close, and update callbacks.

  • Add a swipe-to-delete action to items in a contact or message list
  • Reveal edit and archive buttons when a user swipes a row sideways
  • Nest swipeable layouts inside other swipeable containers, as the README's goals describe

Great for

  • Android developers adding swipe-to-delete or swipe actions to list rows
  • Developers who want swipe behavior in ListView, GridView, or RecyclerView-style lists
  • Teams that want an MIT-licensed, drop-in component instead of building touch handling by hand

Not ideal for

  • Developers on iOS, web, or other platforms, since this is Android-only (Java)
  • Projects needing a library updated for current Android tooling: the README's dependency examples use old support libraries and the last push was 2023-11-10
  • Beginners with no Android experience, since setup assumes familiarity with Gradle and Android views
Step-by-step guide: how to use Android Swipe LayoutInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Install with a package manager

    You'll need: Android Studio or Gradle build setup for an Android project

    Add dependency in Gradle

    compile "com.daimajia.swipelayout:library:1.2.0@aar"
  2. 2

    Run it

    • Add the library dependency to your Android project's Gradle file.
    • Wrap your list item layout in the SwipeLayout view as described in the wiki usage page.
    • Use the library's internal adapter, as the README instructs, for your list.
    • Attach open, close, or update callbacks if you need to respond to swipe state.
  3. 3

    Get the most out of it

    • Read the wiki usage page for details on configuring swipe direction and behavior
    • Use the callbacks (onOpen, onClose, onUpdate) to coordinate other UI with swipe state
    • Check the README's demo APK link to see the intended effects before integrating

Downloads

Strengths

  • Widely starred (12,344 stars) and MIT licensed, so it is free to use in commercial apps
  • Built to work across list and container types rather than one widget only
  • Provides open, close, and update callbacks for reacting to swipe state

Trade-offs

  • Setup examples in the README use old support library versions (e.g. support-v4 r6, recyclerview-v7 21.0.0), so you may need to adapt dependencies
  • The README is short and points to an external wiki for usage details, which I could not check here
  • Documentation says to use the library's internal adapter instead of your own, which may conflict with existing adapter code

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.