by xcodebuild

A very easy-to-use and non-intrusive implement of Swipe to dismiss for RecyclerView.

430 Stars 90 Forks Last release: about 4 years ago (v1.1.3) BSD 2-Clause "Simplified" License 35 Commits 5 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

Android Arsenal BSD Jitpack Build Status


A very easy-to-use and non-intrusive implement of Swipe to dismiss for RecyclerView.



How to use

  • Add these lines to your
repositories {
    maven {
        url ""

dependencies { compile 'com.github.CodeFalling:RecyclerViewSwipeDismiss:v1.1.3' }

  • Build
    and bind it to your
SwipeDismissRecyclerViewTouchListener listener = new SwipeDismissRecyclerViewTouchListener.Builder(
        new SwipeDismissRecyclerViewTouchListener.DismissCallbacks() {
            public boolean canDismiss(int position) {
                return true;

        public void onDismiss(View view) {
            // Do what you want when dismiss

            new SwipeDismissRecyclerViewTouchListener.OnItemTouchCallBack() {
                public void onTouch(int index) {
                    // Do what you want when item be touched
    .setItemClickCallback(new SwipeDismissRecyclerViewTouchListener.OnItemClickCallBack() {
                public void onClick(int position) {
                    // Do what you want when item be clicked                    }
    .setBackgroundId(R.drawable.bg_item_normal, R.drawable.bg_item_selected)



  • setIsVertical(false)
    means allow swipe in horizontal direction
  • listener.setEnabled(false)
    can disable swipe to dismiss
  • onTouch
    will be called when MOUSE_UP on item without swipe
  • onClick
    will be called when ACTION_UP on item within 1 second and move no more than a fixed distance
  • By use

    , you can set background id for item's normal and pressed state, just like the normal effect in RecyclerView


You can see sample code in


We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.