diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 54c7295df1..4f40d65323 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -63,8 +63,7 @@
-
+
diff --git a/app/src/main/java/info/nightscout/androidaps/activities/PreferencesActivity.kt b/app/src/main/java/info/nightscout/androidaps/activities/PreferencesActivity.kt
index 0b87fb461e..ed149949a0 100644
--- a/app/src/main/java/info/nightscout/androidaps/activities/PreferencesActivity.kt
+++ b/app/src/main/java/info/nightscout/androidaps/activities/PreferencesActivity.kt
@@ -4,6 +4,7 @@ import android.content.Context
import android.os.Bundle
import android.text.Editable
import android.text.TextWatcher
+import android.view.MenuItem
import androidx.preference.PreferenceFragmentCompat
import androidx.preference.PreferenceScreen
import info.nightscout.androidaps.R
@@ -62,4 +63,14 @@ class PreferencesActivity : NoSplashAppCompatActivity(), PreferenceFragmentCompa
private fun filterPreferences() {
myPreferenceFragment?.setFilter(binding.prefFilter.text.toString())
}
+
+ override fun onOptionsItemSelected(item: MenuItem): Boolean {
+ when (item.getItemId()) {
+ android.R.id.home -> {
+ onBackPressed()
+ return true
+ }
+ }
+ return super.onOptionsItemSelected(item)
+ }
}
\ No newline at end of file