Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 530bee33 authored by Jason Chiu's avatar Jason Chiu
Browse files

Fix the scrolling problems in homepage

- Remove the deprecated API and parameter usages of setting system ui
  visibility, which make the app bar scrolling behavior abnormal when
  the navigation bar is enabled.
- Remove the duplicate navigationBarColor of the homepage theme since
  Theme.Settings has configured it.
- Remove the unused scroll flags in search bar layout since its parent
  is no longer AppBarLayout.

Test: visual, robotest
Fixes: 178497625
Fixes: 179122861
Change-Id: I91537cff4f3d98e4bc31e6e42d23895df312fbd4
parent 595a2506
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -17,14 +17,12 @@

<LinearLayout
    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="wrap_content"
    android:layout_marginTop="@dimen/search_bar_margin"
    android:layout_marginStart="@dimen/search_bar_margin"
    android:layout_marginEnd="@dimen/search_bar_margin"
    android:layout_marginBottom="@dimen/search_bar_margin_bottom"
    app:layout_scrollFlags="scroll|enterAlways">
    android:layout_marginBottom="@dimen/search_bar_margin_bottom">

    <com.google.android.material.card.MaterialCardView
        android:id="@+id/search_bar"
+0 −1
Original line number Diff line number Diff line
@@ -221,7 +221,6 @@
        <item name="colorPrimaryDark">@*android:color/primary_dark_device_default_settings_light</item>
        <item name="android:windowLightStatusBar">true</item>
        <item name="android:navigationBarDividerColor">@*android:color/ripple_material_light</item>
        <item name="android:navigationBarColor">@android:color/transparent</item>
    </style>

    <style name="Theme.Settings.ContextualCard" parent="Theme.Settings.Home">
+0 −4
Original line number Diff line number Diff line
@@ -46,11 +46,7 @@ public class SettingsHomepageActivity extends FragmentActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.settings_homepage_container);
        final View root = findViewById(R.id.settings_homepage_container);
        root.setSystemUiVisibility(
                View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);

        final View appBar = findViewById(R.id.app_bar_container);
        appBar.setMinimumHeight(getSearchBoxHeight());