[Android] Hide keyboard if query is already set in Search

Geoffrey Métais git at videolan.org
Wed Apr 5 14:01:10 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Apr  5 12:19:13 2017 +0200| [ecebc41cae170c346fc8eef1c15f61c229ac11e1] | committer: Geoffrey Métais

Hide keyboard if query is already set in Search

> https://code.videolan.org/videolan/vlc-android/commit/ecebc41cae170c346fc8eef1c15f61c229ac11e1
---

 vlc-android/src/org/videolan/vlc/gui/SearchActivity.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/vlc-android/src/org/videolan/vlc/gui/SearchActivity.java b/vlc-android/src/org/videolan/vlc/gui/SearchActivity.java
index b009fa1..66088eb 100644
--- a/vlc-android/src/org/videolan/vlc/gui/SearchActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/SearchActivity.java
@@ -53,6 +53,7 @@ public class SearchActivity extends AppCompatActivity implements TextWatcher, Te
             String query = intent.getStringExtra(SearchManager.QUERY);
             initializeLists();
             if (!TextUtils.isEmpty(query)) {
+                getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
                 if (mMedialibrary.isInitiated()) {
                     mBinding.searchEditText.setText(query);
                     mBinding.searchEditText.setSelection(query.length());



More information about the Android mailing list