my case is: I have one EditText field that is with disabled focus.
Beside EditText field I has two buttons for Input methods. So I want when click first button: to open soft keybord and edit text in EditText field. I try many ways with:
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(yourEditText, InputMethodManager.SHOW_IMPLICIT);
and doesn’t work for me. Only way to open soft keyboard is:
toggleSoftInput(InputMethodManager.SHOW_FORCED, 0)
but there is no way to edit info from EditText field.
May you suggest me how to open keyboard and edit text for some EditText when click button.
Thanks a lot!
Edited:
So, EditText is not focusable be default. When I click Keyboard button – should be focusable, then show me soft keyboard to enter text and appear in EditText. Other method to insert is A-B-C button which not required keyboard. It will be something like Morse code input – touch and hold A-B-C button ๐ I’ll try suggested example to implement in my case. Thank you guys ๐

Thanks guys for your help ๐ I used all suggestions that you gave me, searched and tested a lot of other scripts and finally my code is working ๐
Here is my final code:
It may be useful for someone ๐
Thank you!