Unify data/power layout, confirm disable, round.

Share consistent layout between data usage and battery usage.  Show
confirmation dialog before disabling mobile data.  Round warning/limit
sweep values to match displayed label.  Suppress fade when switching
data usage tabs.

Bug: 5208510, 5058157, 5038589, 5252816
Change-Id: I3c76f3397445d2d3b173666a41672871df4c61af
This commit is contained in:
Jeff Sharkey
2011-09-02 16:10:24 -07:00
parent 4e658ba969
commit 28130d9638
12 changed files with 151 additions and 212 deletions

View File

@@ -1,57 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 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.
-->
<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="@*android:dimen/preference_item_padding_side"
android:paddingRight="@*android:dimen/preference_item_padding_side"
android:paddingTop="8dip"
android:paddingBottom="8dip"
android:columnCount="3">
<ImageView
android:id="@android:id/icon"
android:layout_width="48dip"
android:layout_height="48dip"
android:layout_rowSpan="2"
android:layout_marginRight="8dip"
android:scaleType="centerInside" />
<TextView
android:id="@android:id/title"
android:layout_width="0dip"
android:layout_gravity="fill_horizontal"
android:singleLine="true"
android:ellipsize="marquee"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@android:id/summary"
android:layout_marginLeft="8dip"
android:textAppearance="?android:attr/textAppearanceSmall" />
<ProgressBar
android:id="@android:id/progress"
android:layout_height="12dip"
android:layout_columnSpan="2"
android:layout_gravity="fill_horizontal"
android:layout_marginTop="4dip"
android:max="100"
android:progressDrawable="@drawable/data_usage_bar"
style="?android:attr/progressBarStyleHorizontal" />
</GridLayout>