allow long pressing the home screen only if All Apps fragment isnt shown

This commit is contained in:
tibbi 2022-09-16 20:13:35 +02:00
parent e2a99984f3
commit 9652f4c061
2 changed files with 5 additions and 2 deletions

View File

@ -121,6 +121,10 @@ class MainActivity : SimpleActivity(), FlingListener {
} }
fun homeScreenLongPressed(x: Float, y: Float) { fun homeScreenLongPressed(x: Float, y: Float) {
if (all_apps_fragment.y != mScreenHeight.toFloat()) {
return
}
main_holder.performHapticFeedback() main_holder.performHapticFeedback()
home_screen_popup_menu_anchor.x = x home_screen_popup_menu_anchor.x = x

View File

@ -4,8 +4,7 @@
android:id="@+id/all_apps_holder" android:id="@+id/all_apps_holder"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/all_apps_background" android:background="@drawable/all_apps_background">
android:clickable="true">
<com.qtalk.recyclerviewfastscroller.RecyclerViewFastScroller <com.qtalk.recyclerviewfastscroller.RecyclerViewFastScroller
android:id="@+id/all_apps_fastscroller" android:id="@+id/all_apps_fastscroller"