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 18<!-- todo(b/304320644): update layout/car_top_system_bar --> 19<com.android.systemui.car.systembar.CarSystemBarView 20 xmlns:android="http://schemas.android.com/apk/res/android" 21 xmlns:systemui="http://schemas.android.com/apk/res-auto" 22 android:id="@+id/car_top_bar" 23 android:layout_width="match_parent" 24 android:layout_height="match_parent" 25 android:background="@drawable/status_bar_background" 26 android:orientation="vertical"> 27 28 <RelativeLayout 29 android:layout_width="match_parent" 30 android:layout_height="wrap_content" 31 android:layout_weight="1" 32 android:layoutDirection="ltr"> 33 34 <include layout="@layout/qc_status_icons_horizontal" 35 android:layout_width="wrap_content" 36 android:layout_height="match_parent" 37 android:layout_centerVertical="true" 38 android:layout_alignParentStart="true" /> 39 40 <FrameLayout 41 android:id="@+id/clock_container" 42 android:layout_width="wrap_content" 43 android:layout_height="match_parent" 44 android:paddingStart="@dimen/car_padding_2" 45 android:paddingEnd="@dimen/car_padding_2" 46 android:layout_centerInParent="true"> 47 <com.android.systemui.statusbar.policy.Clock 48 android:id="@+id/clock" 49 android:layout_width="wrap_content" 50 android:layout_height="wrap_content" 51 android:layout_gravity="center" 52 android:elevation="5dp" 53 android:singleLine="true" 54 android:textAppearance="@style/TextAppearance.SystemBar.Clock" 55 systemui:amPmStyle="gone" 56 /> 57 </FrameLayout> 58 59 <include layout="@layout/read_only_status_icons" 60 android:layout_width="wrap_content" 61 android:layout_height="match_parent" 62 android:layout_centerVertical="true" 63 android:layout_toRightOf="@id/clock_container"/> 64 65 <com.android.systemui.car.systembar.CarSystemBarButton 66 android:id="@+id/notifications" 67 android:contentDescription="@string/system_bar_notifications_label" 68 android:layout_width="@dimen/car_quick_controls_entry_points_button_width" 69 android:layout_height="match_parent" 70 style="@style/TopBarButton" 71 android:layout_toLeftOf="@id/camera_privacy_chip" 72 systemui:longIntent="intent:#Intent;action=com.android.car.bugreport.action.START_AUDIO_FIRST;component=com.android.car.bugreport/.BugReportActivity;end"> 73 <LinearLayout 74 android:layout_width="match_parent" 75 android:layout_height="match_parent" 76 android:orientation="horizontal" 77 android:gravity="center"> 78 <ImageView 79 android:id="@+id/notification_icon" 80 android:layout_width="wrap_content" 81 android:layout_height="match_parent" 82 android:src="@drawable/car_ic_notification_dock" 83 android:tint="@color/system_bar_icon_color_with_selection" /> 84 </LinearLayout> 85 </com.android.systemui.car.systembar.CarSystemBarButton> 86 87 <include layout="@layout/camera_privacy_chip" 88 android:layout_width="wrap_content" 89 android:layout_height="match_parent" 90 android:layout_centerVertical="true" 91 android:layout_toLeftOf="@id/mic_privacy_chip" /> 92 93 <include layout="@layout/mic_privacy_chip" 94 android:layout_width="wrap_content" 95 android:layout_height="match_parent" 96 android:layout_centerVertical="true" 97 android:layout_toLeftOf="@id/user_name_container" 98 android:contentDescription="@string/system_bar_mic_privacy_chip" /> 99 100 <FrameLayout 101 android:id="@+id/user_name_container" 102 android:layout_width="wrap_content" 103 android:layout_height="match_parent" 104 android:layout_alignParentEnd="true" 105 android:layout_centerVertical="true"> 106 <com.android.systemui.car.systembar.CarSystemBarButton 107 android:id="@+id/user_name" 108 android:layout_width="wrap_content" 109 android:layout_height="match_parent" 110 style="@style/TopBarButton" 111 android:gravity="center"> 112 <LinearLayout 113 android:layout_width="match_parent" 114 android:layout_height="match_parent" 115 android:orientation="horizontal" 116 android:layout_marginStart="@dimen/car_padding_2" 117 android:layout_marginEnd="@dimen/car_padding_2" 118 android:gravity="center_vertical"> 119 <ImageView 120 android:id="@+id/user_avatar" 121 android:layout_width="wrap_content" 122 android:layout_height="match_parent" 123 android:src="@drawable/car_ic_users_icon" 124 android:tint="@color/system_bar_icon_color_with_selection" 125 android:layout_marginEnd="@dimen/system_bar_user_icon_padding" 126 android:contentDescription="@string/system_bar_user_avatar" /> 127 <TextView 128 android:id="@+id/user_name_text" 129 android:layout_width="wrap_content" 130 android:layout_height="match_parent" 131 android:gravity="center_vertical" 132 android:textAppearance="@style/TextAppearance.SystemBar.Username" 133 android:singleLine="true" 134 android:maxWidth="@dimen/car_system_bar_user_name_max_width" 135 android:layout_marginEnd="@dimen/system_bar_user_icon_padding" 136 android:contentDescription="@string/system_bar_user_name_text" /> 137 </LinearLayout> 138 </com.android.systemui.car.systembar.CarSystemBarButton> 139 </FrameLayout> 140 </RelativeLayout> 141</com.android.systemui.car.systembar.CarSystemBarView> 142