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 app:layout_constraintBottom_toTopOf="@id/preset_spinner" /> 33 34 <Spinner 35 android:id="@+id/preset_spinner" 36 style="@style/BluetoothTileDialog.Device" 37 android:layout_width="match_parent" 38 android:layout_height="wrap_content" 39 android:layout_marginTop="@dimen/hearing_devices_layout_margin" 40 android:minHeight="@dimen/hearing_devices_preset_spinner_height" 41 android:gravity="center_vertical" 42 android:background="@drawable/hearing_devices_preset_spinner_background" 43 android:popupBackground="@drawable/hearing_devices_preset_spinner_popup_background" 44 android:dropDownVerticalOffset="@dimen/hearing_devices_preset_spinner_height" 45 android:dropDownWidth="match_parent" 46 android:paddingStart="0dp" 47 android:paddingEnd="0dp" 48 app:layout_constraintStart_toStartOf="parent" 49 app:layout_constraintEnd_toEndOf="parent" 50 app:layout_constraintTop_toBottomOf="@id/device_list" 51 app:layout_constraintBottom_toTopOf="@id/pair_new_device_button" 52 android:longClickable="false" 53 android:visibility="gone"/> 54 55 <androidx.constraintlayout.widget.Barrier 56 android:id="@+id/device_function_barrier" 57 android:layout_width="wrap_content" 58 android:layout_height="wrap_content" 59 app:barrierAllowsGoneWidgets="false" 60 app:barrierDirection="bottom" 61 app:constraint_referenced_ids="device_list,preset_spinner" /> 62 63 <Button 64 android:id="@+id/pair_new_device_button" 65 style="@style/BluetoothTileDialog.Device" 66 android:paddingEnd="0dp" 67 android:paddingStart="20dp" 68 android:background="@drawable/bluetooth_tile_dialog_bg_off" 69 android:layout_width="0dp" 70 android:layout_height="64dp" 71 android:contentDescription="@string/accessibility_hearing_device_pair_new_device" 72 app:layout_constraintStart_toStartOf="parent" 73 app:layout_constraintEnd_toEndOf="parent" 74 app:layout_constraintTop_toBottomOf="@id/device_function_barrier" 75 app:layout_constraintBottom_toTopOf="@id/related_tools_scroll" 76 android:drawableStart="@drawable/ic_add" 77 android:drawablePadding="20dp" 78 android:drawableTint="?android:attr/textColorPrimary" 79 android:text="@string/quick_settings_pair_hearing_devices" 80 android:textSize="14sp" 81 android:textAppearance="@style/TextAppearance.Dialog.Title" 82 android:textDirection="locale" 83 android:textAlignment="viewStart" 84 android:maxLines="1" 85 android:ellipsize="end" /> 86 87 <androidx.constraintlayout.widget.Barrier 88 android:id="@+id/device_barrier" 89 android:layout_width="wrap_content" 90 android:layout_height="wrap_content" 91 app:barrierAllowsGoneWidgets="false" 92 app:barrierDirection="bottom" 93 app:constraint_referenced_ids="device_function_barrier, pair_new_device_button" /> 94 95 <HorizontalScrollView 96 android:id="@+id/related_tools_scroll" 97 android:layout_width="match_parent" 98 android:layout_height="wrap_content" 99 android:layout_marginStart="@dimen/bluetooth_dialog_layout_margin" 100 android:layout_marginEnd="@dimen/bluetooth_dialog_layout_margin" 101 android:layout_marginTop="@dimen/hearing_devices_layout_margin" 102 android:scrollbars="none" 103 android:fillViewport="true" 104 app:layout_constraintStart_toStartOf="parent" 105 app:layout_constraintEnd_toEndOf="parent" 106 app:layout_constraintTop_toBottomOf="@id/preset_spinner"> 107 <LinearLayout 108 android:id="@+id/related_tools_container" 109 android:layout_width="match_parent" 110 android:layout_height="match_parent" 111 android:orientation="horizontal"> 112 </LinearLayout> 113 </HorizontalScrollView> 114 115</androidx.constraintlayout.widget.ConstraintLayout>