xref: /aosp_15_r20/frameworks/base/packages/SystemUI/res/layout/hearing_devices_tile_dialog.xml (revision d57664e9bc4670b3ecf6748a746a57c557b6bc9e)
1<!--
2    Copyright (C) 2024 The Android Open Source Project
3
4    Licensed under the Apache License, Version 2.0 (the "License");
5    you may not use this file except in compliance with the License.
6    You may obtain a copy of the License at
7
8         http://www.apache.org/licenses/LICENSE-2.0
9
10    Unless required by applicable law or agreed to in writing, software
11    distributed under the License is distributed on an "AS IS" BASIS,
12    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13    See the License for the specific language governing permissions and
14    limitations under the License.
15-->
16
17<androidx.constraintlayout.widget.ConstraintLayout
18    xmlns:android="http://schemas.android.com/apk/res/android"
19    xmlns:app="http://schemas.android.com/apk/res-auto"
20    android:id="@+id/root"
21    style="@style/Widget.SliceView.Panel"
22    android:layout_width="wrap_content"
23    android:layout_height="wrap_content">
24
25    <androidx.recyclerview.widget.RecyclerView
26        android:id="@+id/device_list"
27        android:layout_width="match_parent"
28        android:layout_height="wrap_content"
29        app:layout_constraintTop_toTopOf="parent"
30        app:layout_constraintStart_toStartOf="parent"
31        app:layout_constraintEnd_toEndOf="parent" />
32
33    <Button
34        android:id="@+id/pair_new_device_button"
35        style="@style/BluetoothTileDialog.Device"
36        app:layout_constraintStart_toStartOf="parent"
37        app:layout_constraintEnd_toEndOf="parent"
38        app:layout_constraintTop_toBottomOf="@id/device_list"
39        android:layout_height="@dimen/bluetooth_dialog_device_height"
40        android:contentDescription="@string/accessibility_hearing_device_pair_new_device"
41        android:drawableStart="@drawable/ic_add"
42        android:drawablePadding="20dp"
43        android:drawableTint="?android:attr/textColorPrimary"
44        android:text="@string/quick_settings_pair_hearing_devices"
45        android:textSize="14sp"
46        android:textAppearance="@style/TextAppearance.Dialog.Title"
47        android:textDirection="locale"
48        android:textAlignment="viewStart"
49        android:maxLines="1"
50        android:ellipsize="end"
51        android:background="@drawable/bluetooth_tile_dialog_bg_off" />
52
53    <LinearLayout
54        android:id="@+id/preset_layout"
55        android:layout_width="match_parent"
56        android:layout_height="wrap_content"
57        app:layout_constraintStart_toStartOf="parent"
58        app:layout_constraintEnd_toEndOf="parent"
59        app:layout_constraintTop_toBottomOf="@id/pair_new_device_button"
60        android:layout_marginTop="@dimen/hearing_devices_layout_margin"
61        android:orientation="vertical">
62        <TextView
63            android:id="@+id/preset_title"
64            android:layout_width="wrap_content"
65            android:layout_height="wrap_content"
66            android:layout_marginStart="@dimen/bluetooth_dialog_layout_margin"
67            android:layout_marginEnd="@dimen/bluetooth_dialog_layout_margin"
68            android:paddingStart="@dimen/hearing_devices_small_title_padding_horizontal"
69            android:text="@string/hearing_devices_preset_label"
70            android:textAppearance="@style/TextAppearance.Dialog.Title"
71            android:textSize="14sp"
72            android:gravity="center_vertical"
73            android:fontFamily="@*android:string/config_headlineFontFamilyMedium"
74            android:textDirection="locale"/>
75        <Spinner
76            android:id="@+id/preset_spinner"
77            style="@style/BluetoothTileDialog.Device"
78            android:layout_height="@dimen/bluetooth_dialog_device_height"
79            android:layout_marginTop="4dp"
80            android:paddingStart="0dp"
81            android:paddingEnd="0dp"
82            android:background="@drawable/hearing_devices_spinner_background"
83            android:popupBackground="@drawable/hearing_devices_spinner_popup_background"
84            android:dropDownWidth="match_parent"
85            android:longClickable="false"/>
86    </LinearLayout>
87
88    <LinearLayout
89        android:id="@+id/tools_layout"
90        android:layout_width="match_parent"
91        android:layout_height="wrap_content"
92        app:layout_constraintStart_toStartOf="parent"
93        app:layout_constraintEnd_toEndOf="parent"
94        app:layout_constraintTop_toBottomOf="@id/preset_layout"
95        android:layout_marginTop="@dimen/hearing_devices_layout_margin"
96        android:orientation="vertical">
97        <TextView
98            android:id="@+id/tools_title"
99            android:layout_width="wrap_content"
100            android:layout_height="wrap_content"
101            android:layout_marginStart="@dimen/bluetooth_dialog_layout_margin"
102            android:layout_marginEnd="@dimen/bluetooth_dialog_layout_margin"
103            android:paddingStart="@dimen/hearing_devices_small_title_padding_horizontal"
104            android:text="@string/hearing_devices_tools_label"
105            android:textAppearance="@style/TextAppearance.Dialog.Title"
106            android:textSize="14sp"
107            android:gravity="center_vertical"
108            android:fontFamily="@*android:string/config_headlineFontFamilyMedium"
109            android:textDirection="locale"/>
110        <LinearLayout
111            android:id="@+id/tools_container"
112            android:layout_width="match_parent"
113            android:layout_height="wrap_content"
114            android:layout_marginStart="@dimen/bluetooth_dialog_layout_margin"
115            android:layout_marginEnd="@dimen/bluetooth_dialog_layout_margin"
116            android:layout_marginTop="4dp"
117            android:orientation="horizontal"/>
118    </LinearLayout>
119
120
121</androidx.constraintlayout.widget.ConstraintLayout>