mirror of https://github.com/M66B/FairEmail.git
Make swipe width dependent on minimum screen size
This commit is contained in:
parent
4d82405ad9
commit
bd5df69465
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue