Hide keyboard before showing the color picker

On some devices the keyboard is shown erroneously before the dialog
pull/162/head
M66B 5 years ago
parent 1d0a7b49ef
commit bf04f15d39

@ -1050,6 +1050,10 @@ public class FragmentCompose extends FragmentBase {
Log.i("Style action=" + action);
if (action == R.id.menu_color) {
InputMethodManager imm = (InputMethodManager) getContext().getSystemService(Activity.INPUT_METHOD_SERVICE);
if (imm != null)
imm.hideSoftInputFromWindow(etBody.getWindowToken(), 0);
Bundle args = new Bundle();
args.putInt("color", Color.TRANSPARENT);
args.putString("title", getString(R.string.title_style_color));

Loading…
Cancel
Save