1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 Copyright 2019, 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.car.ui.FocusArea 18 xmlns:android="http://schemas.android.com/apk/res/android" 19 android:layout_width="match_parent" 20 android:layout_height="wrap_content"> 21 <androidx.constraintlayout.widget.ConstraintLayout 22 xmlns:app="http://schemas.android.com/apk/res-auto" 23 android:layout_width="match_parent" 24 android:layout_height="wrap_content" 25 android:id="@+id/car_ui_toolbar_background" 26 style="@style/Widget.CarUi.Toolbar.Container"> 27 28 <androidx.constraintlayout.widget.Guideline 29 android:layout_width="wrap_content" 30 android:layout_height="wrap_content" 31 android:id="@+id/car_ui_toolbar_start_guideline" 32 app:layout_constraintGuide_begin="@dimen/car_ui_toolbar_start_inset" 33 android:orientation="vertical"/> 34 35 <androidx.constraintlayout.widget.Guideline 36 android:layout_width="wrap_content" 37 android:layout_height="wrap_content" 38 android:id="@+id/car_ui_toolbar_top_guideline" 39 app:layout_constraintGuide_begin="@dimen/car_ui_toolbar_top_inset" 40 android:orientation="horizontal"/> 41 42 <androidx.constraintlayout.widget.Guideline 43 android:layout_width="wrap_content" 44 android:layout_height="wrap_content" 45 android:id="@+id/car_ui_toolbar_end_guideline" 46 app:layout_constraintGuide_end="@dimen/car_ui_toolbar_end_inset" 47 android:orientation="vertical"/> 48 49 <androidx.constraintlayout.widget.Guideline 50 android:layout_width="wrap_content" 51 android:layout_height="wrap_content" 52 android:id="@+id/car_ui_toolbar_bottom_guideline" 53 app:layout_constraintGuide_end="@dimen/car_ui_toolbar_bottom_inset" 54 android:orientation="horizontal"/> 55 56 <androidx.constraintlayout.widget.Guideline 57 android:id="@+id/car_ui_toolbar_row_separator_guideline" 58 android:layout_width="0dp" 59 android:layout_height="0dp" 60 android:orientation="horizontal" 61 app:layout_constraintGuide_begin="@dimen/car_ui_toolbar_first_row_height"/> 62 63 <View 64 android:id="@+id/car_ui_toolbar_row_separator" 65 android:layout_width="match_parent" 66 android:layout_height="@dimen/car_ui_toolbar_separator_height" 67 style="@style/Widget.CarUi.Toolbar.SeparatorView" 68 app:layout_constraintTop_toBottomOf="@id/car_ui_toolbar_row_separator_guideline" 69 app:layout_constraintStart_toStartOf="parent" 70 app:layout_constraintEnd_toEndOf="parent"/> 71 72 <FrameLayout 73 android:id="@+id/car_ui_toolbar_nav_icon_container" 74 android:layout_width="@dimen/car_ui_toolbar_margin" 75 android:layout_height="0dp" 76 style="@style/Widget.CarUi.Toolbar.NavIconContainer" 77 app:layout_constraintTop_toTopOf="@id/car_ui_toolbar_top_guideline" 78 app:layout_constraintBottom_toTopOf="@id/car_ui_toolbar_row_separator" 79 app:layout_constraintStart_toStartOf="@id/car_ui_toolbar_start_guideline"> 80 <ImageView 81 android:id="@+id/car_ui_toolbar_nav_icon" 82 android:layout_width="@dimen/car_ui_toolbar_nav_icon_size" 83 android:layout_height="@dimen/car_ui_toolbar_nav_icon_size" 84 android:layout_gravity="center" 85 android:scaleType="fitXY" 86 style="@style/Widget.CarUi.Toolbar.NavIcon"/> 87 <ImageView 88 android:id="@+id/car_ui_toolbar_logo" 89 android:layout_width="@dimen/car_ui_toolbar_logo_size" 90 android:layout_height="@dimen/car_ui_toolbar_logo_size" 91 android:layout_gravity="center" 92 android:scaleType="fitXY"/> 93 </FrameLayout> 94 95 <FrameLayout 96 android:id="@+id/car_ui_toolbar_title_logo_container" 97 android:layout_width="wrap_content" 98 android:layout_height="wrap_content" 99 style="@style/Widget.CarUi.Toolbar.LogoContainer" 100 app:layout_constraintTop_toTopOf="@id/car_ui_toolbar_top_guideline" 101 app:layout_constraintBottom_toTopOf="@id/car_ui_toolbar_row_separator" 102 app:layout_constraintStart_toEndOf="@id/car_ui_toolbar_nav_icon_container"> 103 104 <ImageView 105 android:id="@+id/car_ui_toolbar_title_logo" 106 android:layout_width="@dimen/car_ui_toolbar_logo_size" 107 android:layout_height="@dimen/car_ui_toolbar_logo_size" 108 android:scaleType="fitXY" 109 android:layout_gravity="center" 110 style="@style/Widget.CarUi.Toolbar.Logo"/> 111 </FrameLayout> 112 113 <LinearLayout android:layout_height="wrap_content" 114 android:layout_width="0dp" 115 android:id="@+id/car_ui_toolbar_title_container" 116 android:orientation="vertical" 117 android:layout_marginStart="@dimen/car_ui_toolbar_title_margin_start" 118 app:layout_goneMarginStart="@dimen/car_ui_toolbar_title_no_logo_margin_start" 119 app:layout_constraintTop_toTopOf="@id/car_ui_toolbar_top_guideline" 120 app:layout_constraintBottom_toTopOf="@id/car_ui_toolbar_row_separator" 121 app:layout_constraintStart_toEndOf="@id/car_ui_toolbar_title_logo_container" 122 app:layout_constraintEnd_toStartOf="@id/car_ui_toolbar_menu_items_container"> 123 <TextView android:id="@+id/car_ui_toolbar_title" 124 android:layout_width="wrap_content" 125 android:layout_height="wrap_content" 126 android:singleLine="true" 127 style="@style/Widget.CarUi.Toolbar.Title"/> 128 <TextView android:id="@+id/car_ui_toolbar_subtitle" 129 android:layout_width="wrap_content" 130 android:layout_height="wrap_content" 131 android:visibility="gone" 132 style="@style/Widget.CarUi.Toolbar.Subtitle"/> 133 </LinearLayout> 134 135 <FrameLayout 136 android:id="@+id/car_ui_toolbar_search_view_container" 137 android:layout_width="0dp" 138 android:layout_height="@dimen/car_ui_toolbar_search_height" 139 app:layout_constraintTop_toTopOf="@id/car_ui_toolbar_top_guideline" 140 app:layout_constraintBottom_toTopOf="@id/car_ui_toolbar_row_separator" 141 app:layout_constraintStart_toEndOf="@+id/car_ui_toolbar_nav_icon_container" 142 app:layout_constraintEnd_toStartOf="@+id/car_ui_toolbar_menu_items_container"/> 143 144 <LinearLayout 145 android:id="@+id/car_ui_toolbar_menu_items_container" 146 android:layout_width="wrap_content" 147 android:layout_height="0dp" 148 android:orientation="horizontal" 149 style="@style/Widget.CarUi.Toolbar.MenuItem.Container" 150 app:layout_constraintTop_toTopOf="@id/car_ui_toolbar_top_guideline" 151 app:layout_constraintBottom_toTopOf="@id/car_ui_toolbar_row_separator" 152 app:layout_constraintEnd_toStartOf="@id/car_ui_toolbar_end_guideline"/> 153 154 <com.android.car.ui.toolbar.TabLayout 155 android:id="@+id/car_ui_toolbar_tabs" 156 android:layout_width="match_parent" 157 android:layout_height="@dimen/car_ui_toolbar_second_row_height" 158 app:layout_constraintTop_toBottomOf="@id/car_ui_toolbar_row_separator" 159 app:layout_constraintBottom_toTopOf="@id/car_ui_toolbar_bottom_guideline"/> 160 161 <View 162 android:id="@+id/car_ui_toolbar_bottom_styleable" 163 android:layout_width="match_parent" 164 android:layout_height="@dimen/car_ui_toolbar_bottom_view_height" 165 style="@style/Widget.CarUi.Toolbar.BottomView" 166 app:layout_constraintBottom_toBottomOf="parent" 167 app:layout_constraintStart_toStartOf="parent" 168 app:layout_constraintEnd_toEndOf="parent"/> 169 170 <ProgressBar 171 android:id="@+id/car_ui_toolbar_progress_bar" 172 style="@style/Widget.CarUi.Toolbar.ProgressBar" 173 android:layout_width="match_parent" 174 android:layout_height="wrap_content" 175 app:layout_constraintBottom_toTopOf="@id/car_ui_toolbar_bottom_styleable" 176 app:layout_constraintStart_toStartOf="parent" 177 app:layout_constraintEnd_toEndOf="parent" 178 android:indeterminate="true" 179 android:visibility="gone"/> 180 181 </androidx.constraintlayout.widget.ConstraintLayout> 182</com.android.car.ui.FocusArea> 183