• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  ~ Copyright (C) 2018 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<com.android.systemui.car.navigationbar.CarNavigationBarView
19    xmlns:android="http://schemas.android.com/apk/res/android"
20    xmlns:systemui="http://schemas.android.com/apk/res-auto"
21    android:layout_width="match_parent"
22    android:layout_height="match_parent"
23    android:background="@drawable/system_bar_background"
24    android:orientation="vertical">
25    <!--The 20dp padding is the difference between the background selected icon size and the ripple
26        that was chosen, thus it's a hack to make it look pretty and not an official margin value-->
27    <LinearLayout
28        android:id="@id/nav_buttons"
29        android:layout_width="match_parent"
30        android:layout_height="wrap_content"
31        android:layout_weight="1"
32        android:gravity="center"
33        android:layoutDirection="ltr"
34        android:paddingEnd="20dp"
35        android:paddingStart="20dp">
36
37        <com.android.systemui.car.navigationbar.CarNavigationButton
38            android:id="@+id/home"
39            style="@style/NavigationBarButton"
40            systemui:componentNames="com.android.car.carlauncher/.CarLauncher"
41            systemui:icon="@drawable/car_ic_overview"
42            systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.HOME;launchFlags=0x14000000;end"
43            systemui:selectedIcon="@drawable/car_ic_overview_selected"
44            systemui:highlightWhenSelected="true"
45        />
46
47        <Space
48            android:layout_width="0dp"
49            android:layout_height="match_parent"
50            android:layout_weight="1"/>
51
52        <com.android.systemui.car.navigationbar.CarNavigationButton
53            android:id="@+id/maps_nav"
54            style="@style/NavigationBarButton"
55            systemui:categories="android.intent.category.APP_MAPS"
56            systemui:icon="@drawable/car_ic_navigation"
57            systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.APP_MAPS;launchFlags=0x14000000;end"
58            systemui:selectedIcon="@drawable/car_ic_navigation_selected"
59            systemui:highlightWhenSelected="true"
60        />
61
62        <Space
63            android:layout_width="0dp"
64            android:layout_height="match_parent"
65            android:layout_weight="1"/>
66
67        <com.android.systemui.car.navigationbar.CarNavigationButton
68            android:id="@+id/music_nav"
69            style="@style/NavigationBarButton"
70            systemui:categories="android.intent.category.APP_MUSIC"
71            systemui:icon="@drawable/car_ic_music"
72            systemui:intent="intent:#Intent;action=android.car.intent.action.MEDIA_TEMPLATE;launchFlags=0x10000000;end"
73            systemui:packages="com.android.car.media"
74            systemui:selectedIcon="@drawable/car_ic_music_selected"
75            systemui:highlightWhenSelected="true"
76        />
77
78        <Space
79            android:layout_width="0dp"
80            android:layout_height="match_parent"
81            android:layout_weight="1"/>
82
83        <com.android.systemui.car.navigationbar.CarNavigationButton
84            android:id="@+id/phone_nav"
85            style="@style/NavigationBarButton"
86            systemui:icon="@drawable/car_ic_phone"
87            systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;package=com.android.car.dialer;launchFlags=0x10000000;end"
88            systemui:packages="com.android.car.dialer"
89            systemui:selectedIcon="@drawable/car_ic_phone_selected"
90            systemui:highlightWhenSelected="true"
91        />
92
93        <Space
94            android:layout_width="0dp"
95            android:layout_height="match_parent"
96            android:layout_weight="1"/>
97
98        <com.android.systemui.car.navigationbar.CarNavigationButton
99            android:id="@+id/grid_nav"
100            style="@style/NavigationBarButton"
101            systemui:componentNames="com.android.car.carlauncher/.AppGridActivity"
102            systemui:icon="@drawable/car_ic_apps"
103            systemui:intent="intent:#Intent;component=com.android.car.carlauncher/.AppGridActivity;launchFlags=0x24000000;end"
104            systemui:selectedIcon="@drawable/car_ic_apps_selected"
105            systemui:highlightWhenSelected="true"
106        />
107
108        <Space
109            android:layout_width="0dp"
110            android:layout_height="match_parent"
111            android:layout_weight="1"/>
112
113        <com.android.systemui.car.navigationbar.CarNavigationButton
114            android:id="@+id/notifications"
115            style="@style/NavigationBarButton"
116            systemui:icon="@drawable/car_ic_notification"
117            systemui:longIntent="intent:#Intent;component=com.android.car.bugreport/.BugReportActivity;end"
118        />
119
120        <Space
121            android:layout_width="0dp"
122            android:layout_height="match_parent"
123            android:layout_weight="1"/>
124
125        <com.android.systemui.car.navigationbar.AssitantButton
126            android:id="@+id/assist"
127            style="@style/NavigationBarButton"
128            systemui:icon="@drawable/ic_mic_white"
129            systemui:useDefaultAppIconForRole="true"
130        />
131
132    </LinearLayout>
133
134    <LinearLayout
135        android:id="@+id/lock_screen_nav_buttons"
136        android:layout_width="match_parent"
137        android:layout_height="wrap_content"
138        android:layout_weight="1"
139        android:gravity="center"
140        android:layoutDirection="ltr"
141        android:paddingEnd="@dimen/car_keyline_1"
142        android:paddingStart="@dimen/car_keyline_1"
143        android:visibility="gone"
144    />
145
146</com.android.systemui.car.navigationbar.CarNavigationBarView>