android:update textnode shadow prop

This commit is contained in:
刘涛
2020-05-28 19:24:55 +08:00
committed by osborn
parent edb355da80
commit b81c1d824b
2 changed files with 19 additions and 1 deletions

View File

@@ -223,6 +223,17 @@ public class TextNode extends ViewNode<TextView> {
}
}
break;
case "shadow":
if (prop.isObject()) {
mView.setAlpha((prop.asObject().getProperty("opacity").asNumber().toFloat()));
mView.setShadowLayer(
prop.asObject().getProperty("radius").asNumber().toFloat(),
DoricUtils.dp2px(prop.asObject().getProperty("offsetX").asNumber().toFloat()),
DoricUtils.dp2px(prop.asObject().getProperty("offsetY").asNumber().toFloat()),
prop.asObject().getProperty("color").asNumber().toInt()
);
}
break;
default:
super.blend(view, name, prop);
break;