ComponentContext c,
@Prop String name,
@Prop String price,
@Prop(optional = true) Drawable photo) {
final ComponentLayout column = Column.create(c)
.marginDip(YogaEdge.LEFT, 16)
.child(
Text.create(c)
.text(name)
.textSizeSp(24)
)
.child(
Text.create(c)
.text(price)
.textSizeSp(16)
)
.child(
Row.create(c)
.marginDip(YogaEdge.TOP,4)
.child(
Image.create(c)
.drawableRes(R.drawable.ic_comment)
.withLayout()
.marginDip(YogaEdge.RIGHT,4)
.heightDip(20)
.widthDip(20)
)
.child(
Text.create(c)
.text("700")
.textSizeSp(14)
)
.child(
Image.create(c)
.drawableRes(R.drawable.ic_thumb_up)
.withLayout()
.marginDip(YogaEdge.RIGHT,4)
... ... ... ALL Programming