Skip to content

Commit 4276ad6

Browse files
author
farfromrefug
committed
fix(android): wrong line height rendering on android < 28
1 parent 9ce0630 commit 4276ad6

File tree

1 file changed

+1
-1
lines changed
  • plugin/platforms/android/java/com/nativescript/label

1 file changed

+1
-1
lines changed

plugin/platforms/android/java/com/nativescript/label/NSLabel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public void setLineHeight(int value) {
196196
@Override
197197
public void setTypeface(Typeface value) {
198198
super.setTypeface(value);
199-
if (Build.VERSION.SDK_INT < 28 && lineHeight >= 0) {
199+
if (Build.VERSION.SDK_INT < 28 && lineHeight > 0) {
200200
float fontHeight = getPaint().getFontMetrics(null);
201201
setLineSpacing(lineHeight - fontHeight, 1.0f);
202202
}

0 commit comments

Comments
 (0)