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

Commit 3f48f46d authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Update QS header to spec

- Move brightness slider down.
- Make clock bigger when expanded.
- Show date in collapsed state.
- Change size of avatar depending on collapsed/expanded.

Bug: 15865202
Bug: 15381387
Change-Id: I7894edae495b5a2d12b4fe4637a9aa3fd2e58963
parent 6752cba4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
        android:layout_height="wrap_content"
        android:background="@drawable/qs_panel_background"
        android:elevation="2dp">

    <com.android.systemui.qs.QSPanel
            android:id="@+id/quick_settings_panel"
            android:background="#0000"
+22 −24
Original line number Diff line number Diff line
@@ -31,24 +31,23 @@
    android:focusable="true"
    >

    <View android:id="@+id/header_spacer"
        android:layout_height="8dp"
        android:layout_width="0dp" />

    <com.android.systemui.statusbar.phone.MultiUserSwitch android:id="@+id/multi_user_switch"
        android:layout_width="40dp"
        android:layout_width="@dimen/multi_user_switch_width_collapsed"
        android:layout_height="@dimen/status_bar_header_height"
        android:layout_alignParentEnd="true"
        android:background="@drawable/ripple_drawable"
        android:scaleType="centerInside"
        android:padding="8dp"/>
        android:background="@drawable/ripple_drawable">
        <ImageView android:id="@+id/multi_user_avatar"
            android:layout_width="24dp"
            android:layout_height="24dp"
            android:layout_gravity="center"
            android:scaleType="centerInside"/>
    </com.android.systemui.statusbar.phone.MultiUserSwitch>

    <ImageButton android:id="@+id/settings_button"
        style="@android:style/Widget.Material.Button.Borderless"
        android:layout_toStartOf="@id/multi_user_switch"
        android:layout_width="48dp"
        android:layout_height="@dimen/status_bar_header_height"
        android:layout_marginRight="4dp"
        android:background="@drawable/ripple_drawable"
        android:src="@drawable/ic_settings_24dp"
        android:contentDescription="@string/accessibility_desc_quick_settings"/>
@@ -77,26 +76,23 @@

    <TextView
        android:id="@+id/header_emergency_calls_only"
        android:layout_height="wrap_content"
        android:layout_height="@dimen/status_bar_header_height"
        android:layout_width="wrap_content"
        android:layout_below="@id/header_spacer"
        android:layout_alignParentStart="true"
        android:layout_toStartOf="@id/system_icons_super_container"
        android:paddingTop="12dp"
        android:paddingStart="16dp"
        android:paddingEnd="16dp"
        android:visibility="gone"
        android:textAppearance="@style/TextAppearance.StatusBar.Expanded.EmergencyCallsOnly"
        android:text="@*android:string/emergency_calls_only" />
        android:text="@*android:string/emergency_calls_only"
        android:gravity="center_vertical" />

    <RelativeLayout
        android:id="@+id/datetime"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="start"
        android:layout_below="@id/header_emergency_calls_only"
        android:paddingTop="8dp"
        android:paddingBottom="16dp"
        android:paddingTop="4dp"
        android:paddingStart="16dp"
        android:paddingEnd="16dp"
        android:background="?android:attr/selectableItemBackground"
@@ -111,12 +107,21 @@
            systemui:amPmStyle="normal"
            />

        <com.android.systemui.statusbar.policy.DateView android:id="@+id/date"
        <com.android.systemui.statusbar.policy.DateView android:id="@+id/date_collapsed"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:singleLine="true"
            android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date"
            android:layout_below="@id/clock"
            />

        <com.android.systemui.statusbar.policy.DateView android:id="@+id/date_expanded"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:singleLine="true"
            android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date"
            android:layout_below="@id/clock"
            systemui:datePattern="eeeeMMMMd"
            />
    </RelativeLayout>
    <com.android.keyguard.CarrierText
