android:update textnode shadow prop
This commit is contained in:
parent
edb355da80
commit
b81c1d824b
@ -223,6 +223,17 @@ public class TextNode extends ViewNode<TextView> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
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:
|
default:
|
||||||
super.blend(view, name, prop);
|
super.blend(view, name, prop);
|
||||||
break;
|
break;
|
||||||
|
@ -11,8 +11,15 @@ class TextDemo extends Panel {
|
|||||||
text: "This is normal text",
|
text: "This is normal text",
|
||||||
}),
|
}),
|
||||||
text({
|
text({
|
||||||
text: "This is normal text",
|
text: "This is normal text with shadow ",
|
||||||
textSize: 20,
|
textSize: 20,
|
||||||
|
shadow: {
|
||||||
|
color: Color.parse("#1DD6DE"),
|
||||||
|
offsetX: 0,
|
||||||
|
offsetY: 1,
|
||||||
|
opacity: 0.8,
|
||||||
|
radius: 3.0
|
||||||
|
}
|
||||||
}),
|
}),
|
||||||
text({
|
text({
|
||||||
text: "This is normal text",
|
text: "This is normal text",
|
||||||
|
Reference in New Issue
Block a user