Take the 2-minute tour ×

Is there any way to draw two lines of text on Android SoftKeyboard without images? I mean something like that


on a single key.

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Have you tried KeyboardView's onDraw() method? There you can paint alternate characters on a key. Something like this that I have used in my own code:

    public void onDraw(Canvas canvas) {
        Paint paint = new Paint();
        List<Key> keys = getKeyboard().getKeys();
        for(Key key: keys) {
            String upperLetter = bindingsMap.get(key.label.toString());
            canvas.drawText(upperLetter, key.x + (key.width/2)+14, key.y + 21, paint);                      
share|improve this answer
add comment

Your Answer


