How to create a customized android keyboard? - android

I am trying to figure out how to make a customized android keyboard. I want additional keys in the keyboard like page up, page down, etc. I want these keys to perform the actions that I want them to do. For example,
http://www.addictivetips.com/mobile/hackers-keyboard-is-a-full-5-row-on-screen-keyboard-for-android/
Have a look at the above provided keyboard layouts. How can i do this? Any useful pointers??
Thank you in advance,
Mohsin

You need to create an input method.
Read more about it here, here and here.

Related

How to make a custom keyboard in andorid

I want to make a custom keyboard in android. is any body help me how to make custom keyboard in android.
and one more question, how to make a emoji button in custom keyboard. i want to use mine own emoji's. is it possible??
Yes you can create your own keyboard with emoji's you have to use inputmathod service to create your own keyboard (You can take help from this link)
This link also

app specific keyboard

I don't want to replace the entire soft keyboard. I want to add a Next/Prev buttons when the soft keyboard is deployed when a field in my WebView in the fashion that looks like the display on mylogin.yahoo.com
http://imgur.com/a/zH0Ux
I have found this on github
https://github.com/chrisboyle/sgtpuzzles/blob/master/src/name/boyle/chris/sgtpuzzles/SmallKeyboard.java
which seems like a reasonable way to accomplish this functionality.
Is extending android.inputmethodservice.KeyboardView be a reasonable way to go?
Mark
Yes, extend it is the best way to go. Wrap what you want to add. Create another keyboard and set it to that keyboard.

How do i add words to the suggestions on top of the soft keyboard

Is there any way to add words to the suggestions in the soft keyboard?
For a specific Edittext field i would like to add a list of names to the suggestions that pops up on top of the soft keyboard in android 2.0.
Does anyone know if this is possible?
Here is the source code of the soft keyboard.
If you go through the code, you will see that it uses a Suggest class which inside has different dictionaries.
If you want to add words for a specific EditText you would need to add and remove or change freq of a certain word from those dictionaries.
Some issues:
I couldn't find a way to get the InputMethodService's instance. (If you can, please answer my question here)
Android allows developers to program their own InputMethodService. I am working on one myself and my implementation doesn't use that dictionaries. So your feature will not work with my IME.
I would suggest using Auto Complete.
You can't add additional words to the ones the IME finds internally, however you can whole-sale supply your own completions via InputMethodManager.displayCompletions():
http://developer.android.com/reference/android/view/inputmethod/InputMethodManager.html#displayCompletions(android.view.View, android.view.inputmethod.CompletionInfo[])
This is what the auto complete text view uses to show its completions in the IME, when the IME is full screen so it can't be seen. Note that your app is still responsible for showing the completions itself, so they will be available to the user if the IME is not full screen.
(And sorry about the lack of documentation on that method.)

android app specific soft keyboard

Is there a way to create an app specific soft keyboard on Android? After reading about InputMethodService docs and checking out alternative keyboard apps out there, I figure the alternate keyboard can only be configured for system wide usage (through Settings -> Locale and Text).
If the answer to above question is no, then is there at least a way to load a custom dictionary and override the default dictionary of the system keyboard (only when my app is in use)? That will help in giving very relevant suggestions to the user when he has only tapped couple of keys.
If you just want a View that looks and acts like a soft keyboard, I did that in my SmallKeyboard class. You just need to extend android.inputmethodservice.KeyboardView and decide on layout. See the onKey and onText methods at the end of that file for the action taken when keys are pressed.
Instead of my keyboard model inner class, you could load it from XML if your key set is fairly constant.
The Android Nethack application has a complete and clear source code example of how to create a custom keyboard for an application, how to display it on screen and how to define multiple keyboard layouts. It contains pretty much everything you need to know.
It is by far the best example I have seen.
http://code.google.com/p/nethack-android/

How to add two possible keys in one keyboard button

I've been trying to create my own android keyboard following this guide and looking at the latinIME souce code.
While reading the kbd_qwerty.xml file I noticed the different tags used and explained here. I was expecting to see certain tag to reproduce what BetterKeyboard application does. They draw more than one key on each button. Example.
Are they adding images or this is somehow possible from the xml?
Thanks for reading!
Better Keyboard completely rewrote the onscreen keyboard so they can do what every they want with the layout and key functions. With the default Android keyboard you'll need to stick with one glyph per key. Of course you can always use alt's to get other characters.

Categories

Resources