From fe76c2cc9f6aa3fdda2716bf378813bd2d694e99 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Reimar=20D=C3=B6ffinger?= Date: Sat, 5 Dec 2015 14:25:53 +0100 Subject: [PATCH] In dictionary hide search icon once there is text. On many mobile phones there isn't enough space to make it reasonable to waste it. --- src/com/hughes/android/dictionary/DictionaryActivity.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/com/hughes/android/dictionary/DictionaryActivity.java b/src/com/hughes/android/dictionary/DictionaryActivity.java index db7e8aa..6720aa4 100644 --- a/src/com/hughes/android/dictionary/DictionaryActivity.java +++ b/src/com/hughes/android/dictionary/DictionaryActivity.java @@ -1575,6 +1575,11 @@ public class DictionaryActivity extends ActionBarActivity { Log.d(LOG, "searchText changed during shutdown, doing nothing."); return; } + + // Hide search icon once text is entered + searchView.setIconifiedByDefault(text.length() > 0); + searchView.setIconified(false); + // if (!searchView.hasFocus()) { // Log.d(LOG, "searchText changed without focus, doing nothing."); // return; -- 2.43.0