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

[Android] Textarea supports LineHeight #3242

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,13 @@ protected void updateStyleAndAttrs() {
}

int lineHeight = WXStyle.getLineHeight(getStyles(),getViewPortWidth());
if (lineHeight != UNSET)
if (lineHeight != UNSET){
mLineHeight = lineHeight;
int fontHeight = mPaint.getFontMetricsInt(null);
if (mLineHeight != fontHeight) {
getHostView().setLineSpacing(lineHeight - fontHeight, 1f);
}
}

if (fontSize != UNSET)
mPaint.setTextSize(fontSize);
Expand Down