summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2014-05-01 17:09:20 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-01 17:09:20 +0000
commit5c015d2b8bef04a91463470563ec28eb20892064 (patch)
treeb88d7a4a2e8ca75fcf8a27d8b7772d6fb5833b01 /res
parent5e95dda66f6460f86c8f410a9ec5bff55f25a968 (diff)
parent53a2230258d105299c7f1b8bbd25de54fed5d66a (diff)
downloadandroid_packages_apps_Dialer-5c015d2b8bef04a91463470563ec28eb20892064.tar.gz
android_packages_apps_Dialer-5c015d2b8bef04a91463470563ec28eb20892064.tar.bz2
android_packages_apps_Dialer-5c015d2b8bef04a91463470563ec28eb20892064.zip
Merge "Use EditText for search in ActionBar"
Diffstat (limited to 'res')
-rw-r--r--res/layout/dialtacts_activity.xml47
-rw-r--r--res/layout/search_edittext.xml48
-rw-r--r--res/menu/dialtacts_options.xml9
-rw-r--r--res/values/dimens.xml4
4 files changed, 51 insertions, 57 deletions
diff --git a/res/layout/dialtacts_activity.xml b/res/layout/dialtacts_activity.xml
index 6d041034b..2cd796b60 100644
--- a/res/layout/dialtacts_activity.xml
+++ b/res/layout/dialtacts_activity.xml
@@ -46,53 +46,6 @@
android:id="@+id/search_and_remove_view_container"
android:visibility="gone"
>
- <!-- TODO: This is set to visibility:gone for now, should be removed entirely -->
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="@dimen/search_box_height"
- android:id="@+id/search_view_container"
- android:orientation="horizontal"
- android:layout_marginTop="@dimen/search_top_margin"
- android:layout_marginBottom="@dimen/search_bottom_margin"
- android:layout_marginLeft="@dimen/search_margin_horizontal"
- android:layout_marginRight="@dimen/search_margin_horizontal"
- android:paddingLeft="@dimen/search_box_left_padding"
- android:paddingRight="@dimen/search_box_right_padding"
- android:background="@drawable/search_bg"
- android:gravity="center_vertical"
- android:visibility="gone"
- >
- <EditText
- android:id="@+id/search_view"
- android:layout_width="match_parent"
- 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:inputType="textFilter"/>
- <ImageView
- android:id="@+id/search_close_button"
- android:layout_height="@dimen/search_box_icon_size"
- android:layout_width="@dimen/search_box_icon_size"
- android:padding="6dp"
- android:src="@drawable/ic_close_dk"
- android:clickable="true"
- android:background="?android:attr/selectableItemBackground"
- android:contentDescription="@string/description_clear_search"
- android:visibility="gone" />
- <ImageView
- android:id="@+id/voice_search_button"
- android:layout_height="@dimen/search_box_icon_size"
- android:layout_width="@dimen/search_box_icon_size"
- android:padding="@dimen/search_box_icon_padding"
- android:src="@drawable/ic_voice_search"
- android:clickable="true"
- android:contentDescription="@string/description_start_voice_search"
- android:background="?android:attr/selectableItemBackground" />
- </LinearLayout>
<com.android.dialer.list.RemoveView
android:layout_width="match_parent"
android:layout_height="56dp"
diff --git a/res/layout/search_edittext.xml b/res/layout/search_edittext.xml
new file mode 100644
index 000000000..236d2bf93
--- /dev/null
+++ b/res/layout/search_edittext.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:id="@+id/search_view_container"
+ android:orientation="horizontal"
+ android:layout_marginTop="@dimen/search_top_margin"
+ android:layout_marginBottom="@dimen/search_bottom_margin"
+ android:layout_marginLeft="@dimen/search_margin_horizontal"
+ android:layout_marginRight="@dimen/search_margin_horizontal"
+ android:paddingLeft="@dimen/search_box_left_padding"
+ android:paddingRight="@dimen/search_box_right_padding"
+ android:background="@drawable/search_bg"
+ android:gravity="center_vertical"
+ >
+ <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:hint="@string/dialer_hint_find_contact"
+ android:inputType="textFilter"/>
+ <ImageView
+ android:id="@+id/search_close_button"
+ android:layout_height="@dimen/search_box_icon_size"
+ android:layout_width="@dimen/search_box_icon_size"
+ android:padding="6dp"
+ android:src="@drawable/ic_close_dk"
+ android:clickable="true"
+ android:background="?android:attr/selectableItemBackground"
+ android:contentDescription="@string/description_clear_search"
+ android:visibility="gone" />
+ <ImageView
+ android:id="@+id/voice_search_button"
+ android:layout_height="@dimen/search_box_icon_size"
+ android:layout_width="@dimen/search_box_icon_size"
+ android:padding="@dimen/search_box_icon_padding"
+ android:src="@drawable/ic_voice_search"
+ android:clickable="true"
+ android:contentDescription="@string/description_start_voice_search"
+ android:background="?android:attr/selectableItemBackground" />
+</LinearLayout> \ No newline at end of file
diff --git a/res/menu/dialtacts_options.xml b/res/menu/dialtacts_options.xml
index a332030ff..17f4d9fe1 100644
--- a/res/menu/dialtacts_options.xml
+++ b/res/menu/dialtacts_options.xml
@@ -14,16 +14,11 @@
limitations under the License.
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android">
- <item
- android:id="@+id/menu_search"
- android:title="@string/description_search_button"
- android:showAsAction="always"
- android:actionViewClass="android.widget.SearchView"/>
+
<item
android:id="@+id/menu_history"
android:icon="@drawable/ic_menu_history_lt"
- android:title="@string/action_menu_call_history_description"
- android:showAsAction="ifRoom"/>
+ android:title="@string/action_menu_call_history_description" />
<item
android:id="@+id/menu_import_export"
android:title="@string/menu_import_export" />
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index c7972af05..89425dd8d 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -113,11 +113,9 @@
<!-- Margin to the left and right of the search box. -->
<dimen name="search_margin_horizontal">7dp</dimen>
<!-- Margin above the search box. -->
- <dimen name="search_top_margin">10dp</dimen>
+ <dimen name="search_top_margin">4dp</dimen>
<!-- Margin below the search box. -->
<dimen name="search_bottom_margin">4dp</dimen>
- <!-- Height of the search box. -->
- <dimen name="search_box_height">41dp</dimen>
<!-- Search box text size -->
<dimen name="search_text_size">13.24sp</dimen>
<!-- Search box interior padding - left -->