Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
PublicAndroidApps
Nebulo
Commits
d1a1eb68
Commit
d1a1eb68
authored
Aug 14, 2019
by
Daniel Wolf
Browse files
Explicitly finish when clicking the back arrow (default behavior re-instantiates MainActivity)
parent
6596cfaa
Pipeline
#5095
passed with stage
in 1 minute and 53 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/com/frostnerd/smokescreen/activity/SettingsActivity.kt
View file @
d1a1eb68
...
...
@@ -3,6 +3,7 @@ package com.frostnerd.smokescreen.activity
import
android.content.Context
import
android.content.Intent
import
android.os.Bundle
import
android.view.MenuItem
import
com.frostnerd.lifecyclemanagement.BaseActivity
import
com.frostnerd.smokescreen.fragment.SettingsFragment
import
com.frostnerd.smokescreen.getPreferences
...
...
@@ -51,6 +52,13 @@ class SettingsActivity : BaseActivity() {
}).
commit
()
}
override
fun
onOptionsItemSelected
(
item
:
MenuItem
):
Boolean
{
return
if
(
item
.
itemId
==
android
.
R
.
id
.
home
)
{
finish
()
true
}
else
super
.
onOptionsItemSelected
(
item
)
}
enum
class
Category
{
GENERAL
,
NOTIFICATION
,
PIN
,
CACHE
,
LOGGING
,
IP
,
NETWORK
,
QUERIES
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment