OSDN Git Service

DO NOT MERGE. Grant MMS Uri permissions as the calling UID.
[android-x86/frameworks-base.git] / packages / SystemUI / res / layout / battery_detail.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <!--
3      Copyright (C) 2016 The Android Open Source Project
4
5      Licensed under the Apache License, Version 2.0 (the "License");
6      you may not use this file except in compliance with the License.
7      You may obtain a copy of the License at
8
9           http://www.apache.org/licenses/LICENSE-2.0
10
11      Unless required by applicable law or agreed to in writing, software
12      distributed under the License is distributed on an "AS IS" BASIS,
13      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14      See the License for the specific language governing permissions and
15      limitations under the License.
16 -->
17 <LinearLayout
18     xmlns:android="http://schemas.android.com/apk/res/android"
19     xmlns:systemui="http://schemas.android.com/apk/res-auto"
20     android:layout_width="match_parent"
21     android:layout_height="wrap_content"
22     android:orientation="vertical">
23
24     <TextView
25         android:id="@+id/charge_and_estimation"
26         android:layout_width="match_parent"
27         android:layout_height="wrap_content"
28         android:paddingStart="72dp"
29         android:textAppearance="?android:attr/textAppearanceSmall"
30         android:textColor="?android:attr/colorAccent" />
31
32     <com.android.systemui.ResizingSpace
33         android:layout_width="match_parent"
34         android:layout_height="@dimen/battery_detail_graph_space_top" />
35
36     <com.android.settingslib.graph.UsageView
37         android:id="@+id/battery_usage"
38         android:layout_width="match_parent"
39         android:layout_height="141dp"
40         android:layout_marginStart="16dp"
41         android:layout_marginEnd="24dp"
42         systemui:sideLabels="@array/battery_labels"
43         android:colorAccent="?android:attr/colorAccent"
44         systemui:textColor="#66FFFFFF" />
45
46     <com.android.systemui.ResizingSpace
47         android:layout_width="match_parent"
48         android:layout_height="@dimen/battery_detail_graph_space_bottom" />
49
50     <View
51         android:layout_width="match_parent"
52         android:layout_height="1dp"
53         android:background="?android:attr/listDivider"
54         android:layout_marginBottom="8dp" />
55
56     <RelativeLayout
57         android:id="@+id/switch_container"
58         android:layout_width="match_parent"
59         android:layout_height="wrap_content"
60         android:paddingTop="16dp"
61         android:paddingBottom="16dp"
62         android:background="?android:attr/selectableItemBackground"
63         android:clickable="true">
64
65         <ImageView
66             android:id="@android:id/icon"
67             android:layout_width="24dp"
68             android:layout_height="24dp"
69             android:scaleType="fitCenter"
70             android:adjustViewBounds="true"
71             android:layout_alignParentTop="true"
72             android:layout_alignParentStart="true"
73             android:layout_marginStart="16dp"
74             android:layout_marginEnd="32dp" />
75
76         <TextView
77             android:id="@android:id/title"
78             android:layout_width="wrap_content"
79             android:layout_height="wrap_content"
80             android:layout_toStartOf="@android:id/toggle"
81             android:layout_toEndOf="@android:id/icon"
82             android:textAppearance="@style/TextAppearance.QS.DetailItemPrimary"
83             android:text="@string/battery_detail_switch_title" />
84
85         <TextView
86             android:id="@android:id/summary"
87             android:visibility="gone"
88             android:layout_width="wrap_content"
89             android:layout_height="wrap_content"
90             android:layout_below="@android:id/title"
91             android:layout_toStartOf="@android:id/toggle"
92             android:layout_toEndOf="@android:id/icon"
93             android:textAppearance="@style/TextAppearance.QS.DetailItemSecondary"
94             android:text="@string/battery_detail_switch_summary" />
95
96         <Switch
97             android:id="@android:id/toggle"
98             android:layout_width="wrap_content"
99             android:layout_height="wrap_content"
100             android:layout_alignParentEnd="true"
101             android:layout_alignParentTop="true"
102             android:layout_marginEnd="16dp"
103             android:clickable="false"
104             android:textAppearance="@style/TextAppearance.QS.DetailHeader" />
105
106     </RelativeLayout>
107 </LinearLayout>