Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
[Android] Textarea supports LineHeight
Browse files Browse the repository at this point in the history
  • Loading branch information
chenzefeng09 committed Jul 10, 2020
1 parent 120a867 commit 381fd88
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,10 @@ protected void updateStyleAndAttrs() {
int lineHeight = WXStyle.getLineHeight(getStyles(),getViewPortWidth());
if (lineHeight != UNSET){
mLineHeight = lineHeight;
getHostView().setLineHeight(mLineHeight);
int fontHeight = mPaint.getFontMetricsInt(null);
if (mLineHeight != fontHeight) {
getHostView().setLineSpacing(lineHeight - fontHeight, 1f);
}
}

if (fontSize != UNSET)
Expand Down

0 comments on commit 381fd88

Please sign in to comment.