Reduce sensitivity of swipe-to-archive.
This commit is contained in:
parent
b1c006657a
commit
213517f875
1 changed files with 13 additions and 0 deletions
|
@ -1468,6 +1468,9 @@ public class ConversationListFragment extends MainFragment implements ActionMode
|
|||
private final int archiveColorStart;
|
||||
private final int archiveColorEnd;
|
||||
|
||||
private final float ESCAPE_VELOCITY = ViewUtil.dpToPx(1000);
|
||||
private final float VELOCITY_THRESHOLD = ViewUtil.dpToPx(1000);
|
||||
|
||||
private WeakReference<RecyclerView.ViewHolder> lastTouched;
|
||||
|
||||
ArchiveListenerCallback(@ColorInt int archiveColorStart, @ColorInt int archiveColorEnd) {
|
||||
|
@ -1484,6 +1487,16 @@ public class ConversationListFragment extends MainFragment implements ActionMode
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getSwipeEscapeVelocity(float defaultValue) {
|
||||
return Math.min(ESCAPE_VELOCITY, VELOCITY_THRESHOLD);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getSwipeVelocityThreshold(float defaultValue) {
|
||||
return VELOCITY_THRESHOLD;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSwipeDirs(@NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder) {
|
||||
if (viewHolder.itemView instanceof ConversationListItemAction ||
|
||||
|
|
Loading…
Add table
Reference in a new issue