Merge "Fix centering key icon when visual inset is specified"

This commit is contained in:
Tadashi G. Takaoka 2011-07-21 00:08:13 -07:00 committed by Android (Google) Code Review
commit 852f052737

View file

@ -526,7 +526,7 @@ public class KeyboardView extends View implements PointerTracker.DrawingProxy {
canvas.translate(-bgX, -bgY);
// Draw key top visuals.
final int keyWidth = key.mWidth;
final int keyWidth = key.mWidth - key.mVisualInsetsLeft - key.mVisualInsetsRight;
final int keyHeight = key.mHeight;
final float centerX = keyWidth * 0.5f;
final float centerY = keyHeight * 0.5f;