Text add strikethrough and underline

This commit is contained in:
pengfei.zhou
2020-04-13 17:41:17 +08:00
committed by osborn
parent 8faf0e5d33
commit 8cb135b7b1
13 changed files with 151 additions and 15 deletions

View File

@@ -143,6 +143,16 @@ public class TextNode extends ViewNode<TextView> {
}
view.setLineSpacing(DoricUtils.dp2px(prop.asNumber().toFloat()), 1);
break;
case "strikethrough":
if (prop.isBoolean()) {
view.getPaint().setStrikeThruText(prop.asBoolean().value());
}
break;
case "underline":
if (prop.isBoolean()) {
view.getPaint().setUnderlineText(prop.asBoolean().value());
}
break;
default:
super.blend(view, name, prop);
break;