blob: 19322288852f0df5c2122065cb2c3686a80323d7 [file] [log] [blame]
Yorke Lee53a22302014-04-29 18:13:46 -07001<?xml version="1.0" encoding="utf-8"?>
Andrew Leeb1903842014-05-15 16:11:24 -07002<view class="com.android.dialer.widget.SearchEditTextLayout"
Yorke Lee53a22302014-04-29 18:13:46 -07003 xmlns:android="http://schemas.android.com/apk/res/android"
4 android:layout_width="match_parent"
5 android:layout_height="match_parent"
6 android:id="@+id/search_view_container"
7 android:orientation="horizontal"
8 android:layout_marginTop="@dimen/search_top_margin"
9 android:layout_marginBottom="@dimen/search_bottom_margin"
10 android:layout_marginLeft="@dimen/search_margin_horizontal"
11 android:layout_marginRight="@dimen/search_margin_horizontal"
12 android:paddingLeft="@dimen/search_box_left_padding"
13 android:paddingRight="@dimen/search_box_right_padding"
Yorke Leeec489fb2014-05-19 15:39:27 -070014 android:background="@drawable/rounded_corner"
Yorke Lee75862682014-05-19 14:02:33 -070015 android:elevation="@dimen/search_box_elevation"
Yorke Lee53a22302014-04-29 18:13:46 -070016 >
Yorke Lee11ca39e2014-05-19 20:31:37 -070017 <LinearLayout
18 android:id="@+id/search_box_collapsed"
19 android:layout_width="match_parent"
20 android:layout_height="match_parent"
21 android:gravity="center_vertical"
22 android:orientation="horizontal" >
23
24 <!-- Portion of the search box that starts a search when clicked -->
25 <LinearLayout
26 android:id="@+id/search_box_start_search"
27 android:layout_height="wrap_content"
28 android:layout_width="0dp"
29 android:layout_weight="1"
30 android:gravity="center_vertical" >
31
32 <ImageView
33 android:id="@+id/search_magnifying_glass"
34 android:layout_height="@dimen/search_box_icon_size"
35 android:layout_width="@dimen/search_box_icon_size"
36 android:layout_margin="@dimen/search_box_icon_margin"
37 android:padding="@dimen/search_box_search_icon_padding"
38 android:src="@drawable/ic_ab_search"
39 android:importantForAccessibility="no" />
40
41 <TextView
42 android:layout_width="wrap_content"
43 android:layout_height="@dimen/search_box_icon_size"
44 android:layout_marginLeft="@dimen/search_box_text_left_margin"
45 android:textSize="@dimen/search_text_size"
46 android:fontFamily="@string/search_font_family"
47 android:textColor="@color/searchbox_text_color"
48 android:textColorHint="@color/searchbox_hint_text_color"
49 android:gravity="center_vertical"
50 android:hint="@string/dialer_hint_find_contact" />
51
52 </LinearLayout>
53
54 <ImageView
55 android:id="@+id/voice_search_button"
56 android:layout_height="@dimen/search_box_icon_size"
57 android:layout_width="@dimen/search_box_icon_size"
58 android:layout_margin="@dimen/search_box_icon_margin"
59 android:src="@drawable/ic_voice_search"
60 android:clickable="true"
61 android:contentDescription="@string/description_start_voice_search"
62 android:background="?android:attr/selectableItemBackground" />
63
64 <ImageButton
65 android:id="@+id/dialtacts_options_menu_button"
66 android:layout_width="@dimen/search_box_icon_size"
67 android:layout_height="@dimen/search_box_icon_size"
68 android:layout_margin="@dimen/search_box_icon_margin"
69 android:background="?android:attr/selectableItemBackground"
70 android:src="@drawable/ic_overflow_menu"
71 android:contentDescription="@string/action_menu_overflow_description"
72 android:tint="@color/searchbox_options_menu_color" />
73
74 </LinearLayout>
75
76 <LinearLayout
77 android:id="@+id/search_box_expanded"
78 android:layout_width="match_parent"
79 android:layout_height="match_parent"
80 android:orientation="horizontal"
81 android:gravity="center_vertical"
82 android:visibility="gone" >
83
84 <ImageButton
85 android:id="@+id/search_back_button"
86 android:layout_width="@dimen/search_box_icon_size"
87 android:layout_height="@dimen/search_box_icon_size"
88 android:layout_margin="@dimen/search_box_icon_margin"
89 android:src="@drawable/ic_back_arrow"
90 android:background="?android:attr/selectableItemBackground"
91 android:contentDescription="@string/action_menu_overflow_description"
92 android:tint="@color/actionbar_background_color" />
93
94 <EditText
95 android:id="@+id/search_view"
96 android:layout_width="0dp"
97 android:layout_height="@dimen/search_box_icon_size"
98 android:layout_weight="1"
99 android:layout_marginLeft="@dimen/search_box_text_left_margin"
100 android:textSize="@dimen/search_text_size"
101 android:fontFamily="@string/search_font_family"
102 android:textColor="@color/searchbox_text_color"
103 android:inputType="textFilter" />
104
105 <ImageView
106 android:id="@+id/search_close_button"
107 android:layout_height="@dimen/search_box_icon_size"
108 android:layout_width="@dimen/search_box_icon_size"
109 android:layout_margin="@dimen/search_box_icon_margin"
110 android:src="@drawable/ic_close_dk"
111 android:clickable="true"
112 android:background="?android:attr/selectableItemBackground"
113 android:contentDescription="@string/description_clear_search" />
114
115 </LinearLayout>
116
117</view>