Merge branch '761-keyboard_doesnt_close_on_userinteraction' into 'master'

use SHOW_IMPLICIT when showing the softkeyboard, otherwise it won't auto hide

* remove the forced hiding in ThreadListActivity as it should no longer be required

Signed-off-by: goapunk <noobie@goapunks.net>

Closes #761

See merge request !421
This commit is contained in:
akwizgran
2016-11-18 13:14:51 +00:00
2 changed files with 2 additions and 3 deletions

View File

@@ -179,7 +179,6 @@ public abstract class ThreadListActivity<G extends NamedGroup, A extends ThreadI
public boolean onOptionsItemSelected(MenuItem item) { public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) { switch (item.getItemId()) {
case android.R.id.home: case android.R.id.home:
if (textInput.isKeyboardOpen()) textInput.hideSoftKeyboard();
supportFinishAfterTransition(); supportFinishAfterTransition();
return true; return true;
default: default:

View File

@@ -27,7 +27,7 @@ import org.thoughtcrime.securesms.components.emoji.EmojiToggle;
import static android.content.Context.INPUT_METHOD_SERVICE; import static android.content.Context.INPUT_METHOD_SERVICE;
import static android.content.Context.LAYOUT_INFLATER_SERVICE; import static android.content.Context.LAYOUT_INFLATER_SERVICE;
import static android.view.KeyEvent.KEYCODE_BACK; import static android.view.KeyEvent.KEYCODE_BACK;
import static android.view.inputmethod.InputMethodManager.SHOW_FORCED; import static android.view.inputmethod.InputMethodManager.SHOW_IMPLICIT;
@UiThread @UiThread
public class TextInputView extends KeyboardAwareLinearLayout public class TextInputView extends KeyboardAwareLinearLayout
@@ -180,7 +180,7 @@ public class TextInputView extends KeyboardAwareLinearLayout
InputMethodManager imm = InputMethodManager imm =
(InputMethodManager) getContext() (InputMethodManager) getContext()
.getSystemService(INPUT_METHOD_SERVICE); .getSystemService(INPUT_METHOD_SERVICE);
imm.showSoftInput(ui.editText, SHOW_FORCED); imm.showSoftInput(ui.editText, SHOW_IMPLICIT);
} }
}); });
} }