Home | History | Annotate | Download | only in layout
      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.statusbar.car.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     <LinearLayout
     26         android:id="@id/nav_buttons"
     27         android:layout_width="match_parent"
     28         android:layout_height="wrap_content"
     29         android:layout_weight="1"
     30         android:paddingStart="20dp"
     31         android:paddingEnd="20dp"
     32         android:gravity="center">
     33 
     34         <com.android.systemui.statusbar.car.CarFacetButton
     35             android:id="@+id/home"
     36             style="@style/NavigationBarButton"
     37             systemui:componentNames="com.android.car.carlauncher/.CarLauncher"
     38             systemui:icon="@drawable/car_ic_overview"
     39             systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.HOME;launchFlags=0x14000000;end"
     40             systemui:longIntent="intent:#Intent;action=com.google.android.demandspace.START;end"
     41             systemui:selectedIcon="@drawable/car_ic_overview_selected"
     42             systemui:useMoreIcon="false"
     43         />
     44 
     45         <Space
     46             android:layout_width="0dp"
     47             android:layout_height="match_parent"
     48             android:layout_weight="1"/>
     49 
     50         <com.android.systemui.statusbar.car.CarFacetButton
     51             android:id="@+id/maps_nav"
     52             style="@style/NavigationBarButton"
     53             systemui:categories="android.intent.category.APP_MAPS"
     54             systemui:icon="@drawable/car_ic_navigation"
     55             systemui:intent="intent:#Intent;component=com.android.car.carlauncher/.CarLauncher;category=android.intent.category.APP_MAPS;launchFlags=0x24000000;end"
     56             systemui:selectedIcon="@drawable/car_ic_navigation_selected"
     57             systemui:useMoreIcon="false"
     58         />
     59 
     60         <Space
     61             android:layout_width="0dp"
     62             android:layout_height="match_parent"
     63             android:layout_weight="1"/>
     64 
     65         <com.android.systemui.statusbar.car.CarFacetButton
     66             android:id="@+id/music_nav"
     67             style="@style/NavigationBarButton"
     68             systemui:categories="android.intent.category.APP_MUSIC"
     69             systemui:icon="@drawable/car_ic_music"
     70             systemui:intent="intent:#Intent;action=android.car.intent.action.MEDIA_TEMPLATE;launchFlags=0x10000000;end"
     71             systemui:packages="com.android.car.media"
     72             systemui:selectedIcon="@drawable/car_ic_music_selected"
     73             systemui:useMoreIcon="false"
     74         />
     75 
     76         <Space
     77             android:layout_width="0dp"
     78             android:layout_height="match_parent"
     79             android:layout_weight="1"/>
     80 
     81         <com.android.systemui.statusbar.car.CarFacetButton
     82             android:id="@+id/phone_nav"
     83             style="@style/NavigationBarButton"
     84             systemui:icon="@drawable/car_ic_phone"
     85             systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;package=com.android.car.dialer;launchFlags=0x10000000;end"
     86             systemui:packages="com.android.car.dialer"
     87             systemui:selectedIcon="@drawable/car_ic_phone_selected"
     88             systemui:useMoreIcon="false"
     89         />
     90 
     91         <Space
     92             android:layout_width="0dp"
     93             android:layout_height="match_parent"
     94             android:layout_weight="1"/>
     95 
     96         <com.android.systemui.statusbar.car.CarFacetButton
     97             android:id="@+id/grid_nav"
     98             style="@style/NavigationBarButton"
     99             systemui:componentNames="com.android.car.carlauncher/.AppGridActivity"
    100             systemui:icon="@drawable/car_ic_apps"
    101             systemui:intent="intent:#Intent;component=com.android.car.carlauncher/.AppGridActivity;launchFlags=0x24000000;end"
    102             systemui:selectedIcon="@drawable/car_ic_apps_selected"
    103             systemui:useMoreIcon="false"
    104         />
    105 
    106         <Space
    107             android:layout_width="0dp"
    108             android:layout_height="match_parent"
    109             android:layout_weight="1"/>
    110 
    111         <!-- Click handling will be initialized in CarNavigationBarView because its
    112              id = notifications which is treated special for the opening of the notification panel
    113          -->
    114         <com.android.systemui.statusbar.car.CarNavigationButton
    115             android:id="@+id/notifications"
    116             style="@style/NavigationBarButton"
    117             android:src="@drawable/car_ic_notification"
    118             systemui:selectedIcon="@drawable/car_ic_notification_selected"
    119             systemui:useMoreIcon="false"
    120         />
    121 
    122         <Space
    123             android:layout_width="0dp"
    124             android:layout_height="match_parent"
    125             android:layout_weight="1"/>
    126 
    127         <com.android.systemui.statusbar.car.CarFacetButton
    128             android:id="@+id/assist"
    129             style="@style/NavigationBarButton"
    130             systemui:icon="@drawable/ic_mic_white"
    131             systemui:intent="intent:#Intent;action=com.google.android.demandspace.START;end"
    132             systemui:useMoreIcon="false"
    133         />
    134     </LinearLayout>
    135 
    136     <LinearLayout
    137         android:id="@+id/lock_screen_nav_buttons"
    138         android:layout_width="match_parent"
    139         android:layout_height="wrap_content"
    140         android:layout_weight="1"
    141         android:paddingStart="@*android:dimen/car_keyline_1"
    142         android:paddingEnd="@*android:dimen/car_keyline_1"
    143         android:gravity="center"
    144         android:visibility="gone">
    145     </LinearLayout>
    146 
    147 </com.android.systemui.statusbar.car.CarNavigationBarView>
    148