Skip to content

Commit

Permalink
fix(platform): Fix edge to edge glitch in SettingsActivity
Browse files Browse the repository at this point in the history
Refs: #1713

Signed-off-by: Stefan Niedermann <[email protected]>
  • Loading branch information
stefan-niedermann committed Jan 3, 2025
1 parent 03dd71e commit 1ec320b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ protected void onDestroy() {
public void applyTheme(int color) {
final var utils = ThemeUtils.of(color, this);

utils.platform.themeStatusBar(this);
utils.material.themeToolbar(binding.toolbar);
utils.deck.themeStatusBar(this, binding.appBarLayout);
}

@NonNull
Expand Down
34 changes: 25 additions & 9 deletions app/src/main/res/layout/activity_settings.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:navigationIcon="@drawable/ic_arrow_back_24dp"
app:title="@string/simple_settings" />
android:fitsSystemWindows="true">

<androidx.fragment.app.FragmentContainerView
android:id="@+id/settingsFragment"
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
app:navigationIcon="@drawable/ic_arrow_back_24dp"
app:title="@string/simple_settings" />

</com.google.android.material.appbar.AppBarLayout>


<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">

<androidx.fragment.app.FragmentContainerView
android:id="@+id/settingsFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</androidx.core.widget.NestedScrollView>

</LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

0 comments on commit 1ec320b

Please sign in to comment.