Closed Xiphoray closed 6 years ago
Hi! The recent release means that changing the data of the cards is more efficient and effective as before.
The ExampleMaterialAboutFragment has an example of "dynamic items".
final MaterialAboutActionItem item = new MaterialAboutActionItem.Builder()
.text("Dynamic UI")
.subText(subText)
.icon(new IconicsDrawable(c)
.icon(CommunityMaterial.Icon.cmd_refresh)
.color(ContextCompat.getColor(c, R.color.mal_color_icon_dark_theme)
).sizeDp(18))
.build();
item.setOnClickAction(new MaterialAboutItemOnClickAction() {
@Override
public void onClick() {
item.setSubText("Random number: " + ((int) (Math.random() * 10)));
refreshMaterialAboutList();
}
});
Note the refreshMaterialAboutList();
method that updates the view.
if i want to change some datas of the cards or Items after they have been built, what should i do?