Fix action moreKeys vertical positioning

This commit is contained in:
Aleksandras Kostarevas 2024-06-21 23:56:36 +03:00
parent 4bada6e34d
commit f5507d186a
2 changed files with 7 additions and 2 deletions

View File

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

View File

@ -31,7 +31,7 @@ object ActionRegistry {
listOf(SwitchLanguageAction, TextEditAction, ClipboardHistoryAction, EmojiAction, UndoAction, RedoAction).map {
AllActions.indexOf(it)
}.joinToString(separator = ",") {
"!icon/action_primary_$it|!code/action_$it"
"!icon/action_$it|!code/action_$it"
}
fun stringToActions(string: String, defaults: List<Action>): List<Action> {