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

Commit 853b070f authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Add % for battery in expanded QS; make it clickable

Also removes the "xx minutes until full" label in expanded QS.

Bug: 15392950
Bug: 15863237
Change-Id: I41e85a9ffeb3cba31b58769f8faee9147a3b031e
parent eb2263dd
Loading
Loading
Loading
Loading
+4 −12
Original line number Diff line number Diff line
@@ -15,15 +15,7 @@
  ~ limitations under the License
  -->

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_pressed="true">
        <shape>
            <solid android:color="@color/background_color_1_press" />
        </shape>
    </item>
    <item>
        <shape>
            <solid android:color="@color/background_color_1" />
        </shape>
    </item>
</selector>
 No newline at end of file
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
    android:color="?android:attr/colorControlHighlight" >
    <item android:drawable="@color/system_secondary_color"/>
</ripple>
 No newline at end of file
+42 −48
Original line number Diff line number Diff line
@@ -26,37 +26,20 @@
    android:paddingEnd="@dimen/notification_side_padding"
    android:baselineAligned="false"
    android:elevation="4dp"
    >

    <View
        android:id="@+id/background"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
    android:background="@drawable/notification_header_bg"
    android:clickable="true"
        />
    android:focusable="true"
    >

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

    <TextView
        android:id="@+id/header_emergency_calls_only"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:layout_below="@id/header_spacer"
        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" />

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

@@ -65,33 +48,46 @@
        android:layout_toStartOf="@id/multi_user_switch"
        android:layout_width="48dp"
        android:layout_height="@dimen/status_bar_header_height"
        android:layout_marginStart="8dp"
        android:layout_marginRight="4dp"
        android:background="@drawable/ripple_drawable"
        android:src="@drawable/ic_settings_24dp"
        android:contentDescription="@string/accessibility_desc_quick_settings"/>

    <FrameLayout android:id="@+id/system_icons_super_container"
    <LinearLayout android:id="@+id/system_icons_super_container"
        android:layout_width="wrap_content"
        android:layout_height="@dimen/status_bar_header_height"
        android:layout_toStartOf="@id/multi_user_switch"
        android:layout_alignWithParentIfMissing="true"
        android:layout_marginStart="16dp"
        android:background="@drawable/ripple_drawable"
        android:paddingEnd="2dp">
        <FrameLayout android:id="@+id/system_icons_container"
            android:layout_width="wrap_content"
            android:layout_height="@dimen/status_bar_height"
            android:layout_gravity="center_vertical"/>
    </FrameLayout>
        <TextView android:id="@+id/battery_level"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:layout_marginStart="8dp"
            android:paddingEnd="4dp"
            android:textColor="#ffffff"
            android:textSize="12sp"/>
    </LinearLayout>

    <TextView
        android:id="@+id/header_charging_info"
        android:layout_width="wrap_content"
        android:id="@+id/header_emergency_calls_only"
        android:layout_height="wrap_content"
        android:layout_toEndOf="@id/system_icons_super_container"
        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:paddingStart="4dp"
        style="@style/TextAppearance.StatusBar.Expanded.ChargingInfo"/>
        android:visibility="gone"
        android:textAppearance="@style/TextAppearance.StatusBar.Expanded.EmergencyCallsOnly"
        android:text="@*android:string/emergency_calls_only" />

    <RelativeLayout
        android:id="@+id/datetime"
@@ -103,7 +99,7 @@
        android:paddingBottom="16dp"
        android:paddingStart="16dp"
        android:paddingEnd="16dp"
        android:background="@drawable/ic_notify_button_bg"
        android:background="?android:attr/selectableItemBackground"
        android:enabled="false"
        >
        <com.android.systemui.statusbar.policy.Clock
@@ -128,14 +124,13 @@
        android:layout_width="match_parent"
        android:layout_height="@dimen/status_bar_header_height_keyguard"
        android:layout_marginLeft="16dp"
        android:layout_toStartOf="@id/system_icons_container"
        android:layout_toStartOf="@id/system_icons_super_container"
        android:gravity="center_vertical"
        android:ellipsize="marquee"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:textColor="#ffffff"
        android:singleLine="true" />


    <include
        android:id="@+id/qs_detail_header"
        layout="@layout/qs_detail_header"
@@ -151,7 +146,6 @@
        android:layout_alignParentBottom="true"
        />


    <TextView
        android:id="@+id/header_debug_info"
        android:visibility="invisible"
+1 −6
Original line number Diff line number Diff line
@@ -80,12 +80,7 @@
    <color name="notification_ripple_tinted_color">#30ffffff</color>

    <!-- The color of the circle around the primary user in the user switcher -->
    <color name="current_user_border_color">@color/primary_color</color>

    <!-- Our material color palette (deep teal) -->
    <color name="primary_color">#ff7fcac3</color>
    <color name="background_color_1">#ff384248</color>
    <color name="background_color_1_press">#ff54656e</color>
    <color name="current_user_border_color">@color/system_accent_color</color>

    <color name="segmented_button_selected">#ff3d4549</color><!-- #33afbdc4 = 20% #afbdc4 = #ff3d4549 composite -->
    <color name="segmented_button_background">#ff21272b</color>
+3 −0
Original line number Diff line number Diff line
@@ -654,4 +654,7 @@

    <!-- Battery saver notification action text. [CHAR LIMIT=60] -->
    <string name="battery_saver_notification_action_text">Open battery saver settings</string>

    <!-- Battery level for expanded quick settings [CHAR LIMIT=2] -->
    <string name="battery_level_template"><xliff:g id="level" example="45">%d</xliff:g>%%</string>
</resources>
+1 −1
Original line number Diff line number Diff line
@@ -233,7 +233,7 @@
    </style>

    <style name="systemui_theme" parent="@android:style/Theme.DeviceDefault">
        <item name="android:colorPrimary">@color/primary_color</item>
        <item name="android:colorPrimary">@color/system_primary_color</item>
        <item name="android:colorControlActivated">@color/system_accent_color</item>
    </style>

Loading