Unable to disable some keys in it's new default Input Method, like "Input Method Options" key and "Voice Input" key.
And we may have other friends that just want to disable the Input Methods in their apps.
This post may help you on how to create a custom keyboard in your own apps.
*NOTE: This post is not telling you how to make a Input Method app*
First, you need to create a new XML file using for custom interface of your keyboard, this is easy on Android SDK because we have a UI Element called "Keyboard".
Here's one sample keyboard interface code:
(Anyone who knows how to paste code as a "code clip" in this blogspot, can tell me)
Here are two important sub elements:
- Row: each Row here is a new line for your keyboard, you can have as much rows as you want.
- Key: each Key here is a touch key with touch effects, like a big character box telling you which key is pressed.(Yes, the "Keyboard" element is so good that it already has this!)
Using any codes that you think is easier for you to remember.
OK, now you can add your custom keyboard into any place you want, like:
or if you want it always displaying at the bottom:
Now, we have a new keyboard!
Next Step post, we are going to work on activity's code, on display/hide keyboards, and also key press event catch.