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 <key-style
latin:styleName="spaceKeyStyle" latin:styleName="spaceKeyStyle"
latin:code="@integer/key_space" latin:code="@integer/key_space"
latin:keyIcon="@drawable/sym_keyboard_space_holo"
latin:iconPreview="@drawable/sym_keyboard_feedback_space" /> latin:iconPreview="@drawable/sym_keyboard_feedback_space" />
<key-style <key-style
latin:styleName="nonSpecialBackgroundSpaceKeyStyle" latin:styleName="nonSpecialBackgroundSpaceKeyStyle"

View File

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