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

Commit b56ea7e9 authored by Jason Chiu's avatar Jason Chiu
Browse files

Adjust homepage styles and layouts

- Fine tune the header text size and position
- Fix the header overlapping problem on the homepage and collapsing
  toolbar pages when configuration changes by adding android:id.
- New AppBarScrollingViewBehavior for the homepage to avoid manually
  offsetting the IA
- Correct the formula of counting search box height

Test: robotest, manual
Fixes: 177967923
Fixes: 177968564
Change-Id: Id3ed44f4296fa2a19d6890b009d3881a5c140bbd
parent 5a8b96a2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@
    android:layout_marginTop="@dimen/search_bar_margin"
    android:layout_marginStart="@dimen/search_bar_margin"
    android:layout_marginEnd="@dimen/search_bar_margin"
    android:layout_marginBottom="16dp"
    android:layout_marginBottom="@dimen/search_bar_margin_bottom"
    app:layout_scrollFlags="scroll|enterAlways">

    <com.google.android.material.card.MaterialCardView
+1 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
    android:transitionGroup="true">

    <com.google.android.material.appbar.AppBarLayout
        android:id="@+id/app_bar"
        android:layout_width="match_parent"
        android:layout_height="180dp"
        android:theme="@style/Theme.CollapsingToolbar.Settings">
+2 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@
        android:id="@+id/main_content_scrollable_container"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="com.android.settings.widget.FloatingAppBarScrollingViewBehavior">
        app:layout_behavior="com.android.settings.widget.HomepageAppBarScrollingViewBehavior">

        <LinearLayout
            android:id="@+id/homepage_container"
@@ -53,6 +53,7 @@
    </androidx.core.widget.NestedScrollView>

    <com.google.android.material.appbar.AppBarLayout
        android:id="@+id/app_bar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:touchscreenBlocksFocus="false"
+2 −1
Original line number Diff line number Diff line
@@ -131,6 +131,7 @@

    <!-- Search bar and avatar -->
    <dimen name="search_bar_margin">24dp</dimen>
    <dimen name="search_bar_margin_bottom">16dp</dimen>
    <dimen name="search_bar_height">48dp</dimen>
    <dimen name="search_bar_text_size">16sp</dimen>
    <dimen name="search_bar_card_elevation">2dp</dimen>
@@ -138,7 +139,7 @@
    <dimen name="avatar_length">@dimen/search_bar_height</dimen>

    <!-- Contextual suggestions -->
    <dimen name="suggestion_height">224dp</dimen>
    <dimen name="suggestion_height">232dp</dimen>
    <dimen name="suggestion_padding_horizontal">24dp</dimen>
    <dimen name="suggestion_padding_bottom">8dp</dimen>
    <dimen name="suggestion_button_margin_top">16dp</dimen>
+1 −1
Original line number Diff line number Diff line
@@ -791,7 +791,7 @@
    <style name="ContextualSuggestionText" parent="@android:style/TextAppearance.DeviceDefault">
        <item name="android:layout_width">match_parent</item>
        <item name="android:layout_height">wrap_content</item>
        <item name="android:textSize">32sp</item>
        <item name="android:textSize">36sp</item>
        <item name="android:textColor">?android:attr/textColorPrimary</item>
        <item name="android:fontFamily">@*android:string/config_headlineFontFamilyMedium</item>
    </style>
Loading