1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 Copyright (C) 2023 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<com.android.systemui.car.userpicker.UserPickerFrameLayout 18 xmlns:android="http://schemas.android.com/apk/res/android" 19 xmlns:app="http://schemas.android.com/apk/res-auto" 20 xmlns:systemui="http://schemas.android.com/apk/res-auto" 21 android:layout_width="match_parent" 22 android:layout_height="match_parent"> 23 <com.android.car.ui.FocusParkingView 24 android:layout_width="match_parent" 25 android:layout_height="match_parent"/> 26 <com.android.car.ui.ConstraintFocusArea 27 android:layout_width="match_parent" 28 android:layout_height="match_parent" 29 android:gravity="center"> 30 <ImageButton 31 android:id="@+id/back_button" 32 android:layout_width="@dimen/user_picker_button_size" 33 android:layout_height="@dimen/user_picker_button_size" 34 android:src="@drawable/userpicker_ic_arrow_back" 35 android:background="?android:attr/selectableItemBackground" 36 android:scaleType="fitCenter" 37 android:padding="@dimen/user_picker_button_padding_size" 38 android:layout_marginVertical="@dimen/user_picker_header_margin" 39 android:layout_marginLeft="@dimen/user_picker_header_left_margin" 40 android:gravity="center" 41 android:visibility="gone" 42 app:layout_constraintTop_toTopOf="parent" 43 app:layout_constraintLeft_toLeftOf="parent"/> 44 45 <TextView 46 android:id="@+id/message" 47 android:layout_width="wrap_content" 48 android:layout_height="@dimen/user_picker_button_size" 49 android:textAppearance="?oemTextAppearanceTitleLarge" 50 android:gravity="center" 51 android:visibility="gone" 52 android:text="@string/header_bar_text_in_logged_out_state" 53 android:layout_marginVertical="@dimen/user_picker_header_margin" 54 android:layout_marginLeft="@dimen/user_picker_header_left_margin" 55 app:layout_constraintTop_toTopOf="parent" 56 app:layout_constraintLeft_toLeftOf="parent"/> 57 58 <ImageButton 59 android:id="@+id/logout_button_icon_view" 60 android:layout_width="@dimen/user_picker_pill_button_width" 61 android:layout_height="@dimen/user_picker_pill_button_height" 62 android:src="@drawable/car_ic_logout" 63 android:background="@drawable/userpicker_ic_background" 64 android:scaleType="fitCenter" 65 android:paddingHorizontal="@dimen/user_picker_pill_padding_horizontal" 66 android:paddingVertical="@dimen/user_picker_pill_padding_vertical" 67 android:layout_marginVertical="@dimen/user_picker_pill_header_margin" 68 android:layout_marginRight="@dimen/user_picker_logout_button_margin_right_size" 69 android:gravity="center" 70 android:visibility="gone" 71 app:layout_constraintTop_toTopOf="parent" 72 app:layout_constraintRight_toLeftOf="@id/power_button_icon_view"/> 73 <!-- TODO<b/254526109>: Resource icon Duplicate to QuickControls --> 74 <ImageButton 75 android:id="@+id/power_button_icon_view" 76 android:layout_width="@dimen/user_picker_pill_button_width" 77 android:layout_height="@dimen/user_picker_pill_button_height" 78 android:src="@drawable/userpicker_ic_power" 79 android:background="@drawable/userpicker_ic_background" 80 android:scaleType="fitCenter" 81 android:paddingHorizontal="@dimen/user_picker_pill_padding_horizontal" 82 android:paddingVertical="@dimen/user_picker_pill_padding_vertical" 83 android:layout_marginVertical="@dimen/user_picker_pill_header_margin" 84 android:layout_marginRight="@dimen/car_padding_4" 85 android:gravity="center" 86 android:visibility="visible" 87 app:layout_constraintTop_toTopOf="parent" 88 app:layout_constraintRight_toRightOf="parent"/> 89 90 <androidx.constraintlayout.widget.Barrier 91 android:id="@+id/header_barrier" 92 android:layout_width="wrap_content" 93 android:layout_height="wrap_content" 94 app:barrierDirection="bottom" 95 app:constraint_referenced_ids="back_button,message,logout_button_icon_view,power_button_icon_view" /> 96 97 <com.android.car.ui.recyclerview.CarUiRecyclerView 98 android:id="@+id/user_picker" 99 android:layout_width="match_parent" 100 android:layout_height="0dp" 101 android:layout_marginTop="@*android:dimen/car_padding_4" 102 app:layout_constraintTop_toBottomOf="@+id/header_barrier" 103 app:layout_constraintLeft_toLeftOf="parent" 104 app:layout_constraintRight_toRightOf="parent" 105 app:layout_constraintBottom_toTopOf="@+id/user_picker_bottom_bar"/> 106 107 <androidx.constraintlayout.widget.ConstraintLayout 108 android:id="@+id/user_picker_bottom_bar" 109 android:layout_width="match_parent" 110 android:layout_height="@dimen/car_bottom_system_bar_height" 111 android:orientation="horizontal" 112 android:background="@color/user_picker_bottom_bar_color" 113 app:layout_constraintVertical_bias="1" 114 app:layout_constraintStart_toStartOf="parent" 115 app:layout_constraintTop_toTopOf="parent" 116 app:layout_constraintBottom_toBottomOf="parent"> 117 <LinearLayout 118 android:id="@+id/user_picker_status_icon_container" 119 android:layout_width="wrap_content" 120 android:layout_height="match_parent" 121 android:orientation="horizontal" 122 android:gravity="center_vertical" 123 app:layout_constraintRight_toLeftOf="@+id/user_picker_bottom_bar_clock" 124 app:layout_constraintTop_toTopOf="parent" 125 app:layout_constraintBottom_toBottomOf="parent"/> 126 <com.android.systemui.statusbar.policy.Clock 127 android:id="@+id/user_picker_bottom_bar_clock" 128 android:layout_width="wrap_content" 129 android:layout_height="wrap_content" 130 android:layout_marginEnd="@dimen/car_body3_size" 131 android:layout_gravity="center" 132 android:elevation="5dp" 133 android:singleLine="true" 134 style="@style/SystemBarClockText" 135 app:layout_constraintRight_toRightOf="parent" 136 app:layout_constraintTop_toTopOf="parent" 137 app:layout_constraintBottom_toBottomOf="parent" 138 systemui:amPmStyle="gone"/> 139 </androidx.constraintlayout.widget.ConstraintLayout> 140 </com.android.car.ui.ConstraintFocusArea> 141</com.android.systemui.car.userpicker.UserPickerFrameLayout> 142