Customize your ImageCardView style (not content)

How can I configure ImageCardViewhow circular in Leanback?

+6
source share
1 answer

There are several ways to do this. I think a cleaner approach would be to create your own custom CardViewone that extends BaseCardView. Then you can create your own CardPresenter, which is capable of displaying this type of cyclic map.

showback showcase example application details the configuration of cards. I would suggest looking at all this, but the corresponding part would be their usual CharacterCardView. It has a completely own custom layout . And then he has his own CharacterCardPresenter. I would copy the code right here, but these class references would be much better fair.

An alternative is to override lb_image_card_view.xmland replace it with your circular view. As long as you save the resource idsand view types are the same, you can leave with the style as you like. ImageCardViewalso very stylish, which you can read about in ImageCardView Docs .

+1
source

Source: https://habr.com/ru/post/1015733/


All Articles