profile list: start drag action immediately upon touch of the handle
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Wed, 27 Feb 2019 20:28:20 +0000 (22:28 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Wed, 27 Feb 2019 20:28:20 +0000 (22:28 +0200)
app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfilesRecyclerViewAdapter.java

index 136f6c9..013fa19 100644 (file)
@@ -142,6 +142,11 @@ public class ProfilesRecyclerViewAdapter
             final boolean sameProfile = currentProfile.equals(myProfile);
             view.setAlpha(sameProfile ? 1 : 0.5f);
         });
+
+        holder.mRearrangeHandle.setOnTouchListener((v, event) -> {
+            rearrangeHelper.startDrag(holder);
+            return true;
+        });
         return holder;
     }
     @Override