diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2016-07-21 10:42:30 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2016-07-22 13:17:30 -0700 |
commit | ce3fffb5fb446e031e52ee0c5f2a4a5cf86a8c81 (patch) | |
tree | 7f95627d9e96e445b5dc9f03d6ed2a02eca408f3 /src/com/android/launcher3/allapps/AllAppsSearchBarController.java | |
parent | 58368b15152052fb479891f0d3aba30ab3794fba (diff) | |
download | android_packages_apps_Trebuchet-ce3fffb5fb446e031e52ee0c5f2a4a5cf86a8c81.tar.gz android_packages_apps_Trebuchet-ce3fffb5fb446e031e52ee0c5f2a4a5cf86a8c81.tar.bz2 android_packages_apps_Trebuchet-ce3fffb5fb446e031e52ee0c5f2a4a5cf86a8c81.zip |
Updating the search hint to contain the icon as a span object.
This makes the icon part of the hint text, and removes any need for
custom focus event handling.
Also the icon will now appear at the start of the text based on the
direction of the text and not the direction of the layout
Change-Id: I06c5cf99492d75b1005c69ec7c521cde0fdab010
Diffstat (limited to 'src/com/android/launcher3/allapps/AllAppsSearchBarController.java')
-rw-r--r-- | src/com/android/launcher3/allapps/AllAppsSearchBarController.java | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/src/com/android/launcher3/allapps/AllAppsSearchBarController.java b/src/com/android/launcher3/allapps/AllAppsSearchBarController.java index b4a71caf8..ac3593238 100644 --- a/src/com/android/launcher3/allapps/AllAppsSearchBarController.java +++ b/src/com/android/launcher3/allapps/AllAppsSearchBarController.java @@ -39,8 +39,7 @@ import java.util.ArrayList; * An interface to a search box that AllApps can command. */ public abstract class AllAppsSearchBarController - implements TextWatcher, OnEditorActionListener, ExtendedEditText.OnBackKeyListener, - View.OnFocusChangeListener { + implements TextWatcher, OnEditorActionListener, ExtendedEditText.OnBackKeyListener { protected Launcher mLauncher; protected AlphabeticalAppsList mApps; @@ -50,8 +49,6 @@ public abstract class AllAppsSearchBarController protected DefaultAppSearchAlgorithm mSearchAlgorithm; protected InputMethodManager mInputMethodManager; - protected View mHintView; - public void setVisibility(int visibility) { mInput.setVisibility(visibility); } @@ -69,7 +66,6 @@ public abstract class AllAppsSearchBarController mInput.addTextChangedListener(this); mInput.setOnEditorActionListener(this); mInput.setOnBackKeyListener(this); - mInput.setOnFocusChangeListener(this); mInputMethodManager = (InputMethodManager) mInput.getContext().getSystemService(Context.INPUT_METHOD_SERVICE); @@ -130,27 +126,6 @@ public abstract class AllAppsSearchBarController return false; } - @Override - public void onFocusChange(View view, boolean focused) { - if (mHintView != null) { - mHintView.setVisibility(focused ? View.INVISIBLE : View.VISIBLE); - } - } - - /** - * Sets a view to serve as the search field's hint. - */ - public void setHintView(View hintView) { - mHintView = hintView; - } - - /** - * Returns the search field's hint view. - */ - public View getHintView() { - return mHintView; - } - /** * Resets the search bar state. */ |