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="?android:attr/textAppearanceLarge" 50 android:textColor="@android:color/white" 51 android:gravity="center" 52 android:visibility="gone" 53 android:text="@string/header_bar_text_in_logged_out_state" 54 android:layout_marginVertical="@dimen/user_picker_header_margin" 55 android:layout_marginLeft="@dimen/user_picker_header_left_margin" 56 app:layout_constraintTop_toTopOf="parent" 57 app:layout_constraintLeft_toLeftOf="parent"/> 58 59 <ImageButton 60 android:id="@+id/logout_button_icon_view" 61 android:layout_width="@dimen/user_picker_pill_button_width" 62 android:layout_height="@dimen/user_picker_pill_button_height" 63 android:src="@drawable/car_ic_logout" 64 android:background="@drawable/userpicker_ic_background" 65 android:scaleType="fitCenter" 66 android:paddingHorizontal="@dimen/user_picker_pill_padding_horizontal" 67 android:paddingVertical="@dimen/user_picker_pill_padding_vertical" 68 android:layout_marginVertical="@dimen/user_picker_pill_header_margin" 69 android:layout_marginRight="@dimen/user_picker_logout_button_margin_right_size" 70 android:gravity="center" 71 android:visibility="gone" 72 app:layout_constraintTop_toTopOf="parent" 73 app:layout_constraintRight_toLeftOf="@id/power_button_icon_view"/> 74 <!-- TODO<b/254526109>: Resource icon Duplicate to QuickControls --> 75 <ImageButton 76 android:id="@+id/power_button_icon_view" 77 android:layout_width="@dimen/user_picker_pill_button_width" 78 android:layout_height="@dimen/user_picker_pill_button_height" 79 android:src="@drawable/userpicker_ic_power" 80 android:background="@drawable/userpicker_ic_background" 81 android:scaleType="fitCenter" 82 android:paddingHorizontal="@dimen/user_picker_pill_padding_horizontal" 83 android:paddingVertical="@dimen/user_picker_pill_padding_vertical" 84 android:layout_marginVertical="@dimen/user_picker_pill_header_margin" 85 android:layout_marginRight="@dimen/car_padding_4" 86 android:gravity="center" 87 android:visibility="visible" 88 app:layout_constraintTop_toTopOf="parent" 89 app:layout_constraintRight_toRightOf="parent"/> 90 91 <androidx.constraintlayout.widget.Barrier 92 android:id="@+id/header_barrier" 93 android:layout_width="wrap_content" 94 android:layout_height="wrap_content" 95 app:barrierDirection="bottom" 96 app:constraint_referenced_ids="back_button,message,logout_button_icon_view,power_button_icon_view" /> 97 98 <com.android.car.ui.recyclerview.CarUiRecyclerView 99 android:id="@+id/user_picker" 100 android:layout_width="match_parent" 101 android:layout_height="0dp" 102 android:layout_marginTop="@*android:dimen/car_padding_4" 103 app:layout_constraintTop_toBottomOf="@+id/header_barrier" 104 app:layout_constraintLeft_toLeftOf="parent" 105 app:layout_constraintRight_toRightOf="parent" 106 app:layout_constraintBottom_toTopOf="@+id/user_picker_bottom_bar"/> 107 108 <androidx.constraintlayout.widget.ConstraintLayout 109 android:id="@+id/user_picker_bottom_bar" 110 android:layout_width="match_parent" 111 android:layout_height="@dimen/car_bottom_system_bar_height" 112 android:orientation="horizontal" 113 android:background="@color/user_picker_bottom_bar_color" 114 app:layout_constraintVertical_bias="1" 115 app:layout_constraintStart_toStartOf="parent" 116 app:layout_constraintTop_toTopOf="parent" 117 app:layout_constraintBottom_toBottomOf="parent"> 118 <LinearLayout 119 android:id="@+id/user_picker_status_icon_container" 120 android:layout_width="wrap_content" 121 android:layout_height="match_parent" 122 android:orientation="horizontal" 123 android:gravity="center_vertical" 124 app:layout_constraintRight_toLeftOf="@+id/user_picker_bottom_bar_clock" 125 app:layout_constraintTop_toTopOf="parent" 126 app:layout_constraintBottom_toBottomOf="parent"/> 127 <com.android.systemui.statusbar.policy.Clock 128 android:id="@+id/user_picker_bottom_bar_clock" 129 android:layout_width="wrap_content" 130 android:layout_height="wrap_content" 131 android:layout_marginEnd="@dimen/car_body3_size" 132 android:layout_gravity="center" 133 android:elevation="5dp" 134 android:singleLine="true" 135 android:textAppearance="@style/TextAppearance.SystemBar.Clock" 136 app:layout_constraintRight_toRightOf="parent" 137 app:layout_constraintTop_toTopOf="parent" 138 app:layout_constraintBottom_toBottomOf="parent" 139 systemui:amPmStyle="gone"/> 140 </androidx.constraintlayout.widget.ConstraintLayout> 141 </com.android.car.ui.ConstraintFocusArea> 142</com.android.systemui.car.userpicker.UserPickerFrameLayout> 143