• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  Copyright (C) 2022 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    android:id="@+id/entity_header"
21    style="@style/EntityHeader"
22    android:layout_width="match_parent"
23    android:layout_height="wrap_content"
24    android:layout_centerHorizontal="true"
25    android:gravity="center_horizontal"
26    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
27    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
28    android:orientation="vertical">
29
30    <TextView
31        android:id="@+id/entity_header_title"
32        style="@style/TextAppearance.EntityHeaderTitle"
33        android:layout_width="wrap_content"
34        android:layout_height="wrap_content"
35        android:layout_gravity="center_horizontal"
36        android:singleLine="false"
37        android:ellipsize="marquee"
38        android:textDirection="locale"/>
39
40    <TextView
41        android:id="@+id/entity_header_summary"
42        style="@style/TextAppearance.EntityHeaderSummary"
43        android:layout_width="wrap_content"
44        android:layout_height="wrap_content"
45        android:layout_gravity="center_horizontal"
46        android:layout_marginTop="4dp"
47        android:singleLine="false"
48        android:ellipsize="marquee"
49        android:textDirection="locale"/>
50
51    <ImageView
52        android:id="@+id/entity_header_icon"
53        android:layout_width="72dp"
54        android:layout_height="72dp"
55        android:layout_marginTop="24dp"
56        android:scaleType="fitCenter"
57        android:antialias="true"/>
58
59    <LinearLayout
60        android:layout_width="wrap_content"
61        android:layout_height="wrap_content"
62        android:layout_gravity="center_horizontal"
63        android:gravity="center_vertical"
64        android:orientation="vertical">
65        <LinearLayout
66            android:id="@+id/bt_battery_case"
67            android:layout_width="match_parent"
68            android:layout_height="wrap_content"
69            android:layout_marginStart="@dimen/le_bluetooth_battery_start_margin"
70            android:layout_marginTop="@dimen/le_bluetooth_battery_top_margin"
71            android:orientation="horizontal"
72            android:visibility="gone"
73            android:focusable="true">
74            <TextView
75                style="@style/TextAppearance.EntityHeaderTitle"
76                android:layout_width="wrap_content"
77                android:layout_height="wrap_content"
78                android:layout_weight="1"
79                android:gravity="start|center_vertical"
80                android:ellipsize="end"
81                android:textDirection="locale"
82                android:text="@string/bluetooth_middle_name"
83                android:textSize="@dimen/advanced_bluetooth_header_title_text_size"/>
84            <TextView
85                android:id="@+id/bt_battery_case_summary"
86                style="@style/TextAppearance.EntityHeaderSummary"
87                android:layout_width="wrap_content"
88                android:layout_height="wrap_content"
89                android:layout_marginStart="@dimen/le_bluetooth_summary_start_margin"
90                android:minWidth="@dimen/le_bluetooth_summary_min_width"
91                android:padding="@dimen/le_bluetooth_summary_padding"
92                android:drawablePadding="@dimen/le_bluetooth_summary_drawable_padding"/>
93        </LinearLayout>
94        <LinearLayout
95            android:id="@+id/bt_battery_left"
96            android:layout_width="match_parent"
97            android:layout_height="wrap_content"
98            android:layout_marginStart="@dimen/le_bluetooth_battery_start_margin"
99            android:layout_marginTop="@dimen/le_bluetooth_battery_top_margin"
100            android:orientation="horizontal"
101            android:visibility="gone"
102            android:focusable="true">
103            <TextView
104                style="@style/TextAppearance.EntityHeaderTitle"
105                android:layout_width="wrap_content"
106                android:layout_height="wrap_content"
107                android:layout_weight="1"
108                android:gravity="start|center_vertical"
109                android:ellipsize="end"
110                android:textDirection="locale"
111                android:text="@string/bluetooth_left_name"
112                android:textSize="@dimen/advanced_bluetooth_header_title_text_size"/>
113            <TextView
114                android:id="@+id/bt_battery_left_summary"
115                style="@style/TextAppearance.EntityHeaderSummary"
116                android:layout_width="wrap_content"
117                android:layout_height="wrap_content"
118                android:layout_marginStart="@dimen/le_bluetooth_summary_start_margin"
119                android:minWidth="@dimen/le_bluetooth_summary_min_width"
120                android:padding="@dimen/le_bluetooth_summary_padding"
121                android:drawablePadding="@dimen/le_bluetooth_summary_drawable_padding"/>
122        </LinearLayout>
123        <LinearLayout
124            android:id="@+id/bt_battery_right"
125            android:layout_width="match_parent"
126            android:layout_height="wrap_content"
127            android:layout_marginStart="@dimen/le_bluetooth_battery_start_margin"
128            android:layout_marginTop="@dimen/le_bluetooth_battery_top_margin"
129            android:orientation="horizontal"
130            android:visibility="gone"
131            android:focusable="true">
132            <TextView
133                style="@style/TextAppearance.EntityHeaderTitle"
134                android:layout_width="wrap_content"
135                android:layout_height="wrap_content"
136                android:layout_weight="1"
137                android:gravity="start|center_vertical"
138                android:ellipsize="end"
139                android:textDirection="locale"
140                android:text="@string/bluetooth_right_name"
141                android:textSize="@dimen/advanced_bluetooth_header_title_text_size"/>
142            <TextView
143                android:id="@+id/bt_battery_right_summary"
144                style="@style/TextAppearance.EntityHeaderSummary"
145                android:layout_width="wrap_content"
146                android:layout_height="wrap_content"
147                android:layout_marginStart="@dimen/le_bluetooth_summary_start_margin"
148                android:minWidth="@dimen/le_bluetooth_summary_min_width"
149                android:padding="@dimen/le_bluetooth_summary_padding"
150                android:drawablePadding="@dimen/le_bluetooth_summary_drawable_padding"/>
151        </LinearLayout>
152    </LinearLayout>
153</LinearLayout>
154