diff --git a/srcs/juloo.keyboard2/Keyboard2View.java b/srcs/juloo.keyboard2/Keyboard2View.java index 1dfaa16..3f4a895 100644 --- a/srcs/juloo.keyboard2/Keyboard2View.java +++ b/srcs/juloo.keyboard2/Keyboard2View.java @@ -408,7 +408,11 @@ public class Keyboard2View extends View else x += (a == Paint.Align.LEFT) ? subPadding : keyW - subPadding; String label = kv.getString(); - canvas.drawText(label, 0, Math.min(4, label.length()), x, y, p); + int label_len = label.length(); + // Limit the label of string keys to 3 characters + if (label_len > 3 && kv.getKind() == KeyValue.Kind.String) + label_len = 3; + canvas.drawText(label, 0, label_len, x, y, p); } private void drawIndication(Canvas canvas, String indication, float x,