diff --git a/gpslogger/src/main/java/com/mendhak/gpslogger/MainPreferenceActivity.java b/gpslogger/src/main/java/com/mendhak/gpslogger/MainPreferenceActivity.java index 498137e7b..4670caec1 100644 --- a/gpslogger/src/main/java/com/mendhak/gpslogger/MainPreferenceActivity.java +++ b/gpslogger/src/main/java/com/mendhak/gpslogger/MainPreferenceActivity.java @@ -51,7 +51,7 @@ protected void onCreate(Bundle savedInstanceState) { Systems.setLocale(PreferenceHelper.getInstance().getUserSpecifiedLocale(),getBaseContext(),getResources()); setContentView(R.layout.activity_preferences); - ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.toolbar), (v, windowInsets) -> { + ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.preference_activity_layout), (v, windowInsets) -> { Insets insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars() | WindowInsetsCompat.Type.displayCutout()); // Apply the insets as a margin to the view so it doesn't overlap with status bar @@ -67,7 +67,7 @@ protected void onCreate(Bundle savedInstanceState) { // Return CONSUMED if you don't want want the window insets to keep passing // down to descendant views. - return WindowInsetsCompat.CONSUMED; + return windowInsets; }); Toolbar toolbar = (Toolbar)findViewById(R.id.toolbar); diff --git a/gpslogger/src/main/res/layout/activity_preferences.xml b/gpslogger/src/main/res/layout/activity_preferences.xml index f014317ce..43bd8186e 100644 --- a/gpslogger/src/main/res/layout/activity_preferences.xml +++ b/gpslogger/src/main/res/layout/activity_preferences.xml @@ -1,6 +1,7 @@