• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  Copyright (C) 2019 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
18<LinearLayout
19    xmlns:android="http://schemas.android.com/apk/res/android"
20    xmlns:app="http://schemas.android.com/apk/res-auto"
21    android:layout_width="0dp"
22    android:layout_height="wrap_content"
23    android:layout_weight="1"
24    android:layoutDirection="locale"
25    android:focusable="true"
26    android:orientation="vertical">
27
28    <FrameLayout
29        android:layout_width="wrap_content"
30        android:layout_height="wrap_content"
31        android:layout_gravity="center_horizontal">
32        <ImageView
33            android:layout_width="72dp"
34            android:layout_height="72dp"
35            android:layout_gravity="center"
36            android:background="@drawable/bt_header_circle_outline" />
37
38        <com.google.android.material.imageview.ShapeableImageView
39            android:id="@+id/header_icon"
40            android:layout_width="72dp"
41            android:layout_height="72dp"
42            android:layout_gravity="center"
43            android:antialias="true"
44            android:padding="8dp"
45            android:scaleType="fitCenter"
46            app:shapeAppearanceOverlay="@style/DeviceIconRoundedCornerStyle" />
47
48        <com.google.android.material.progressindicator.CircularProgressIndicator
49            android:id="@+id/battery_ring"
50            android:layout_width="wrap_content"
51            android:layout_height="wrap_content"
52            android:layout_gravity="center"
53            android:indeterminate="false"
54            app:trackColor="@android:color/transparent"
55            app:indicatorColor="@color/settingslib_materialColorPrimary"
56            app:trackThickness="4dp"
57            app:indicatorSize="76dp"
58            app:indicatorInset="0dp"
59            app:trackCornerRadius="2dp"
60            android:max="100"
61            android:visibility="gone" />
62
63    </FrameLayout>
64
65    <TextView
66        android:id="@+id/header_title"
67        style="@style/TextAppearance.EntityHeaderTitle"
68        android:layout_width="wrap_content"
69        android:layout_height="wrap_content"
70        android:layout_gravity="center_horizontal"
71        android:gravity="center"
72        android:ellipsize="marquee"
73        android:textDirection="locale"
74        android:layout_marginTop="24dp"
75        android:textSize="@dimen/advanced_bluetooth_header_title_text_size"/>
76
77    <LinearLayout
78        android:layout_width="wrap_content"
79        android:layout_height="33dp"
80        android:layout_marginTop="2dp"
81        android:layout_gravity="center_horizontal"
82        android:gravity="center"
83        android:orientation="horizontal">
84        <ImageView
85            android:id="@+id/bt_battery_icon"
86            android:layout_width="wrap_content"
87            android:layout_height="wrap_content"
88            android:contentDescription="@string/bluetooth_header_battery_content_description" />
89        <TextView
90            android:id="@+id/bt_battery_summary"
91            style="@style/TextAppearance.EntityHeaderSummary"
92            android:layout_width="wrap_content"
93            android:layout_height="wrap_content"
94            android:layout_marginStart="4dp"/>
95    </LinearLayout>
96
97    <TextView
98        android:id="@+id/bt_battery_prediction"
99        style="@style/TextAppearance.EntityHeaderSummary"
100        android:layout_width="wrap_content"
101        android:layout_height="wrap_content"
102        android:layout_marginTop="2dp"
103        android:layout_gravity="center_horizontal"
104        android:gravity="center"
105        android:orientation="horizontal"
106        android:visibility="gone"/>
107
108</LinearLayout>
109