set preview popup icons as left drawable instead of bottom

fixes #811

remaining issue:
when pressing a key with icon and preview popup before a letter popup, preview and popup height is too low
but this should only trigger rarely, and is not worse than the fixed issue
This commit is contained in:
Helium314 2024-06-09 11:25:34 +02:00
parent 743874f74c
commit 9c926911fc

View file

@ -46,7 +46,7 @@ public class KeyPreviewView extends AppCompatTextView {
public void setPreviewVisual(final Key key, final KeyboardIconsSet iconsSet, final KeyDrawParams drawParams) {
// What we show as preview should match what we show on a key top in onDraw().
if (key.getIconName() != null) {
setCompoundDrawables(null, null, null, key.getPreviewIcon(iconsSet));
setCompoundDrawables(key.getPreviewIcon(iconsSet), null, null, null);
setText(null);
return;
}