@OnCreateLayout
static Component onCreateLayout(ComponentContext c, @Prop String content) {
return Column.create(c)
.backgroundColor(Color.WHITE)
.child(
Text.create(c, 0, R.style.message_text)
.text(content)
.paddingDip(HORIZONTAL, CARD_INSET)
.paddingDip(BOTTOM, CARD_INTERNAL_PADDING))
.child(
Row.create(c)
.alignSelf(STRETCH)
.paddingDip(HORIZONTAL, CARD_INSET)
.paddingDip(BOTTOM, CARD_INTERNAL_PADDING)
.paddingDip(TOP, CARD_INTERNAL_PADDING)
.justifyContent(CENTER)
.child(
Image.create(c)
.drawableRes(R.drawable.save)
.alignSelf(YogaAlign.CENTER)
.widthDip(20)
.heightDip(20)
.marginDip(END, CARD_INTERNAL_PADDING))
.child(Text.create(c, 0, R.style.save_text).text("Save"))
.border(Border.create(c).color(ALL, Color.BLACK).widthDip(TOP, 1).build()))
.border(Border.create(c).color(ALL, Color.BLACK).widthDip(ALL, 1).build())
.build();
}
}