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<view xmlns:android="http://schemas.android.com/apk/res/android"
17  android:id="@+id/search_view_container"
18  class="com.android.dialer.app.widget.SearchEditTextLayout"
19  android:layout_width="match_parent"
20  android:layout_height="match_parent"
21  android:layout_marginTop="@dimen/search_top_margin"
22  android:layout_marginBottom="@dimen/search_bottom_margin"
23  android:layout_marginLeft="@dimen/search_margin_horizontal"
24  android:layout_marginRight="@dimen/search_margin_horizontal"
25  android:background="@drawable/rounded_corner"
26  android:elevation="@dimen/search_box_elevation"
27  android:theme="@style/DialtactsSearchBarThemeOverlay"
28  android:orientation="horizontal">
29
30  <RelativeLayout
31    android:id="@+id/search_box_collapsed"
32    android:layout_width="match_parent"
33    android:layout_height="match_parent"
34    android:background="?android:attr/selectableItemBackground"
35    android:gravity="center_vertical">
36
37    <ImageView
38      android:id="@+id/search_magnifying_glass"
39      android:layout_width="@dimen/search_box_icon_size"
40      android:layout_height="@dimen/search_box_icon_size"
41      android:layout_marginStart="8dp"
42      android:layout_centerVertical="true"
43      android:importantForAccessibility="no"
44      android:scaleType="center"
45      android:src="@drawable/quantum_ic_search_vd_theme_24"
46      android:tint="?colorIcon"/>
47
48    <TextView
49      android:id="@+id/search_box_start_search"
50      android:layout_width="wrap_content"
51      android:layout_height="match_parent"
52      android:layout_toEndOf="@+id/search_magnifying_glass"
53      android:layout_toStartOf="@+id/voice_search_button"
54      android:layout_marginStart="8dp"
55      android:fontFamily="@string/search_font_family"
56      android:gravity="center_vertical"
57      android:hint="@string/dialer_hint_find_contact"
58      android:textSize="@dimen/search_collapsed_text_size"/>
59
60    <ImageView
61      android:id="@+id/voice_search_button"
62      android:layout_width="@dimen/search_box_icon_size"
63      android:layout_height="match_parent"
64      android:layout_toStartOf="@+id/dialtacts_options_menu_button"
65      android:background="?android:attr/selectableItemBackgroundBorderless"
66      android:clickable="true"
67      android:contentDescription="@string/description_start_voice_search"
68      android:scaleType="center"
69      android:src="@drawable/ic_mic_grey600"
70      android:tint="?colorIcon"/>
71
72    <ImageButton
73      android:id="@+id/dialtacts_options_menu_button"
74      android:layout_width="@dimen/search_box_icon_size"
75      android:layout_height="match_parent"
76      android:layout_alignParentEnd="true"
77      android:background="?android:attr/selectableItemBackgroundBorderless"
78      android:contentDescription="@string/action_menu_overflow_description"
79      android:scaleType="center"
80      android:src="@drawable/quantum_ic_more_vert_white_24"
81      android:tint="?colorIcon"/>
82  </RelativeLayout>
83
84  <include layout="@layout/search_bar_expanded"/>
85</view>
86