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

Commit 0a03f8e2 authored by ykhung's avatar ykhung
Browse files

Add new battery usage design required string and dimesions

Bug: 183921876
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: I82fed0a38168aba47e8267ab4a5fa072d54dce67
parent 75020d83
Loading
Loading
Loading
Loading
+42 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:settings="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingStart="?android:attr/listPreferredItemPaddingEnd"
    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
    android:orientation="vertical">

    <TextView
        android:id="@+id/chart_summary"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="45dp"
        android:textAppearance="?android:attr/textAppearanceSmall"
        settings:textColor="?android:attr/textColorSecondary"
        android:text="@string/battery_usage_chart_graph_hint" />

    <com.android.settings.fuelgauge.BatteryChartView
        android:id="@+id/battery_chart"
        android:layout_width="match_parent"
        android:layout_height="151dp"
        android:layout_marginBottom="16dp"
        android:textAppearance="?android:attr/textAppearanceSmall"
        settings:textColor="?android:attr/textColorSecondary" />

</LinearLayout>
+7 −0
Original line number Diff line number Diff line
@@ -446,4 +446,11 @@

    <!--  Choose SIM Activity dimens  -->
    <dimen name="subtitle_bottom_padding">24dp</dimen>

    <!-- Battery usage chart view component -->
    <dimen name="chartview_divider_width">1dp</dimen>
    <dimen name="chartview_divider_height">4dp</dimen>
    <dimen name="chartview_trapezoid_radius">2dp</dimen>
    <dimen name="chartview_trapezoid_margin_start">1dp</dimen>
    <dimen name="chartview_trapezoid_margin_bottom">2dp</dimen>
</resources>
+15 −0
Original line number Diff line number Diff line
@@ -6348,6 +6348,21 @@
    <!-- [CHAR_LIMIT=NONE] Battery percentage: Description for preference -->
    <string name="battery_percentage_description">Show battery percentage in status bar</string>
    <!-- [CHAR_LIMIT=NONE] Battery usage main screen chart graph hint -->
    <string name="battery_usage_chart_graph_hint">Battery level for past 24 hr</string>
    <!-- [CHAR_LIMIT=NONE] Battery app usage section header for past 24 hour -->
    <string name="battery_app_usage_for_past_24">App usage for past 24 hr</string>
    <!-- [CHAR_LIMIT=NONE] Battery system usage section header for past 24 hour -->
    <string name="battery_system_usage_for_past_24">System usage for past 24 hr</string>
    <!-- [CHAR_LIMIT=NONE] Battery system usage section header -->
    <string name="battery_system_usage_for">System usage for</string>
    <!-- [CHAR_LIMIT=NONE] Battery app usage section header -->
    <string name="battery_app_usage_for">App usage for</string>
    <!-- [CHAR_LIMIT=NONE] Battery usage section header for a specific time slot -->
    <string name="battery_usage_time_am">am</string>
    <!-- [CHAR_LIMIT=NONE] Battery usage section header for a specific time slot -->
    <string name="battery_usage_time_pm">pm</string>
    <!-- Process Stats strings -->
    <skip />