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

Commit a5d7dd9c authored by Jason Monk's avatar Jason Monk
Browse files

Fixes and changes to support settings using UsageView

Bug: 27213136
Change-Id: I1796d710379fc92cf21b196459f34dda4570355f
parent af11ff0c
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -17,10 +17,10 @@
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingEnd="@dimen/usage_graph_padding_end"
    android:orientation="vertical">

    <LinearLayout
        android:id="@+id/graph_label_group"
        android:layout_width="match_parent"
        android:layout_height="@dimen/usage_graph_area_height"
        android:orientation="horizontal"
@@ -28,9 +28,9 @@
        android:clipToPadding="false">

        <LinearLayout
            android:id="@+id/label_group"
            android:layout_width="@dimen/usage_graph_labels_width"
            android:layout_height="match_parent"
            android:paddingStart="@dimen/usage_graph_labels_padding"
            android:orientation="vertical">

            <include android:id="@+id/label_top"
@@ -65,6 +65,7 @@
    </LinearLayout>

    <LinearLayout
        android:id="@+id/bottom_label_group"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingStart="@dimen/usage_graph_labels_width"
+1 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@
        <attr name="sideLabels" format="reference" />
        <attr name="bottomLabels" format="reference" />
        <attr name="textColor" format="color" />
        <attr name="android:gravity" />
    </declare-styleable>

</resources>
+1 −2
Original line number Diff line number Diff line
@@ -41,8 +41,7 @@
    <!-- Usage graph dimens -->
    <dimen name="usage_graph_area_height">122dp</dimen>
    <dimen name="usage_graph_margin_top_bottom">9dp</dimen>
    <dimen name="usage_graph_padding_end">24dp</dimen>
    <dimen name="usage_graph_labels_width">72dp</dimen>
    <dimen name="usage_graph_labels_width">56dp</dimen>
    <dimen name="usage_graph_labels_padding">16dp</dimen>

    <dimen name="usage_graph_divider_size">1dp</dimen>
+1 −1
Original line number Diff line number Diff line
@@ -733,7 +733,7 @@
    <string name="daltonizer_type_overridden">Overridden by <xliff:g id="title" example="Simulate color space">%1$s</xliff:g></string>

    <!-- [CHAR_LIMIT=40] Label for estimated remaining duration of battery charging/discharging -->
    <string name="power_remaining_duration_only">Approx. <xliff:g id="time">%2$s</xliff:g> left</string>
    <string name="power_remaining_duration_only">Approx. <xliff:g id="time">%1$s</xliff:g> left</string>

    <!-- [CHAR_LIMIT=40] Label for battery level chart when discharging with duration -->
    <string name="power_discharging_duration"><xliff:g id="level">%1$s</xliff:g>
+1 −1
Original line number Diff line number Diff line
@@ -149,7 +149,7 @@ public class BatteryInfo {
        String remaining = "";
        if (remainingTimeUs != 0) {
            remaining = context.getString(R.string.remaining_length_format,
                    Formatter.formatShortElapsedTime(context, remainingTimeUs));
                    Formatter.formatShortElapsedTime(context, remainingTimeUs / 1000));
        }
        view.setBottomLabels(new CharSequence[] { timeString, remaining});

Loading