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

Commit 6a001f58 authored by Amith Yamasani's avatar Amith Yamasani
Browse files

Tweak spacebar target area between landscape and portrait.

parent ffa3fdd8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -21,4 +21,5 @@
<resources>
    <dimen name="key_height">47dip</dimen>
    <dimen name="candidate_strip_height">38dip</dimen>
    <dimen name="spacebar_vertical_correction">2dip</dimen>
</resources>
 No newline at end of file
+1 −0
Original line number Diff line number Diff line
@@ -22,4 +22,5 @@
    <dimen name="key_height">54dip</dimen>
    <dimen name="bubble_pointer_offset">22dip</dimen>
    <dimen name="candidate_strip_height">42dip</dimen>
    <dimen name="spacebar_vertical_correction">4dip</dimen>
</resources>
 No newline at end of file
+9 −6
Original line number Diff line number Diff line
@@ -38,19 +38,22 @@ public class LatinKeyboard extends Keyboard {
    
    private int mShiftState = SHIFT_OFF;

    static int sSpacebarVerticalCorrection;

    public LatinKeyboard(Context context, int xmlLayoutResId) {
        this(context, xmlLayoutResId, 0);
    }

    public LatinKeyboard(Context context, int xmlLayoutResId, int mode) {
        super(context, xmlLayoutResId, mode);
        mShiftLockIcon = context.getResources()
                .getDrawable(R.drawable.sym_keyboard_shift_locked);
        mShiftLockPreviewIcon = context.getResources()
                .getDrawable(R.drawable.sym_keyboard_feedback_shift_locked);
        Resources res = context.getResources();
        mShiftLockIcon = res.getDrawable(R.drawable.sym_keyboard_shift_locked);
        mShiftLockPreviewIcon = res.getDrawable(R.drawable.sym_keyboard_feedback_shift_locked);
        mShiftLockPreviewIcon.setBounds(0, 0, 
                mShiftLockPreviewIcon.getIntrinsicWidth(),
                mShiftLockPreviewIcon.getIntrinsicHeight());
        sSpacebarVerticalCorrection = res.getDimensionPixelOffset(
                R.dimen.spacebar_vertical_correction);
    }

    public LatinKeyboard(Context context, int layoutTemplateResId, 
@@ -226,7 +229,7 @@ public class LatinKeyboard extends Keyboard {
                if (code == KEYCODE_SHIFT) x += width / 6;
                if (code == KEYCODE_DELETE) x -= width / 6;
            } else if (code == LatinIME.KEYCODE_SPACE) {
                y += 5;
                y += LatinKeyboard.sSpacebarVerticalCorrection;
            }
            return super.isInside(x, y);
        }