Android: bind SoftKeyboard (InputMethodService) to EditText

I am trying to convince EditText-view to use only the SoftKeyboard that I wrote. He has been listening to me for several days now, and I cannot believe that this is impossible. I do not see the obvious ...

So far, I have managed to write my own SoftKeyboard based on the sample that comes with the Android SDK. I can manually select it as an input method (long click, input method, * select *). SoftKeyboard works great and does everything I want. I also cleared the context menu to prevent the input method from being changed (obviously, I currently need it to be in the menu, otherwise I would not be able to select my SoftKeyboard).

In other words, it remains only to bind SoftKeyboard to EditText.

I noticed a bunch of ime*-attributes on EditText, but they don't seem to be useful for my problem, since I don't want to change anything about the action key. inputMethodrequires KeyListenerwhich is not in SoftKeyboard (I tried to make it one, but there seems to be a problem with the class loader, as it will not find my class => ClassNotFoundException).

Can someone provide me with some useful information?

+2
source share
2 answers

I am currently inventing my approach and trying to work without InputMethodService. I save the sample code as a link to handle user input. Basically, it should be just a view that appears when necessary.

-, . , .

+3

,

, , , , " ". , . .

, , .

, . , KeyboardView, - , View . EditText, (, ), - .

,

, EditText.

0

All Articles