Hello all!

I am building a custom view and would like to pragmatically display
the default on-screen input method (if any) when certain conditions
are met. Due to some specific features of the view I am not able to
reuse the TextView and EditText views with all the functionality
already present. The idea was to simply display the keyboard and
capture the keypress events in the view.

inputMethodManager = (InputMethodManager) getSystemService
( Context.INPUT_METHOD_SERVICE );
inputMethodManager.showSoftInput ( editorView,
InputMethodManager.SHOW_FORCED );

While the approach seems to work with EditText I was not able to show
the on-screen keyboard ( showInputMethodPicker () seems to work ).
While browsing the TextView source code I came across the following
method:

@Override public InputConnection onCreateInputConnection(EditorInfo
outAttrs)

that (basically) returns

InputConnection ic = new EditableInputConnection(this);

I was not able to find the class EditableInputConnection in the
documentation or in the source code.

I would appreciate any kind of advice on how to show the on screen
keyboard and how to properly register my view so it can receive the
keypress events.

Many Thanks,
Martin S.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to