@@ -138,13 +143,6 @@
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        />
    <include
        android:id="@+id/brightness_container"
        layout="@layout/quick_settings_brightness_dialog"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        />

    <TextView
        android:id="@+id/header_debug_info"
+3 −0
Original line number Diff line number Diff line
@@ -59,5 +59,8 @@
        <attr name="activeFrameColor" format="color" />
        <attr name="frameColor" />
    </declare-styleable>
    <declare-styleable name="DateView">
        <attr name="datePattern" format="string" />
    </declare-styleable>
</resources>
+23 −2
Original line number Diff line number Diff line
@@ -128,10 +128,10 @@
    <dimen name="close_handle_underlap">32dp</dimen>

    <!-- Height of the status bar header bar -->
    <dimen name="status_bar_header_height">56dp</dimen>
    <dimen name="status_bar_header_height">60dp</dimen>

    <!-- Height of the status bar header bar when expanded -->
    <dimen name="status_bar_header_height_expanded">144dp</dimen>
    <dimen name="status_bar_header_height_expanded">116dp</dimen>

    <!-- Height of the status bar header bar when on Keyguard -->
    <dimen name="status_bar_header_height_keyguard">40dp</dimen>
@@ -320,6 +320,12 @@
    <!-- end margin for multi user switch in expanded quick settings -->
    <dimen name="multi_user_switch_expanded_margin">8dp</dimen>

    <!-- end margin for multi user switch in collapsed quick settings -->
    <dimen name="multi_user_switch_collapsed_margin">13dp</dimen>

    <!-- end margin for multi user switch in collapsed quick settings -->
    <dimen name="multi_user_switch_keyguard_margin">3dp</dimen>

    <!-- end margin for system icons if multi user switch is hidden -->
    <dimen name="system_icons_switcher_hidden_expanded_margin">16dp</dimen>

@@ -327,4 +333,19 @@
    <dimen name="keyguard_user_switcher_border_thickness">2dp</dimen>

    <dimen name="data_usage_graph_marker_width">4dp</dimen>

    <!-- The padding bottom of the clock group when QS is expanded. -->
    <dimen name="clock_expanded_bottom_margin">20dp</dimen>

    <!-- The width of the multi user switch on keyguard and collapsed QS header. -->
    <dimen name="multi_user_switch_width_collapsed">34dp</dimen>

    <!-- The width of the multi user switch in expanded QS header. -->
    <dimen name="multi_user_switch_width_expanded">48dp</dimen>

    <!-- The width of user avatar when collapsed -->
    <dimen name="multi_user_avatar_collapsed_size">22dp</dimen>

    <!-- The font size of the time when collapsed in QS -->
    <dimen name="qs_time_collapsed_size">14sp</dimen>
</resources>
+5 −5
Original line number Diff line number Diff line
@@ -70,21 +70,21 @@
    <style name="TextAppearance.StatusBar.Expanded" parent="@*android:style/TextAppearance.StatusBar" />

    <style name="TextAppearance.StatusBar.Expanded.Clock">
        <item name="android:textSize">16dp</item>
        <item name="android:textStyle">normal</item>
        <item name="android:textSize">20sp</item>
        <item name="android:fontFamily">sans-serif-medium</item>
        <item name="android:textColor">#ffffff</item>
    </style>

    <style name="TextAppearance.StatusBar.Expanded.Date">
        <item name="android:textSize">14dp</item>
        <item name="android:textSize">14sp</item>
        <item name="android:textStyle">normal</item>
        <item name="android:textColor">#99ffffff</item>
        <item name="android:textColor">#b2ffffff</item>
    </style>

    <style name="TextAppearance.StatusBar.Expanded.AboveDateTime">
        <item name="android:textSize">12dp</item>
        <item name="android:textStyle">normal</item>
        <item name="android:textColor">#99ffffff</item>
        <item name="android:textColor">#66ffffff</item>
    </style>

    <style name="TextAppearance.StatusBar.Expanded.EmergencyCallsOnly"
Loading