ApplicationPreferencesActivity: properly implement edge-to-edge

This commit is contained in:
adbenitez
2025-11-26 02:41:33 +01:00
parent ef512b0f14
commit ceea00e2cc
2 changed files with 8 additions and 6 deletions
@@ -48,6 +48,7 @@ import org.thoughtcrime.securesms.util.DynamicTheme;
import org.thoughtcrime.securesms.util.IntentUtils;
import org.thoughtcrime.securesms.util.Prefs;
import org.thoughtcrime.securesms.util.ScreenLockUtil;
import org.thoughtcrime.securesms.util.ViewUtil;
/**
* The Activity for application preference display and management.
@@ -77,7 +78,9 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredActionBarA
//noinspection ConstantConditions
this.getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setElevation(0); // TODO: use custom toolbar instead
// add padding to avoid content hidden behind system bars
ViewUtil.applyWindowInsets(findViewById(R.id.fragment));
if (icicle == null) {
initFragment(R.id.fragment, new ApplicationPreferenceFragment());
@@ -1,15 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<RelativeLayout
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="?attr/colorPrimary"
android:fitsSystemWindows="true"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include layout="@layout/status_bar_background"/>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?android:attr/windowBackground"
android:id="@+id/fragment" />
</RelativeLayout>
</FrameLayout>