android:fix android textview truncate problem
This commit is contained in:
parent
9e0b3e067b
commit
c329cfcf53
@ -48,6 +48,7 @@ public class TextNode extends ViewNode<TextView> {
|
|||||||
TextView tv = new TextView(getContext());
|
TextView tv = new TextView(getContext());
|
||||||
tv.setGravity(Gravity.CENTER);
|
tv.setGravity(Gravity.CENTER);
|
||||||
tv.setMaxLines(1);
|
tv.setMaxLines(1);
|
||||||
|
tv.setSingleLine(true);
|
||||||
tv.setEllipsize(TextUtils.TruncateAt.END);
|
tv.setEllipsize(TextUtils.TruncateAt.END);
|
||||||
tv.setIncludeFontPadding(false);
|
tv.setIncludeFontPadding(false);
|
||||||
return tv;
|
return tv;
|
||||||
@ -98,6 +99,7 @@ public class TextNode extends ViewNode<TextView> {
|
|||||||
if (line <= 0) {
|
if (line <= 0) {
|
||||||
line = Integer.MAX_VALUE;
|
line = Integer.MAX_VALUE;
|
||||||
}
|
}
|
||||||
|
view.setSingleLine(line == 1);
|
||||||
view.setMaxLines(line);
|
view.setMaxLines(line);
|
||||||
break;
|
break;
|
||||||
case "fontStyle":
|
case "fontStyle":
|
||||||
|
Reference in New Issue
Block a user