]> gitweb.fperrin.net Git - Dictionary.git/commitdiff
In dictionary hide search icon once there is text.
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sat, 5 Dec 2015 13:25:53 +0000 (14:25 +0100)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sat, 5 Dec 2015 13:25:53 +0000 (14:25 +0100)
On many mobile phones there isn't enough space
to make it reasonable to waste it.

src/com/hughes/android/dictionary/DictionaryActivity.java

index db7e8aa7fae78e860628bba64108572d4f33557e..6720aa4e965192d9b17e7cb78a220ea0db6b0220 100644 (file)
@@ -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;