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

Commit dfaf3bde authored by Daniel Sandler's avatar Daniel Sandler
Browse files

Toward regularizing color & level across battery indicators.

Each of our existing assets is slightly incorrect in some
way: inconsistent pixel jumps from one percent to the next,
inconsistent color change, etc. The only way to get it
perfectly right is to draw it programmatically.

Bug: 8504254 // inconsistent color change threshold
-- previously --
Bug: 3136046 // in Gingerbread
Bug: 3387973 // Honeycomb
Bug: 5070948 // ICS
Change-Id: I6a3e7409ecec55e10328541ecb1e9d54aebdbe96
parent 9955699d
Loading
Loading
Loading
Loading
+2.83 KiB
Loading image diff...
+5 −5
Original line number Diff line number Diff line
@@ -19,14 +19,14 @@
        android:layout_height="match_parent"
        android:layout_gravity="top"
        android:orientation="vertical">
    <ImageView
    <com.android.systemui.BatteryMeterView
            android:id="@+id/image"
            android:layout_marginTop="@dimen/qs_tile_margin_above_icon"
            android:layout_marginBottom="@dimen/qs_tile_margin_below_icon"
            android:layout_width="@dimen/qs_tile_icon_size"
            android:layout_height="@dimen/qs_tile_icon_size"
            android:layout_width="22dp"
            android:layout_height="32dp"
            android:padding="3dp"
            android:layout_gravity="top|center_horizontal"
            android:scaleType="centerInside"
            />
    <TextView
            style="@style/TextAppearance.QuickSettings.TileView"
+2 −1
Original line number Diff line number Diff line
@@ -20,8 +20,9 @@

<com.android.systemui.statusbar.SignalClusterView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_height="wrap_content"
    android:layout_height="match_parent"
    android:layout_width="wrap_content"
    android:gravity="center"
    android:orientation="horizontal"
    >
    <FrameLayout
+6 −4
Original line number Diff line number Diff line
@@ -95,11 +95,13 @@
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    />
                <ImageView
                <!-- battery must be padded below by 1px to match assets -->
                <com.android.systemui.BatteryMeterView
                    android:id="@+id/battery"
                    android:layout_height="wrap_content"
                    android:layout_width="wrap_content"
                    android:paddingStart="4dip"
                    android:layout_height="16dp"
                    android:layout_width="10dp"
                    android:paddingBottom="1px"
                    android:layout_marginStart="4dip"
                    />
            </LinearLayout>
    
+12 −0
Original line number Diff line number Diff line
@@ -40,4 +40,16 @@
        <item>@null</item>
    </array>

    <!-- BatteryMeterView parameters -->
    <array name="batterymeter_color_levels">
        <item>4</item>
        <item>15</item>
        <item>100</item>
    </array>
    <array name="batterymeter_color_values">
        <item>#FFFF0000</item>
        <item>#FFFE6600</item>
        <item>#FF3792B4</item>
    </array>

</resources>
Loading