Android: display an image behind the soft keyboard - android

I would like to create an application that can change / modify your default keyboard so that it has an image behind it (keys would be a little transparent so that you could see the image through the keyboard).
Can you point me in the right direction? I have looked at some sample applications, but this seems like an easy task, maybe with an easy solution?

You cannot modify or interfere with the user's default keyboard in any way whatsoever for security reasons.
The only way you'll get this done is if you write your own keyboard.

Related

Creating custom android keyboard NOT from scratch (modify system keyboard)

What I need is to add a custom key to android keyboard. I know I can implement my own keyboard but implementing all the functionalities (dictionary, swipe, microphone button etc) sounds like a lot of work. I see two solutions:
modify system keyboard (I expect it not to be possible, but it's
sometimes good to ask :))
create my own keyboard but somehow deriving it from existing one
Is any of these possible? Any other ideas?
After an investigation, answers are:
not possible
not possible
:)

Can I reposition and/or split android keyboard?

I am writing a custom android IME, and would like the keyboard on the side of the display rather than the bottom (actually, I want the user to have options). If possible, I would like to split the keyboard into 2 or more parts, located around the display edges.
I have reviewed various complicated solutions which may need extensive cross-device testing.
Is there a simple (and reliable) way to do this, with say, XML layout? I know Java, but not much about android layout.
Answering my own question, after much digging I think the answer is no, there is no simple way of moving the keyboard from the bottom of the display. I have settled on a very small "keyboard" along the bottom, and then creating a mostly transparent popup view. Not nearly as simple as what I was hoping for, but I think I can eventually get it to look the way I want.

Show suggestions of AutoCompleteTextView

Is it possible to have the AutoCompleteTextView show the suggestions above the keyboard just like when using the default dictionary? (If yes, how:))
Or can I use my own database to show suggestion when using EditText?
Hope you understand what I mean:)
Thank you
Bastaixen
I don't think this is possible. The suggestions shown above the keyboard are actually part of the IME, so completely unrelated to your application / activity.
The only way to do this would be for you to build-in your own IME and then you can customize what suggestions would be there. You can base it on latinIME, but there are still a couple of things you would need to figure out:
You would need to figure out how to tell Android to use your custom IME in your app. Or, like this answer say, just build in the keyboard in your app.
if your user is using a different keyboard (for different language, or swype or something like that), they would probably not like it much...

changing sound/click on soft keyboard - android

I need some help with a project i'm doing. Hopefully someone can help me :)
I need to change the sound or click the keyboard makes whenever i'm typing in an editText. I need the sound/click to be whatever sound i may prefer (in wave-, mp3- or whatever format).
So, a couple of questions:
Can i change this in the already implemented keyboard?
Or should i make my own keyboard?
if the latter is the case, how do i do that? Can i find the source code somewhere?
I have been looking at other questions regarding how to make your own keyboard. e.g. How do I make my own keyboard for an app in android?
And if i have to make my own keyboard i want to look like this. But how to do it?
Can i change this in the already implemented keyboard?
You can't... it's already built and some manufactures provide their own keyboard implementations.
Or should i make my own keyboard?
Yes, you must.
If the latter is the case, how do i do that? Can i find the source code somewhere?
There are some open source projects of Keyboard implementations... for instance:
https://github.com/g1011999/Gingerbread-Keyboard/
http://code.google.com/p/softkeyboard/
There you can learn how to write your own keyboard, which is completely different from writing a conventional app.
My suggestion is to create a new fork of the Gingerbread-Keyboard (this supports Android 2.2 or higher only)... and then implement that specific change you want. For one of my apps I did so, and it's far easier than implementing the keyboard from scratch.

Custom 'Keyboard' built in an application on Android

I've been looking to create a custom keyboard for my application. At first, I started to look at the SoftKeyboard for the SDK examples, but reading the Android Developer Group led me to this post:
This is really not how the input
method framework is supposed to work.
An IME should be a generic input
facility, not for a particular
application. If you need some
app-specific input, you should build
it into your UI rather than pushing
it out to a generic IME.
How do I build an app-specific input within the UI? I mean, is there a way to extend the Keyboard app or something and use it only in my application?
Features needed for the keyboard:
Shift key to display some other keys
Special keys like square root or PI
etc.
PS: an ugly solution could be to make a table of ImageButton for example, but I wanted to make something clean.
I'm not really sure if there's a straight-forward solution to this (to that extent that it is even possible to understand the real reason behind the original question).
As is quoted in the original question:
If you need some app-specific input, you should build it into your UI
rather than pushing it out to a generic IME.
What is meant by that, is not that you within your app should try to build in such input features by extending or modifying the soft keyboard on the phone. There are so many different soft keyboards (and basically, the soft keyboard is just another app), since most phone manufacturers create their own version, and people download 3rd party keyboards (such as Swype or SwiftKey etc.), and I can't picture there being a way for you to "hack" into those to add a few buttons or whatever it is you want (which could also be a major security hole, another reason why it probably isn't possible).
What instead the above quote suggests, is that you have to create some other form of input besides the keyboard. One such example, and a very good one if I might add, is how the RealCalc Scientific Calculator looks:
Now this isn't open source, so I can only guess how the code looks like (but it shouldn't be too hard a guess either): in its simplest form, this is just a grid with lots of buttons. Each button handles the onClick event, which would mean performing some kind of action (changing the label on some other buttons, showing a menu, displaying some text in the upper label or whatever), and that's probably pretty much what's to it. And of course, the phone's soft keyboard is never displayed (since you don't need a keyboard with all those buttons (and also there aren't any input fields to write anything in)).
It all boils down to the already mentioned quote: If you need some app-specific input, you should build it into your UI. Or in other words: create buttons (and don't display the soft keyboard if you don't need it) and make things happen when you click them.
And just to have mentioned it: if you do want to create your own IME (which I strongly believe is not the case here), you should have a look at the following resources:
Onscreen Input Methods
Creating an Input Method
Soft Keyboard sample
In my humble opinion you should take a look at the beginning of reference about keyboard and keyboard view http://developer.android.com/reference/android/inputmethodservice/Keyboard.html and http://developer.android.com/reference/android/inputmethodservice/KeyboardView.html.
There you can see an example of defining keyboard using XML file. I think that this is what you are looking for.
As mentioned by #sebap123
Keyboard and KeyboardView class are the one you need to use,
Further, for Implementation, here is a quick detailed guide.

Categories

Resources