blob: 8abfcf6057aaaefd421f4b73c92d699e28e31055 [file] [log] [blame]
Jason Monkc06fbb12016-01-08 14:12:18 -05001<?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-->
Jason Monk96ab6362016-02-11 11:33:09 -050017<LinearLayout
18 xmlns:android="http://schemas.android.com/apk/res/android"
19 xmlns:systemui="http://schemas.android.com/apk/res-auto"
Jason Monkc06fbb12016-01-08 14:12:18 -050020 android:layout_width="match_parent"
21 android:layout_height="wrap_content"
Jason Monk96ab6362016-02-11 11:33:09 -050022 android:orientation="vertical">
Jason Monkc06fbb12016-01-08 14:12:18 -050023
24 <TextView
Jason Monk96ab6362016-02-11 11:33:09 -050025 android:id="@+id/charge_and_estimation"
26 android:layout_width="match_parent"
Jason Monkc06fbb12016-01-08 14:12:18 -050027 android:layout_height="wrap_content"
Jason Monk78425252016-07-13 15:55:43 -040028 android:paddingStart="16dp"
Jason Monk006572a2016-04-08 14:43:08 -040029 android:textAppearance="?android:attr/textAppearanceSmall"
Jason Monk96ab6362016-02-11 11:33:09 -050030 android:textColor="?android:attr/colorAccent" />
Jason Monkc06fbb12016-01-08 14:12:18 -050031
Jason Monk6573ef22016-04-06 12:37:18 -040032 <com.android.systemui.ResizingSpace
33 android:layout_width="match_parent"
34 android:layout_height="@dimen/battery_detail_graph_space_top" />
35
Jason Monk96ab6362016-02-11 11:33:09 -050036 <com.android.settingslib.graph.UsageView
37 android:id="@+id/battery_usage"
38 android:layout_width="match_parent"
Jason Monk0193a872016-03-08 13:25:15 -050039 android:layout_height="141dp"
Jason Monka5d7dd92016-02-17 08:53:28 -050040 android:layout_marginStart="16dp"
41 android:layout_marginEnd="24dp"
Jason Monk96ab6362016-02-11 11:33:09 -050042 systemui:sideLabels="@array/battery_labels"
43 android:colorAccent="?android:attr/colorAccent"
44 systemui:textColor="#66FFFFFF" />
Jason Monkc06fbb12016-01-08 14:12:18 -050045
Jason Monk6573ef22016-04-06 12:37:18 -040046 <com.android.systemui.ResizingSpace
47 android:layout_width="match_parent"
48 android:layout_height="@dimen/battery_detail_graph_space_bottom" />
49
Jason Monk96ab6362016-02-11 11:33:09 -050050 <View
51 android:layout_width="match_parent"
52 android:layout_height="1dp"
53 android:background="?android:attr/listDivider"
Jason Monk96ab6362016-02-11 11:33:09 -050054 android:layout_marginBottom="8dp" />
55
56 <RelativeLayout
57 android:id="@+id/switch_container"
58 android:layout_width="match_parent"
Jason Monkc06fbb12016-01-08 14:12:18 -050059 android:layout_height="wrap_content"
Jason Monk96ab6362016-02-11 11:33:09 -050060 android:paddingTop="16dp"
61 android:paddingBottom="16dp"
62 android:background="?android:attr/selectableItemBackground"
63 android:clickable="true">
Jason Monkc06fbb12016-01-08 14:12:18 -050064
Jason Monk96ab6362016-02-11 11:33:09 -050065 <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>