From 9652f4c0619db16142c930eb9cc35bfe45a37360 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 16 Sep 2022 20:13:35 +0200 Subject: [PATCH] allow long pressing the home screen only if All Apps fragment isnt shown --- .../com/simplemobiletools/launcher/activities/MainActivity.kt | 4 ++++ app/src/main/res/layout/all_apps_fragment.xml | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/launcher/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/launcher/activities/MainActivity.kt index 00355bd..94e3875 100644 --- a/app/src/main/kotlin/com/simplemobiletools/launcher/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/launcher/activities/MainActivity.kt @@ -121,6 +121,10 @@ class MainActivity : SimpleActivity(), FlingListener { } fun homeScreenLongPressed(x: Float, y: Float) { + if (all_apps_fragment.y != mScreenHeight.toFloat()) { + return + } + main_holder.performHapticFeedback() home_screen_popup_menu_anchor.x = x diff --git a/app/src/main/res/layout/all_apps_fragment.xml b/app/src/main/res/layout/all_apps_fragment.xml index bdb35be..ed4f2c9 100644 --- a/app/src/main/res/layout/all_apps_fragment.xml +++ b/app/src/main/res/layout/all_apps_fragment.xml @@ -4,8 +4,7 @@ android:id="@+id/all_apps_holder" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@drawable/all_apps_background" - android:clickable="true"> + android:background="@drawable/all_apps_background">