mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-08 10:03:51 +02:00
Make swipe width dependent on minimum screen size
This commit is contained in:
@@ -30,7 +30,9 @@ public class SwipeListener implements View.OnTouchListener {
|
||||
private final GestureDetector gestureDetector;
|
||||
|
||||
SwipeListener(final Context context, final ISwipeListener listener) {
|
||||
final int width = context.getResources().getDisplayMetrics().widthPixels;
|
||||
final int width = Math.min(
|
||||
context.getResources().getDisplayMetrics().widthPixels,
|
||||
context.getResources().getDisplayMetrics().heightPixels);
|
||||
final int MOVE_THRESHOLD = width / 3;
|
||||
final int SPEED_THRESHOLD = width / 2;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user