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 <RelativeLayout
     19     xmlns:android="http://schemas.android.com/apk/res/android"
     20     android:id="@+id/header"
     21     android:layout_width="match_parent"
     22     android:layout_height="wrap_content"
     23     android:background="@color/car_card"
     24     android:clipChildren="false"
     25     android:clipToPadding="false"
     26     android:gravity="center_vertical"
     27     android:orientation="horizontal">
     28 
     29     <FrameLayout
     30         android:id="@+id/exit_button_container"
     31         android:layout_width="@dimen/car_margin"
     32         android:layout_height="@dimen/car_app_bar_height"
     33         android:layout_alignParentStart="true"
     34         android:layout_centerVertical="true"
     35         android:background="@drawable/car_card_ripple_background"
     36         android:clickable="true"
     37         android:focusable="true">
     38         <ImageButton
     39             android:layout_width="@dimen/car_primary_icon_size"
     40             android:layout_height="@dimen/car_primary_icon_size"
     41             android:layout_gravity="center"
     42             android:background="@null"
     43             android:src="@drawable/ic_clear_black"
     44             android:tint="@color/car_tint"
     45             android:scaleType="fitXY"
     46             android:adjustViewBounds="true"
     47             android:clickable="false"
     48             android:focusable="false" />
     49     </FrameLayout>
     50 
     51     <TextView
     52         android:layout_width="wrap_content"
     53         android:layout_height="@dimen/car_app_bar_height"
     54         android:layout_toEndOf="@id/exit_button_container"
     55         android:gravity="center_vertical"
     56         android:text="@string/all_apps"
     57         android:textAppearance="@style/TextAppearance.Car.Title2" />
     58 
     59     <FrameLayout
     60         android:id="@+id/search_button_container"
     61         android:layout_width="@dimen/car_margin"
     62         android:layout_height="@dimen/car_touch_target_size"
     63         android:layout_centerVertical="true"
     64         android:layout_alignParentEnd="true"
     65         android:background="@drawable/car_card_ripple_background"
     66         android:clickable="true"
     67         android:focusable="true"
     68         android:visibility="gone">
     69         <ImageButton
     70             android:layout_width="@dimen/car_primary_icon_size"
     71             android:layout_height="@dimen/car_primary_icon_size"
     72             android:layout_gravity="center"
     73             android:background="@null"
     74             android:src="@drawable/ic_search_black"
     75             android:tint="@color/car_tint"
     76             android:scaleType="fitXY"
     77             android:adjustViewBounds="true"
     78             android:clickable="false"
     79             android:focusable="false" />
     80     </FrameLayout>
     81 
     82     <View
     83         android:layout_width="match_parent"
     84         android:layout_height="@dimen/car_list_divider_height"
     85         android:layout_alignBottom="@id/exit_button_container"
     86         android:background="@color/car_list_divider"/>
     87 </RelativeLayout>
     88 
     89