| <?xml version="1.0" encoding="utf-8"?> |
| <!-- |
| ~ Copyright (C) 2020 The Android Open Source Project |
| ~ |
| ~ Licensed under the Apache License, Version 2.0 (the "License"); |
| ~ you may not use this file except in compliance with the License. |
| ~ You may obtain a copy of the License at |
| ~ |
| ~ http://www.apache.org/licenses/LICENSE-2.0 |
| ~ |
| ~ Unless required by applicable law or agreed to in writing, software |
| ~ distributed under the License is distributed on an "AS IS" BASIS, |
| ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| ~ See the License for the specific language governing permissions and |
| ~ limitations under the License. |
| --> |
| <!-- This is for the two-row version of the toolbar --> |
| <androidx.constraintlayout.widget.ConstraintLayout |
| xmlns:android="http://schemas.android.com/apk/res/android" |
| xmlns:app="http://schemas.android.com/apk/res-auto" |
| android:layout_width="match_parent" |
| android:layout_height="match_parent" |
| android:tag="CarUiBaseLayoutToolbar"> |
| |
| <!-- When not in touch mode, if we clear focus in current window, Android will re-focus the |
| first focusable view in the window automatically. Adding a FocusParkingView to the window |
| can fix this issue, because it can take focus, and it is transparent and its default focus |
| highlight is disabled, so it's invisible to the user no matter whether it's focused or not. |
| --> |
| <com.android.car.ui.FocusParkingView |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content"/> |
| |
| <FrameLayout |
| android:id="@+id/car_ui_base_layout_content_container" |
| android:layout_width="match_parent" |
| android:layout_height="match_parent" |
| app:layout_constraintBottom_toBottomOf="parent" |
| app:layout_constraintTop_toTopOf="parent" /> |
| |
| <com.android.car.ui.FocusArea |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content"> |
| <androidx.constraintlayout.widget.ConstraintLayout |
| android:id="@+id/car_ui_toolbar_background" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:tag="car_ui_top_inset" |
| app:layout_constraintTop_toTopOf="parent"> |
| <com.android.car.ui.baselayout.ClickBlockingView |
| android:layout_width="0dp" |
| android:layout_height="0dp" |
| app:layout_constraintStart_toStartOf="parent" |
| app:layout_constraintEnd_toEndOf="parent" |
| app:layout_constraintTop_toTopOf="parent" |
| app:layout_constraintBottom_toBottomOf="parent"/> |
| |
| <androidx.constraintlayout.widget.Guideline |
| android:id="@+id/car_ui_toolbar_row_separator_guideline" |
| android:layout_width="0dp" |
| android:layout_height="0dp" |
| android:orientation="horizontal" |
| app:layout_constraintGuide_begin="96dp" /> |
| |
| <FrameLayout |
| android:id="@+id/car_ui_toolbar_nav_icon_container" |
| style="@style/Widget.CarUi.Toolbar.NavIconContainer" |
| android:layout_width="@dimen/car_ui_toolbar_margin" |
| android:layout_height="0dp" |
| app:layout_constraintBottom_toTopOf="@id/car_ui_toolbar_row_separator_guideline" |
| app:layout_constraintStart_toStartOf="parent" |
| app:layout_constraintTop_toTopOf="parent"> |
| |
| <ImageView |
| android:id="@+id/car_ui_toolbar_nav_icon" |
| style="@style/Widget.CarUi.Toolbar.NavIcon" |
| android:layout_width="@dimen/car_ui_toolbar_nav_icon_size" |
| android:layout_height="@dimen/car_ui_toolbar_nav_icon_size" |
| android:layout_gravity="center" |
| android:scaleType="fitXY" |
| android:tint="@color/car_ui_text_color_primary"/> |
| |
| <ImageView |
| android:id="@+id/car_ui_toolbar_logo" |
| android:layout_width="@dimen/car_ui_toolbar_logo_size" |
| android:layout_height="@dimen/car_ui_toolbar_logo_size" |
| android:layout_gravity="center" |
| android:scaleType="fitXY" /> |
| </FrameLayout> |
| |
| <FrameLayout |
| android:id="@+id/car_ui_toolbar_title_logo_container" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| app:layout_constraintBottom_toTopOf="@id/car_ui_toolbar_row_separator_guideline" |
| app:layout_constraintStart_toEndOf="@id/car_ui_toolbar_nav_icon_container" |
| app:layout_constraintTop_toTopOf="parent"> |
| |
| <ImageView |
| android:id="@+id/car_ui_toolbar_title_logo" |
| android:layout_width="@dimen/car_ui_toolbar_logo_size" |
| android:layout_height="@dimen/car_ui_toolbar_logo_size" |
| android:layout_gravity="center" |
| android:scaleType="fitXY" /> |
| </FrameLayout> |
| |
| <LinearLayout android:layout_height="wrap_content" |
| android:layout_width="0dp" |
| android:id="@+id/car_ui_toolbar_title_container" |
| android:orientation="vertical" |
| android:layout_marginStart="16dp" |
| app:layout_goneMarginStart="0dp" |
| app:layout_constraintBottom_toTopOf="@id/car_ui_toolbar_row_separator_guideline" |
| app:layout_constraintEnd_toStartOf="@id/car_ui_toolbar_menu_items_container" |
| app:layout_constraintStart_toEndOf="@id/car_ui_toolbar_title_logo_container" |
| app:layout_constraintTop_toTopOf="parent" > |
| <TextView android:id="@+id/car_ui_toolbar_title" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:singleLine="true" |
| android:textAlignment="viewStart" |
| android:textAppearance="@style/TextAppearance.CarUi.Widget.Toolbar.Title"/> |
| <TextView android:id="@+id/car_ui_toolbar_subtitle" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:visibility="gone" |
| android:textAlignment="viewStart" |
| android:textAppearance="?android:attr/textAppearanceSmall"/> |
| </LinearLayout> |
| |
| <FrameLayout |
| android:id="@+id/car_ui_toolbar_search_view_container" |
| android:layout_width="0dp" |
| android:layout_height="0dp" |
| app:layout_constraintBottom_toTopOf="@id/car_ui_toolbar_row_separator_guideline" |
| app:layout_constraintEnd_toStartOf="@+id/car_ui_toolbar_menu_items_container" |
| app:layout_constraintStart_toEndOf="@+id/car_ui_toolbar_nav_icon_container" |
| app:layout_constraintTop_toTopOf="parent" /> |
| |
| <LinearLayout |
| android:id="@+id/car_ui_toolbar_menu_items_container" |
| android:divider="@drawable/car_ui_toolbar_menu_item_divider" |
| android:showDividers="beginning|middle|end" |
| android:layout_width="wrap_content" |
| android:layout_height="0dp" |
| android:orientation="horizontal" |
| app:layout_constraintBottom_toTopOf="@id/car_ui_toolbar_row_separator_guideline" |
| app:layout_constraintEnd_toEndOf="parent" |
| app:layout_constraintTop_toTopOf="parent" /> |
| |
| <com.android.car.ui.toolbar.TabLayout |
| android:id="@+id/car_ui_toolbar_tabs" |
| android:layout_width="match_parent" |
| android:layout_height="96dp" |
| app:layout_constraintBottom_toBottomOf="parent" |
| app:layout_constraintTop_toBottomOf="@id/car_ui_toolbar_row_separator_guideline" /> |
| |
| <ProgressBar |
| android:id="@+id/car_ui_toolbar_progress_bar" |
| style="@android:style/Widget.DeviceDefault.ProgressBar.Horizontal" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:indeterminate="true" |
| android:visibility="gone" |
| app:layout_constraintBottom_toBottomOf="parent" |
| app:layout_constraintEnd_toEndOf="parent" |
| app:layout_constraintStart_toStartOf="parent" /> |
| |
| </androidx.constraintlayout.widget.ConstraintLayout> |
| </com.android.car.ui.FocusArea> |
| |
| </androidx.constraintlayout.widget.ConstraintLayout> |