show keyboard only on fresh activity

This commit is contained in:
Daniel Gultsch 2018-05-01 10:47:43 +02:00
parent 303cc89b61
commit 35e6547db4

View file

@ -119,7 +119,9 @@ public class SearchActivity extends XmppActivity implements TextWatcher, OnSearc
searchField.addTextChangedListener(this); searchField.addTextChangedListener(this);
searchField.setHint(R.string.search_messages); searchField.setHint(R.string.search_messages);
searchField.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_AUTO_COMPLETE); searchField.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_AUTO_COMPLETE);
if (term == null) {
showKeyboard(searchField); showKeyboard(searchField);
}
return super.onCreateOptionsMenu(menu); return super.onCreateOptionsMenu(menu);
} }