Open search ui on touch, and handle related scenarios.
- Add a touch listener to enter the search ui when the user touches
the search bar.
- Add a key listener to exit the search ui if the user closes the
keyboard while the text input is empty. SearchEditTextLayout was
added to facilitate this..
- Get rid of mFragmentsFrame, and control visibility of the
favorites view by adjusting the alpha of the lists framgent instead,
- Delete (hack) logic to change the background color.
- Enter the search ui whenever the dialpad is shown, and exit if it
is hidden and there is no query.
- Handle showing/hiding the actionbar depending on whether the
overlapping panel is displayed. This solution is a little hack, but
what seems to be a weird frameowrk interaction prevents the desired
solution of showing the action bar and then updating the hide offset.
Bug: 14900155
Change-Id: I4e06e4ed8eae49ef48317c99a556c51ff2a206a5
diff --git a/res/layout/search_edittext.xml b/res/layout/search_edittext.xml
index 236d2bf..f44cc0b 100644
--- a/res/layout/search_edittext.xml
+++ b/res/layout/search_edittext.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout
+<view class="com.android.dialer.widget.SearchEditTextLayout"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
@@ -45,4 +45,4 @@
android:clickable="true"
android:contentDescription="@string/description_start_voice_search"
android:background="?android:attr/selectableItemBackground" />
-</LinearLayout>
\ No newline at end of file
+</view>
\ No newline at end of file