Files
app_Settings/res/layout/power_usage_details.xml
Dianne Hackborn cb497546ba Add new button to report battery usage to the developer.
This displays a new button on the application battery usage details
screen for the user to send a bug report to the developer, if that is
possible to do.  Also adds a button to directly force stop the app
from the details screen, and uses the new facilities to determine
whether the button should be enabled.
2010-02-22 11:31:37 -08:00

150 lines
5.8 KiB
XML

<?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.
-->
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/all_details"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="5dip"
android:paddingBottom="5dip"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
android:orientation="horizontal"
android:gravity="center_vertical"
android:paddingLeft="12dip"
android:paddingRight="?android:attr/scrollbarSize">
<ImageView
android:id="@+id/icon"
android:layout_width="48dip"
android:layout_height="wrap_content"
android:layout_marginRight="6dip"
android:layout_gravity="center" />
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="8dip"
android:layout_marginTop="2dip"
android:layout_marginBottom="6dip"
android:layout_weight="1">
<TextView android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:layout_marginTop="2dip"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_toLeftOf="@+id/battery_percentage"
android:ellipsize="marquee"
android:textAppearance="?android:attr/textAppearanceMedium"/>
<TextView android:id="@+id/battery_percentage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:layout_alignParentRight="true"
android:layout_alignBottom="@+id/name"
android:layout_gravity="bottom"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textStyle="bold"/>
<ImageView
android:id="@+id/gauge"
android:background="#80404040"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_marginTop="5dip"
android:layout_below="@id/battery_percentage"
android:layout_gravity="center_vertical" />
<TextView android:id="@+id/summary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@id/gauge"
android:layout_below="@id/gauge"
android:textAppearance="?android:attr/textAppearanceSmall"
/>
</RelativeLayout>
</LinearLayout>
<!-- Force stop and report buttons -->
<LinearLayout
android:id="@+id/two_buttons_panel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="6dip"
android:orientation="vertical">
<include
layout="@layout/two_buttons_panel"/>
</LinearLayout>
<TextView
style="?android:attr/listSeparatorTextViewStyle"
android:text="@string/details_subtitle" />
<LinearLayout
android:id="@+id/details"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="6dip"
android:orientation="vertical">
<!-- Insert detail items here -->
</LinearLayout>
<LinearLayout
android:id="@+id/controls"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/controls_title"
style="?android:attr/listSeparatorTextViewStyle"
android:layout_marginTop="6dip"
android:text="@string/controls_subtitle" />
<!-- Controls go here ... -->
</LinearLayout>
<TextView
android:id="@+id/packages_section_title"
style="?android:attr/listSeparatorTextViewStyle"
android:layout_marginTop="6dip"
android:text="@string/packages_subtitle" />
<LinearLayout
android:id="@+id/packages_section"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="6dip"
android:orientation="vertical">
<!-- Insert detail items here -->
</LinearLayout>
</LinearLayout>
</ScrollView>