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:gravity="center" 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:ellipsize="marquee" 48 android:textDirection="locale"/> 49 50 <ImageView 51 android:id="@+id/entity_header_icon" 52 android:layout_width="72dp" 53 android:layout_height="72dp" 54 android:layout_marginTop="24dp" 55 android:scaleType="fitCenter" 56 android:antialias="true"/> 57 58 <LinearLayout 59 android:layout_width="wrap_content" 60 android:layout_height="wrap_content" 61 android:layout_gravity="center_horizontal" 62 android:gravity="center_vertical" 63 android:orientation="vertical"> 64 <LinearLayout 65 android:id="@+id/bt_battery_case" 66 android:layout_width="match_parent" 67 android:layout_height="wrap_content" 68 android:layout_marginStart="@dimen/le_bluetooth_battery_start_margin" 69 android:layout_marginTop="@dimen/le_bluetooth_battery_top_margin" 70 android:orientation="horizontal" 71 android:visibility="gone" 72 android:focusable="true"> 73 <TextView 74 style="@style/TextAppearance.EntityHeaderTitle" 75 android:layout_width="wrap_content" 76 android:layout_height="wrap_content" 77 android:layout_weight="1" 78 android:gravity="start|center_vertical" 79 android:ellipsize="end" 80 android:textDirection="locale" 81 android:text="@string/bluetooth_middle_name" 82 android:textSize="@dimen/advanced_bluetooth_header_title_text_size"/> 83 <TextView 84 android:id="@+id/bt_battery_case_summary" 85 style="@style/TextAppearance.EntityHeaderSummary" 86 android:layout_width="wrap_content" 87 android:layout_height="wrap_content" 88 android:layout_marginStart="@dimen/le_bluetooth_summary_start_margin" 89 android:minWidth="@dimen/le_bluetooth_summary_min_width" 90 android:padding="@dimen/le_bluetooth_summary_padding" 91 android:drawablePadding="@dimen/le_bluetooth_summary_drawable_padding"/> 92 </LinearLayout> 93 <LinearLayout 94 android:id="@+id/bt_battery_left" 95 android:layout_width="match_parent" 96 android:layout_height="wrap_content" 97 android:layout_marginStart="@dimen/le_bluetooth_battery_start_margin" 98 android:layout_marginTop="@dimen/le_bluetooth_battery_top_margin" 99 android:orientation="horizontal" 100 android:visibility="gone" 101 android:focusable="true"> 102 <TextView 103 style="@style/TextAppearance.EntityHeaderTitle" 104 android:layout_width="wrap_content" 105 android:layout_height="wrap_content" 106 android:layout_weight="1" 107 android:gravity="start|center_vertical" 108 android:ellipsize="end" 109 android:textDirection="locale" 110 android:text="@string/bluetooth_left_name" 111 android:textSize="@dimen/advanced_bluetooth_header_title_text_size"/> 112 <TextView 113 android:id="@+id/bt_battery_left_summary" 114 style="@style/TextAppearance.EntityHeaderSummary" 115 android:layout_width="wrap_content" 116 android:layout_height="wrap_content" 117 android:layout_marginStart="@dimen/le_bluetooth_summary_start_margin" 118 android:minWidth="@dimen/le_bluetooth_summary_min_width" 119 android:padding="@dimen/le_bluetooth_summary_padding" 120 android:drawablePadding="@dimen/le_bluetooth_summary_drawable_padding"/> 121 </LinearLayout> 122 <LinearLayout 123 android:id="@+id/bt_battery_right" 124 android:layout_width="match_parent" 125 android:layout_height="wrap_content" 126 android:layout_marginStart="@dimen/le_bluetooth_battery_start_margin" 127 android:layout_marginTop="@dimen/le_bluetooth_battery_top_margin" 128 android:orientation="horizontal" 129 android:visibility="gone" 130 android:focusable="true"> 131 <TextView 132 style="@style/TextAppearance.EntityHeaderTitle" 133 android:layout_width="wrap_content" 134 android:layout_height="wrap_content" 135 android:layout_weight="1" 136 android:gravity="start|center_vertical" 137 android:ellipsize="end" 138 android:textDirection="locale" 139 android:text="@string/bluetooth_right_name" 140 android:textSize="@dimen/advanced_bluetooth_header_title_text_size"/> 141 <TextView 142 android:id="@+id/bt_battery_right_summary" 143 style="@style/TextAppearance.EntityHeaderSummary" 144 android:layout_width="wrap_content" 145 android:layout_height="wrap_content" 146 android:layout_marginStart="@dimen/le_bluetooth_summary_start_margin" 147 android:minWidth="@dimen/le_bluetooth_summary_min_width" 148 android:padding="@dimen/le_bluetooth_summary_padding" 149 android:drawablePadding="@dimen/le_bluetooth_summary_drawable_padding"/> 150 </LinearLayout> 151 </LinearLayout> 152</LinearLayout> 153