From 3842bee072ea24c1a64b0d66f88861de5dbdb346 Mon Sep 17 00:00:00 2001 From: calav3ra_de Date: Mon, 4 Mar 2013 15:30:29 +0100 Subject: [PATCH] possible fix for Issue #27: softkeyboard not hiding on suggestions being clicked possible fix for Issue #27: softkeyboard not hiding on suggestions being clicked --- Catlog/src/com/nolanlawson/logcat/LogcatActivity.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Catlog/src/com/nolanlawson/logcat/LogcatActivity.java b/Catlog/src/com/nolanlawson/logcat/LogcatActivity.java index 77e784f..d3c1e2e 100644 --- a/Catlog/src/com/nolanlawson/logcat/LogcatActivity.java +++ b/Catlog/src/com/nolanlawson/logcat/LogcatActivity.java @@ -1375,6 +1375,16 @@ private void setUpWidgets() { searchEditText.setOnEditorActionListener(this); searchEditText.setOnClickListener(this); + searchEditText.setOnItemClickListener(new OnItemClickListener() + { + @Override + public void onItemClick(AdapterView parent, View view, int position, long id) + { + InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); + imm.hideSoftInputFromWindow(searchEditText.getWindowToken(), 0); + } + }); + searchSuggestionsAdapter = new SortedFilterArrayAdapter( this, R.layout.simple_dropdown_small, new ArrayList()); searchEditText.setAdapter(searchSuggestionsAdapter);