My app is based on the SoftKeyboard example. Problem is the way the
KeyboardView class is designed in the Android API, as far as I can see it
only allows for one key background for all keys.
As of yet the only way around it I can see is to create a IME from the
ground up and dump the Keyboard
* Problem is the way the KeyboardView class is designed in the Android API,
as far as I can see it only allows for one key background for all keys.*
Ahh Now we get to the real problem. If you had been more specific about
the problem in the first place then better help could have been
If you absolutely need to access those fields/methods you CAN use Java
reflection, but it's a very fragile solution in that those fields
could change across Android iterations. Using reflection you can
change the visibility of the private fields/methods and invoke them/
change their values.
YIKES! I wouldn't touch that with a 10-foot pole!
Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware
On Mon, Mar 21, 2011 at 2:54 PM, Jonathan Foley jonefo...@gmail.com wrote:
If you absolutely need to access those fields/methods you CAN use Java
The alternative would be to copy the code from that class and create your
own, making those fields protected or providing methods to mutate them.
That's what I've started to conclude myself and attempted to do so, but ran
into the problem of accessing `com.android.internal.R`. Which means that
Hmm...having not developed an IME I don't know what the best course
is, but there are APIs for deploying a custom IME. Within those there
must be ways fo specifying the drawables. I gather that what you want
to do is to change the spacebar of the default android keyboard?
That's going to be ugly
I haven't written a keyboard either, but there is a sample implementation
here:
http://developer.android.com/resources/samples/SoftKeyboard/index.html
Hopefully this sample code doesn't suffer from any compile problems. There
is a drawable for the space bar in there, too.
22.03.2011 1:41
If you are trying to change the color of the spacebar for the default
Android Keyboard, then it isn't possible. If you are simply wanting to
write your own IME, follow the tutorial posted by the others...
Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware
On
8 matches
Mail list logo