Fix search view on phone
- Take SearchView out of the action bar on the phone
and put it into the overflow menu
- Hide menu item if already in search mode
Bug: 4575326
Change-Id: I63003bb2c31712510ffa30eadb65b8a511f42011
diff --git a/res/layout/custom_action_bar.xml b/res/layout/custom_action_bar.xml
new file mode 100644
index 0000000..2357756
--- /dev/null
+++ b/res/layout/custom_action_bar.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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.
+-->
+
+<FrameLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" >
+
+ <SearchView
+ android:id="@+id/search_view"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:iconifiedByDefault="false" />
+
+</FrameLayout>