diff --git a/CHANGELOG.md b/CHANGELOG.md index aa37163ac..bf079e14c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## v1.2.1 (2020-11-17) + +Changes: + +- Fix home screen swiping triggering during vertical swipes too + ## v1.2.0 (2020-11-17) Changes: diff --git a/app/src/main/java/protect/card_locker/MainActivity.java b/app/src/main/java/protect/card_locker/MainActivity.java index c9a20cc0e..c76638db5 100644 --- a/app/src/main/java/protect/card_locker/MainActivity.java +++ b/app/src/main/java/protect/card_locker/MainActivity.java @@ -536,6 +536,11 @@ public class MainActivity extends AppCompatActivity implements GestureDetector.O public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { Log.d(TAG, "On fling"); + // Don't swipe if we have too much vertical movement + if (Math.abs(velocityY) > (0.75 * Math.abs(velocityX))) { + return false; + } + TabLayout groupsTabLayout = findViewById(R.id.groups); if (groupsTabLayout.getTabCount() < 2) { return false;