This commit is contained in:
lunaticbum 2024-08-14 18:14:44 +09:00
parent ebfe02cf62
commit 65aa8cc833
2 changed files with 11 additions and 4 deletions

View File

@ -39,6 +39,7 @@
android:excludeFromRecents="true" android:excludeFromRecents="true"
android:clearTaskOnLaunch="true" android:clearTaskOnLaunch="true"
android:stateNotNeeded="true" android:stateNotNeeded="true"
android:enableOnBackInvokedCallback="true"
android:largeHeap="true" android:largeHeap="true"
android:hardwareAccelerated="true" android:hardwareAccelerated="true"
android:screenOrientation="nosensor" android:screenOrientation="nosensor"
@ -48,7 +49,7 @@
<activity <activity
android:name=".LauncherActivity" android:name=".LauncherActivity"
android:theme="@style/Theme.LunarLauncher.Starting" android:theme="@style/Theme.LunarLauncher.Starting"
android:launchMode="singleTask" android:launchMode="singleInstance"
android:windowSoftInputMode="adjustResize" android:windowSoftInputMode="adjustResize"
android:exported="true"> android:exported="true">
<intent-filter> <intent-filter>

View File

@ -58,6 +58,7 @@ import rasel.lunar.launcher.helpers.Constants.Companion.widgetHostId
import rasel.lunar.launcher.helpers.UniUtils.Companion.getColorResId import rasel.lunar.launcher.helpers.UniUtils.Companion.getColorResId
import rasel.lunar.launcher.helpers.ViewPagerAdapter import rasel.lunar.launcher.helpers.ViewPagerAdapter
import rasel.lunar.launcher.home.LauncherHome import rasel.lunar.launcher.home.LauncherHome
import rasel.lunar.launcher.utils.BLog
internal class LauncherActivity : AppCompatActivity() { internal class LauncherActivity : AppCompatActivity() {
@ -103,12 +104,17 @@ internal class LauncherActivity : AppCompatActivity() {
appWidgetHost?.stopListening() appWidgetHost?.stopListening()
} }
override fun onResume() { override fun onStart() {
super.onResume() super.onStart()
if (settingsPrefs.getBoolean(KEY_BACK_HOME, false)) viewPager.currentItem = 1 BLog.LOGE("onStart()")
// if (settingsPrefs.getBoolean(KEY_BACK_HOME, false)) viewPager.currentItem = 1
statusBarView() statusBarView()
setBgColor() setBgColor()
} }
override fun onResume() {
super.onResume()
BLog.LOGE("onResume")
}
private fun welcomeDialog() { private fun welcomeDialog() {
getSharedPreferences(PREFS_FIRST_LAUNCH, 0).let { getSharedPreferences(PREFS_FIRST_LAUNCH, 0).let {