Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 179a39d1 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka Committed by Android Git Automerger
Browse files

am edfc8dae: am 4cbfee7a: am c5a8bc61: am 5ae05786: Merge "Fix drawing of...

am edfc8dae: am 4cbfee7a: am c5a8bc61: am 5ae05786: Merge "Fix drawing of custom action label key" into lmp-dev

* commit 'edfc8dae':
  Fix drawing of custom action label key
parents 81a41947 edfc8dae
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -702,6 +702,10 @@ public class Key implements Comparable<Key> {
        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() {
        return (mLabelFlags & LABEL_FLAGS_SHIFTED_LETTER_ACTIVATED) != 0
                && !TextUtils.isEmpty(mHintLabel);
+3 −1
Original line number Diff line number Diff line
@@ -343,7 +343,9 @@ public class KeyboardView extends View {
        final int keyWidth = key.getDrawWidth();
        final int keyHeight = key.getHeight();
        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 intrinsicHeight = background.getIntrinsicHeight();
            final float minScale = Math.min(