Have you tried the invalidateKey() method after changing the icon?
http://developer.android.com/reference/android/inputmethodservice/KeyboardView.html#invalidateKey%28int%29

On Sun, Mar 6, 2011 at 2:30 PM, trans <[email protected]> wrote:

> Well, I've looked for an answer for over an hour, but I can't figure out
> how to change the icon image of a keyboard key.
> Here is the particular field involved:
>
>
> http://developer.android.com/reference/android/inputmethodservice/Keyboard.Key.html#icon
>
> My current attempt is this (where image[i] refers to some R.drawable.name
> ):
>
>         Bitmap bmp = BitmapFactory.decodeResource(res, image[i]);
>         BitmapDrawable bmpDraw = new BitmapDrawable(bmp);
>         k.icon = bmpDraw;
>
> But no go.
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to