blob: 3e49e5fe13d779bb558dc75231892992ff418e8c [file] [log] [blame]
Cole Faust0aab4232019-11-13 16:55:19 -08001<?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<FrameLayout
18 xmlns:android="http://schemas.android.com/apk/res/android"
19 android:layout_width="wrap_content"
Cole Faustcdc56252019-11-14 15:33:58 -080020 android:layout_height="wrap_content"
Cole Faust3c609db2020-01-14 17:44:16 -080021 style="@style/Widget.CarUi.Toolbar.MenuItem.IndividualContainer">
Cole Faust0aab4232019-11-13 16:55:19 -080022 <FrameLayout
23 android:id="@+id/car_ui_toolbar_menu_item_icon_container"
24 android:layout_width="match_parent"
25 android:layout_height="match_parent"
26 android:layout_gravity="center">
27 <ImageView
28 android:layout_width="match_parent"
29 android:layout_height="match_parent"
30 android:src="@drawable/car_ui_toolbar_menu_item_icon_background"
31 android:background="@drawable/car_ui_toolbar_menu_item_icon_ripple"
32 android:scaleType="center"/>
33 <ImageView
34 android:id="@+id/car_ui_toolbar_menu_item_icon"
35 android:layout_width="@dimen/car_ui_toolbar_menu_item_icon_size"
36 android:layout_height="@dimen/car_ui_toolbar_menu_item_icon_size"
37 android:layout_gravity="center"
38 android:tint="@color/car_ui_toolbar_menu_item_icon_color"
39 android:tintMode="src_in"/>
40 </FrameLayout>
41 <com.android.car.ui.uxr.DrawableStateSwitch
42 android:id="@+id/car_ui_toolbar_menu_item_switch"
43 android:layout_width="wrap_content"
44 android:layout_height="wrap_content"
45 android:layout_gravity="center"
46 android:clickable="false"/>
47
48 <!-- These buttons must have clickable="false" or they will steal the click events from the container -->
49 <com.android.car.ui.uxr.DrawableStateButton
50 android:id="@+id/car_ui_toolbar_menu_item_text"
51 style="@style/Widget.CarUi.Toolbar.TextButton"
52 android:layout_width="wrap_content"
53 android:layout_height="match_parent"
54 android:layout_gravity="center"
55 android:clickable="false"/>
56 <com.android.car.ui.uxr.DrawableStateButton
57 android:id="@+id/car_ui_toolbar_menu_item_text_with_icon"
58 style="@style/Widget.CarUi.Toolbar.TextButton.WithIcon"
59 android:layout_width="wrap_content"
60 android:layout_height="match_parent"
61 android:layout_gravity="center"
62 android:clickable="false"/>
63</FrameLayout>