Battery chart fixes.
When there is no data to show, don't make a crazy collapsed chart. Also avoid re-creating the chart when scrolling. And fix various other things. Change-Id: Ia1895bc7c46e6d830e66f66e66f17726e1e23e3f
This commit is contained in:
@@ -75,6 +75,21 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/messages"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/messages_title"
|
||||
style="?android:attr/listSeparatorTextViewStyle"
|
||||
android:layout_marginTop="6dip" />
|
||||
|
||||
<!-- Messages go here ... -->
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/packages_section_title"
|
||||
style="?android:attr/listSeparatorTextViewStyle"
|
||||
|
||||
27
res/layout/power_usage_message_item.xml
Normal file
27
res/layout/power_usage_message_item.xml
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2014 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.
|
||||
-->
|
||||
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/message"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dip"
|
||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
||||
android:paddingStart="4dip"
|
||||
android:paddingEnd="?android:attr/scrollbarSize"
|
||||
android:paddingBottom="4dip"
|
||||
android:ellipsize="marquee"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
@@ -14,18 +14,13 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<RelativeLayout
|
||||
<TextView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<!--Label for the item-->
|
||||
<TextView
|
||||
android:id="@+id/label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:singleLine="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginBottom="2dip"
|
||||
android:layout_marginTop="2dip" />
|
||||
</RelativeLayout>
|
||||
android:id="@+id/label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:singleLine="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginBottom="2dip"
|
||||
android:layout_marginTop="2dip" />
|
||||
|
||||
@@ -3876,12 +3876,11 @@
|
||||
<string name="usage_type_no_coverage">Time without a signal</string>
|
||||
<!-- Label for the total power capacity of the device's battery -->
|
||||
<string name="usage_type_total_battery_capacity">Total battery capacity</string>
|
||||
<!-- Label for amount of power use that was computed -->
|
||||
<string name="usage_type_computed_power">Computed power</string>
|
||||
<!-- Label for minimum amount of actual power use -->
|
||||
<string name="usage_type_min_actual_power">Min real power</string>
|
||||
<!-- Label for maximum amount of power use -->
|
||||
<string name="usage_type_max_actual_power">Max real power</string>
|
||||
<!-- [CHAR_LIMIT=NONE] Label for amount of power use that was computed -->
|
||||
<string name="usage_type_computed_power">Computed power use</string>
|
||||
<!-- [CHAR_LIMIT=NONE] Label for amount of power use that was actually observed (though
|
||||
the change in battery level) -->
|
||||
<string name="usage_type_actual_power">Observed power use</string>
|
||||
<!-- Label for force stop action -->
|
||||
<string name="battery_action_stop">Force stop</string>
|
||||
<!-- Label for app details action -->
|
||||
@@ -3908,6 +3907,9 @@
|
||||
<!-- Suggestion to switch to airplane mode to save power -->
|
||||
<string name="battery_sugg_radio">Switch to airplane mode to save power in areas with no cell coverage</string>
|
||||
|
||||
<!-- [CHAR_LIMIT=NONE] Description for power consumed by the flashlight -->
|
||||
<string name="battery_desc_flashlight">Battery used by the flashlight</string>
|
||||
|
||||
<!-- Description for power consumed by display -->
|
||||
<string name="battery_desc_display">Battery used by the display and backlight</string>
|
||||
<!-- Suggestion for reducing display power -->
|
||||
@@ -3938,7 +3940,12 @@
|
||||
<string name="battery_desc_users">Battery used by user</string>
|
||||
|
||||
<!-- [CHAR LIMIT=50] Description for unaccounted power use -->
|
||||
<string name="battery_desc_unaccounted">Unknown power use</string>
|
||||
<string name="battery_desc_unaccounted">Miscellaneous power use</string>
|
||||
<!-- [CHAR LIMIT=NONE] Description for unaccounted power use -->
|
||||
<string name="battery_msg_unaccounted">Battery use is an approximation of power
|
||||
use and does not include every source of battery drain. Miscellaneous is the difference
|
||||
between the computed approximate power use and the actual drain observed on the
|
||||
battery.</string>
|
||||
<!-- [CHAR LIMIT=50] Description for over-counted power use -->
|
||||
<string name="battery_desc_overcounted">Over-counted power use</string>
|
||||
<!-- Representation of a mAh value. [CHAR LIMIT=NONE] -->
|
||||
|
||||
Reference in New Issue
Block a user