diff --git a/doric-android/doric/src/main/java/pub/doric/shader/TextNode.java b/doric-android/doric/src/main/java/pub/doric/shader/TextNode.java index 4ce768d6..69aa1634 100644 --- a/doric-android/doric/src/main/java/pub/doric/shader/TextNode.java +++ b/doric-android/doric/src/main/java/pub/doric/shader/TextNode.java @@ -48,6 +48,7 @@ public class TextNode extends ViewNode { TextView tv = new TextView(getContext()); tv.setGravity(Gravity.CENTER); tv.setMaxLines(1); + tv.setSingleLine(true); tv.setEllipsize(TextUtils.TruncateAt.END); tv.setIncludeFontPadding(false); return tv; @@ -98,6 +99,7 @@ public class TextNode extends ViewNode { if (line <= 0) { line = Integer.MAX_VALUE; } + view.setSingleLine(line == 1); view.setMaxLines(line); break; case "fontStyle":