Custom keyboard on android? -
i'd write own software keyboard on android. i've found blog post: http://android-developers.blogspot.ru/2009/04/creating-input-method.html have found softwarekeyboard
sample in android samples.
i compiled apk , installed in emulator. i've selected keyboard in settings / language & keyboard software keyboard not shown when focus editable control in apps. expect see button text "hey!" instead of keyboard:
/** * */ public class keyboardsservice extends inputmethodservice { private view view; @override public view oncreateinputview() { button button = new button(this); button.setlayoutparams(new linearlayout.layoutparams( linearlayout.layoutparams.fill_parent, 200 // 200 px )); button.settext("hey!"); view = button; button.setonclicklistener(new view.onclicklistener() { @override public void onclick(view view) { // send "enter" on click senddownupkeyevents(keyevent.keycode_enter); } }); return view; } }
so what's wrong? same problem samplekeyboard
sources - it's listed in software keyboards list not shown. can see default keyboard checked , not available. reason?
i afraid test on device did it. code above works hardware device not in emulator. have install apk, enable input method , se default.
Comments
Post a Comment