Merge "Get rid of the space bar symbol on the tablet." into honeycomb

main
Satoshi Kataoka 2011-01-07 07:38:27 -08:00 committed by Android (Google) Code Review
commit 6d075dbda5
2 changed files with 2 additions and 3 deletions

View File

@ -53,7 +53,6 @@
<key-style
latin:styleName="spaceKeyStyle"
latin:code="@integer/key_space"
latin:keyIcon="@drawable/sym_keyboard_space_holo"
latin:iconPreview="@drawable/sym_keyboard_feedback_space" />
<key-style
latin:styleName="nonSpecialBackgroundSpaceKeyStyle"

View File

@ -173,7 +173,7 @@ public class LatinKeyboard extends Keyboard {
@SuppressWarnings("unused")
private Bitmap drawSpaceBar(int opacity, boolean isAutoCorrection) {
final int width = mSpaceKey.mWidth;
final int height = mSpaceIcon.getIntrinsicHeight();
final int height = mSpaceIcon != null ? mSpaceIcon.getIntrinsicHeight() : mSpaceKey.mHeight;
final Bitmap buffer = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
final Canvas canvas = new Canvas(buffer);
final Resources res = mContext.getResources();
@ -230,7 +230,7 @@ public class LatinKeyboard extends Keyboard {
int y = height - iconHeight;
mSpaceAutoCorrectionIndicator.setBounds(x, y, x + iconWidth, y + iconHeight);
mSpaceAutoCorrectionIndicator.draw(canvas);
} else {
} else if (mSpaceIcon != null) {
final int iconWidth = mSpaceIcon.getIntrinsicWidth();
final int iconHeight = mSpaceIcon.getIntrinsicHeight();
int x = (width - iconWidth) / 2;