diff options
author | Amith Yamasani <yamasani@google.com> | 2009-06-09 06:34:49 -0700 |
---|---|---|
committer | Amith Yamasani <yamasani@google.com> | 2009-06-10 20:19:42 -0700 |
commit | 78fd96a1c5dd7b03fa09d8b3116243cc9661c5e6 (patch) | |
tree | e008a3af6cb55e05ec5f7091808824965fe32a08 /res/layout | |
parent | 8036862226b6cdb6903c2591e66b4b9328b1d484 (diff) | |
download | packages_apps_Settings-78fd96a1c5dd7b03fa09d8b3116243cc9661c5e6.tar.gz packages_apps_Settings-78fd96a1c5dd7b03fa09d8b3116243cc9661c5e6.tar.bz2 packages_apps_Settings-78fd96a1c5dd7b03fa09d8b3116243cc9661c5e6.zip |
More details in the summary and details screens.
Show packages included, time that a subsystem was on for.
Load label and icon in the background and cache the values.
Switch between totals and since-unplugged.
Other UI improvements.
Diffstat (limited to 'res/layout')
-rw-r--r-- | res/layout/power_usage_details.xml | 56 | ||||
-rw-r--r-- | res/layout/power_usage_package_item.xml | 31 | ||||
-rw-r--r-- | res/layout/preference_powergauge.xml | 30 |
3 files changed, 110 insertions, 7 deletions
diff --git a/res/layout/power_usage_details.xml b/res/layout/power_usage_details.xml index dd8d486d5..206eb05d8 100644 --- a/res/layout/power_usage_details.xml +++ b/res/layout/power_usage_details.xml @@ -86,5 +86,61 @@ <!-- Insert detail items here --> </LinearLayout> + + <LinearLayout + android:id="@+id/controls_section" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <TextView + android:id="@+id/controls_section_title" + style="?android:attr/listSeparatorTextViewStyle" + android:text="@string/controls_subtitle" /> + + <RelativeLayout + android:layout_width="fill_parent" + android:layout_height="wrap_content"> + + <Button + android:id="@+id/action_button1" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginLeft="6dip" + android:layout_marginTop="6dip" + android:layout_marginBottom="6dip" + android:layout_marginRight="6dip" + android:layout_alignParentLeft="true" + android:layout_weight="1"/> + <Button + android:id="@+id/action_button2" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginLeft="6dip" + android:layout_marginTop="6dip" + android:layout_marginBottom="6dip" + android:layout_marginRight="6dip" + android:layout_alignParentRight="true" + android:layout_weight="1"/> + + </RelativeLayout> + + </LinearLayout> + + <TextView + android:id="@+id/packages_section_title" + style="?android:attr/listSeparatorTextViewStyle" + android:text="@string/packages_subtitle" /> + + <LinearLayout + android:id="@+id/packages_section" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:paddingLeft="6dip" + android:orientation="vertical"> + + <!-- Insert detail items here --> + + </LinearLayout> </LinearLayout> </ScrollView> diff --git a/res/layout/power_usage_package_item.xml b/res/layout/power_usage_package_item.xml new file mode 100644 index 000000000..dcd5aad36 --- /dev/null +++ b/res/layout/power_usage_package_item.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2009 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. +--> + +<RelativeLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_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_alignParentLeft="true" + android:layout_marginBottom="2dip" + android:layout_marginTop="2dip" /> +</RelativeLayout> diff --git a/res/layout/preference_powergauge.xml b/res/layout/preference_powergauge.xml index 551659e26..b47f6c089 100644 --- a/res/layout/preference_powergauge.xml +++ b/res/layout/preference_powergauge.xml @@ -19,7 +19,7 @@ android:layout_height="wrap_content" android:minHeight="?android:attr/listPreferredItemHeight" android:gravity="center_vertical" - android:paddingLeft="16dip" + android:paddingLeft="12dip" android:id="@+android:id/widget_frame" android:paddingRight="?android:attr/scrollbarSize"> @@ -33,8 +33,8 @@ <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginRight="6dip" - android:layout_marginTop="6dip" + android:layout_marginRight="8dip" + android:layout_marginTop="2dip" android:layout_marginBottom="6dip" android:layout_weight="1"> @@ -42,21 +42,37 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" - android:visibility="gone" - android:textAppearance="?android:attr/textAppearanceLarge" /> + android:layout_marginTop="2dip" + android:layout_alignParentLeft="true" + android:layout_alignParentTop="true" + android:layout_toLeftOf="@+id/percent" + android:ellipsize="marquee" + android:textAppearance="?android:attr/textAppearanceMedium"/> + + <TextView android:id="@+id/percent" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:singleLine="true" + android:layout_alignParentRight="true" + android:layout_alignBottom="@android:id/title" + android:layout_gravity="bottom" + android:textAppearance="?android:attr/textAppearanceSmall" + android:textStyle="bold"/> <ImageView android:id="@+id/appGauge" + android:background="#2e2e2e" android:layout_height="wrap_content" android:layout_width="fill_parent" - android:layout_marginRight="6dip" + android:layout_marginTop="5dip" + android:layout_below="@id/percent" android:layout_gravity="center_vertical" /> <TextView android:id="@+android:id/summary" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_below="@id/appGauge" android:layout_alignLeft="@id/appGauge" + android:layout_below="@id/appGauge" android:textAppearance="?android:attr/textAppearanceSmall" android:maxLines="2" /> |