minimize softkeyboard only if it has been in fullscreen mode

This commit is contained in:
Daniel Gultsch 2015-09-04 18:02:53 +02:00
parent 204cee4a17
commit 9baa87e5c9

View File

@ -232,7 +232,9 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
if (actionId == EditorInfo.IME_ACTION_SEND) { if (actionId == EditorInfo.IME_ACTION_SEND) {
InputMethodManager imm = (InputMethodManager) v.getContext() InputMethodManager imm = (InputMethodManager) v.getContext()
.getSystemService(Context.INPUT_METHOD_SERVICE); .getSystemService(Context.INPUT_METHOD_SERVICE);
if (imm.isFullscreenMode()) {
imm.hideSoftInputFromWindow(v.getWindowToken(), 0); imm.hideSoftInputFromWindow(v.getWindowToken(), 0);
}
sendMessage(); sendMessage();
return true; return true;
} else { } else {