From 37dedae951d579ac5516cb1697d8cdf293966d2e Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 22 Aug 2022 22:25:52 +0200 Subject: [PATCH] hide all_apps_fragment by default, show once below screen --- .../com/simplemobiletools/launcher/activities/MainActivity.kt | 2 ++ app/src/main/res/layout/activity_main.xml | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) 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 1c56d98..19add4d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/launcher/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/launcher/activities/MainActivity.kt @@ -9,6 +9,7 @@ import android.view.MotionEvent import android.view.animation.DecelerateInterpolator import androidx.core.view.GestureDetectorCompat import com.simplemobiletools.commons.extensions.appLaunched +import com.simplemobiletools.commons.extensions.beVisible import com.simplemobiletools.commons.extensions.realScreenSize import com.simplemobiletools.launcher.BuildConfig import com.simplemobiletools.launcher.R @@ -37,6 +38,7 @@ class MainActivity : SimpleActivity(), FlingListener { mScreenHeight = realScreenSize.y mCurrentFragmentY = mScreenHeight all_apps_fragment.y = mScreenHeight.toFloat() + all_apps_fragment.beVisible() } override fun onResume() { diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 97be365..fb1b81e 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -6,6 +6,7 @@ + layout="@layout/all_apps_fragment" + android:visibility="gone" />