Skip to content

Commit fecb6ae

Browse files
committed
lets block Back button to avoid some glitches
1 parent 417deef commit fecb6ae

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

app/src/main/AndroidManifest.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,12 @@
3939

4040
<activity
4141
android:name=".activities.MainActivity"
42+
android:clearTaskOnLaunch="true"
4243
android:configChanges="orientation|keyboardHidden|screenSize"
44+
android:excludeFromRecents="true"
4345
android:exported="true"
46+
android:launchMode="singleTop"
47+
android:noHistory="true"
4448
android:screenOrientation="portrait"
4549
android:theme="@style/LauncherTheme">
4650

app/src/main/kotlin/com/simplemobiletools/launcher/activities/MainActivity.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,8 @@ class MainActivity : SimpleActivity(), FlingListener {
182182
} else if (home_screen_grid.resize_frame.isVisible) {
183183
home_screen_grid.hideResizeLines()
184184
} else {
185-
super.onBackPressed()
185+
// this is a home launcher app, avoid glitching by pressing Back
186+
//super.onBackPressed()
186187
}
187188
}
188189

0 commit comments

Comments
 (0)