summaryrefslogtreecommitdiffstats
path: root/res/layout
diff options
context:
space:
mode:
authorBrian Attwell <brianattwell@google.com>2014-05-30 16:46:36 -0700
committerBrian Attwell <brianattwell@google.com>2014-05-30 17:20:23 -0700
commit139796585b7389ab557b99cefdc2f2a741bc7f67 (patch)
tree6f9219ff0085377f6b25d159f491cd7218b2882e /res/layout
parent2d8c0c7e73ea10963acd614f98978538179b7ac6 (diff)
downloadandroid_packages_apps_ContactsCommon-139796585b7389ab557b99cefdc2f2a741bc7f67.tar.gz
android_packages_apps_ContactsCommon-139796585b7389ab557b99cefdc2f2a741bc7f67.tar.bz2
android_packages_apps_ContactsCommon-139796585b7389ab557b99cefdc2f2a741bc7f67.zip
Move search_bar_expanded into common
In the process of moving this, I also found and fixed two bugs. 1) Text size was set incorrectly (looked like a typo) 2) The "up button" used the "content overflow"s content description Change-Id: I8d1f1904e3091461f964ba98483a9afbce05fecd
Diffstat (limited to 'res/layout')
-rw-r--r--res/layout/search_bar_expanded.xml60
1 files changed, 60 insertions, 0 deletions
diff --git a/res/layout/search_bar_expanded.xml b/res/layout/search_bar_expanded.xml
new file mode 100644
index 00000000..8bd1fff1
--- /dev/null
+++ b/res/layout/search_bar_expanded.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/search_box_expanded"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="horizontal"
+ android:gravity="center_vertical"
+ android:visibility="gone" >
+
+ <ImageButton
+ android:id="@+id/search_back_button"
+ android:layout_width="@dimen/search_box_icon_size"
+ android:layout_height="@dimen/search_box_icon_size"
+ android:layout_margin="@dimen/search_box_icon_margin"
+ android:src="@drawable/ic_back_arrow"
+ android:background="?android:attr/selectableItemBackground"
+ android:contentDescription="@string/action_menu_back_from_search"
+ android:tint="@color/actionbar_background_color" />
+
+ <EditText
+ android:id="@+id/search_view"
+ android:layout_width="0dp"
+ android:layout_height="@dimen/search_box_icon_size"
+ android:layout_weight="1"
+ android:layout_marginLeft="@dimen/search_box_text_left_margin"
+ android:textSize="@dimen/search_text_size"
+ android:fontFamily="@string/search_font_family"
+ android:textColor="@color/searchbox_text_color"
+ android:textColorHint="@color/searchbox_hint_text_color"
+ android:background="@null"
+ android:inputType="textFilter"
+ android:singleLine="true"
+ android:imeOptions="flagNoExtractUi" />
+
+ <ImageView
+ android:id="@+id/search_close_button"
+ android:layout_height="@dimen/search_box_icon_size"
+ android:layout_width="@dimen/search_box_icon_size"
+ android:layout_margin="@dimen/search_box_icon_margin"
+ android:src="@drawable/ic_close_dk"
+ android:clickable="true"
+ android:background="?android:attr/selectableItemBackground"
+ android:contentDescription="@string/description_clear_search" />
+
+</LinearLayout> \ No newline at end of file