Hello!
I need help with showing the integrated virtual keyboard on-screen. I
extended a View class and I implemented these two methods (most of it
is just stub code; for now I only want to display the keyboard):
@Override
public InputConnection onCreateInputConnection (EditorInfo outAttrs)
{
BaseInputConnection fic = new BaseInputConnection(this, true);
outAttrs.actionLabel = null;
outAttrs.hintText = "Insert the test text";
outAttrs.initialCapsMode = 0;
outAttrs.initialSelEnd = outAttrs.initialSelStart = -1;
outAttrs.label = "Test text";
outAttrs.inputType = InputType.TYPE_CLASS_NUMBER |
InputType.TYPE_NUMBER_FLAG_DECIMAL;
outAttrs.imeOptions = EditorInfo.IME_ACTION_DONE;
return fic;
}
@Override
public boolean onCheckIsTextEditor() {
return true;
}
In the onCreate method of my activity I have :
InputMethodManager imm = (InputMethodManager)this.getSystemService
(Context.INPUT_METHOD_SERVICE);
imm.showInputMethodPicker();
imm.showSoftInput(editor, InputMethodManager.SHOW_FORCED);
Where editor is an instance of my View. I noticed in the debugger that
my onCreateInputConnection() is executed but after that the keyboard
is not displayed on the screen.
Using the TextView widtget and it's subclasses is not an option.
Thank you!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---