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

Commit 381fd88

Browse files
committed
[Android] Textarea supports LineHeight
1 parent 120a867 commit 381fd88

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

android/sdk/src/main/java/org/apache/weex/ui/component/AbstractEditComponent.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,10 @@ protected void updateStyleAndAttrs() {
168168
int lineHeight = WXStyle.getLineHeight(getStyles(),getViewPortWidth());
169169
if (lineHeight != UNSET){
170170
mLineHeight = lineHeight;
171-
getHostView().setLineHeight(mLineHeight);
171+
int fontHeight = mPaint.getFontMetricsInt(null);
172+
if (mLineHeight != fontHeight) {
173+
getHostView().setLineSpacing(lineHeight - fontHeight, 1f);
174+
}
172175
}
173176

174177
if (fontSize != UNSET)

0 commit comments

Comments
 (0)