Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!-- Copyright (C) 2017 The Android Open Source Project
      3 
      4      Licensed under the Apache License, Version 2.0 (the "License");
      5      you may not use this file except in compliance with the License.
      6      You may obtain a copy of the License at
      7 
      8        http://www.apache.org/licenses/LICENSE-2.0
      9 
     10      Unless required by applicable law or agreed to in writing, software
     11      distributed under the License is distributed on an "AS IS" BASIS,
     12      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13      See the License for the specific language governing permissions and
     14      limitations under the License.
     15 -->
     16 <FrameLayout
     17     xmlns:android="http://schemas.android.com/apk/res/android"
     18     xmlns:app="http://schemas.android.com/apk/res-auto"
     19     android:background="@color/phone_theme"
     20     android:orientation="vertical"
     21     android:layout_width="match_parent"
     22     android:layout_height="match_parent">
     23 
     24     <FrameLayout
     25         android:background="@color/telecom_display_scrim"
     26         android:layout_width="match_parent"
     27         android:layout_height="match_parent" />
     28 
     29     <!-- In order for this FrameLayout's elevation to show up, there needs to be a background
     30          set on it that's not transparent. Therefore, set it as the same color as
     31          phone_theme. -->
     32     <FrameLayout
     33         android:id="@+id/search_container"
     34         android:background="@color/phone_theme"
     35         android:layout_width="match_parent"
     36         android:layout_height="@dimen/lens_header_height" >
     37 
     38         <FrameLayout
     39             android:background="@color/telecom_display_scrim"
     40             android:layout_width="match_parent"
     41             android:layout_height="match_parent" />
     42 
     43         <!-- This FrameLayout is used to center the ImageView in a space that is the width of
     44              stream_content_keyline_1. -->
     45         <FrameLayout
     46             android:layout_width="@dimen/stream_content_keyline_1"
     47             android:layout_height="match_parent">
     48 
     49             <ImageView
     50                 android:id="@+id/back"
     51                 android:background="@drawable/dialer_ripple_background"
     52                 android:layout_gravity="center"
     53                 android:layout_width="@dimen/stream_button_size"
     54                 android:layout_height="@dimen/stream_button_size"
     55                 android:src="@drawable/ic_arrow_back"
     56                 android:scaleType="center"
     57                 android:tint="@color/car_grey_50" />
     58         </FrameLayout>
     59 
     60         <com.android.car.stream.ui.StreamCardView
     61             android:layout_gravity="center"
     62             android:layout_width="match_parent"
     63             android:layout_height="@dimen/search_container_height"
     64             android:elevation="0dp"
     65             app:cardBackgroundColor="@color/car_card"
     66             app:cardCornerRadius="@dimen/search_container_radius">
     67 
     68             <ImageView
     69                 android:layout_gravity="start|center_vertical"
     70                 android:layout_width="@dimen/stream_button_size"
     71                 android:layout_height="@dimen/stream_button_size"
     72                 android:src="@drawable/ic_search"
     73                 android:scaleType="center"
     74                 android:tint="@color/search_container_controls_tint"/>
     75 
     76             <EditText
     77                 android:id="@+id/search_field"
     78                 android:layout_marginStart="@dimen/stream_button_size"
     79                 android:layout_marginEnd="@dimen/stream_button_size"
     80                 android:layout_gravity="center"
     81                 android:layout_width="match_parent"
     82                 android:layout_height="wrap_content"
     83                 android:inputType="textPersonName|textCapWords"
     84                 android:hint="@string/search_hint"
     85                 android:textColorHint="@color/search_container_text_hint"
     86                 style="@style/CarBody1" />
     87 
     88             <ImageView
     89                 android:id="@+id/clear"
     90                 android:background="@drawable/dialer_ripple_background"
     91                 android:layout_gravity="end|center_vertical"
     92                 android:layout_width="@dimen/stream_button_size"
     93                 android:layout_height="@dimen/stream_button_size"
     94                 android:src="@drawable/ic_cancel"
     95                 android:scaleType="center"
     96                 android:tint="@color/search_container_controls_tint"/>
     97         </com.android.car.stream.ui.StreamCardView>
     98     </FrameLayout>
     99 
    100     <FrameLayout
    101         android:id="@+id/content_fragment_container"
    102         android:layout_marginTop="@dimen/lens_header_height"
    103         android:layout_width="match_parent"
    104         android:layout_height="match_parent" />
    105 </FrameLayout>
    106