am cf5fc1ea: am 4e1f1689: am 5ae05786: Merge "Fix drawing of custom action label key" into lmp-dev

* commit 'cf5fc1ea065873cd6d7b1d5d467940e4e45354d3':
  Fix drawing of custom action label key
main
Tadashi G. Takaoka 2014-09-16 23:59:08 +00:00 committed by Android Git Automerger
commit 44398bb5e1
2 changed files with 7 additions and 1 deletions

View File

@ -702,6 +702,10 @@ public class Key implements Comparable<Key> {
return ((mLabelFlags | defaultFlags) & LABEL_FLAGS_KEEP_BACKGROUND_ASPECT_RATIO) != 0; return ((mLabelFlags | defaultFlags) & LABEL_FLAGS_KEEP_BACKGROUND_ASPECT_RATIO) != 0;
} }
public final boolean hasCustomActionLabel() {
return (mLabelFlags & LABEL_FLAGS_FROM_CUSTOM_ACTION_LABEL) != 0;
}
private final boolean isShiftedLetterActivated() { private final boolean isShiftedLetterActivated() {
return (mLabelFlags & LABEL_FLAGS_SHIFTED_LETTER_ACTIVATED) != 0 return (mLabelFlags & LABEL_FLAGS_SHIFTED_LETTER_ACTIVATED) != 0
&& !TextUtils.isEmpty(mHintLabel); && !TextUtils.isEmpty(mHintLabel);

View File

@ -343,7 +343,9 @@ public class KeyboardView extends View {
final int keyWidth = key.getDrawWidth(); final int keyWidth = key.getDrawWidth();
final int keyHeight = key.getHeight(); final int keyHeight = key.getHeight();
final int bgWidth, bgHeight, bgX, bgY; final int bgWidth, bgHeight, bgX, bgY;
if (key.needsToKeepBackgroundAspectRatio(mDefaultKeyLabelFlags)) { if (key.needsToKeepBackgroundAspectRatio(mDefaultKeyLabelFlags)
// HACK: To disable expanding normal/functional key background.
&& !key.hasCustomActionLabel()) {
final int intrinsicWidth = background.getIntrinsicWidth(); final int intrinsicWidth = background.getIntrinsicWidth();
final int intrinsicHeight = background.getIntrinsicHeight(); final int intrinsicHeight = background.getIntrinsicHeight();
final float minScale = Math.min( final float minScale = Math.min(