Have you looked at the documentation? http://developer.android.com/reference/android/view/View.html#onCreateInputConnection(android.view.inputmethod.EditorInfo)
http://developer.android.com/reference/android/view/inputmethod/InputConnection.html http://developer.android.com/reference/android/view/inputmethod/BaseInputConnection.html On Tue, Jul 28, 2009 at 1:56 AM, LambergaR <martin.s...@gmail.com> wrote: > > 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. > > > -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---