Fix wrong more keys offset without preview

This commit is contained in:
Aleksandras Kostarevas 2024-05-08 12:25:28 -05:00
parent 951c24e1c9
commit abda1a3d08

View File

@ -644,7 +644,7 @@ public final class MainKeyboardView extends KeyboardView implements DrawingProxy
// aligned with the bottom edge of the visible part of the key preview. // aligned with the bottom edge of the visible part of the key preview.
// {@code mPreviewVisibleOffset} has been set appropriately in // {@code mPreviewVisibleOffset} has been set appropriately in
// {@link KeyboardView#showKeyPreview(PointerTracker)}. // {@link KeyboardView#showKeyPreview(PointerTracker)}.
final int pointY = key.getY() + mKeyPreviewDrawParams.getVisibleOffset() + key.getHeight(); final int pointY = key.getY() + mKeyPreviewDrawParams.getVisibleOffset() + (keyPreviewEnabled ? key.getHeight() : key.getVerticalGap());
moreKeysKeyboardView.showMoreKeysPanel(this, this, pointX, pointY, mKeyboardActionListener); moreKeysKeyboardView.showMoreKeysPanel(this, this, pointX, pointY, mKeyboardActionListener);
return moreKeysKeyboardView; return moreKeysKeyboardView;
} }