From: Reimar Döffinger Date: Sat, 5 Dec 2015 13:25:53 +0000 (+0100) Subject: In dictionary hide search icon once there is text. X-Git-Url: http://gitweb.fperrin.net/?p=Dictionary.git;a=commitdiff_plain;h=fe76c2cc9f6aa3fdda2716bf378813bd2d694e99 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. --- 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;