How can I custom the ImageCardView
to be circular in Leanback
?
There are few ways you could do this. I think the cleaner approach would be creating your own custom CardView
which extends BaseCardView
. Then you could create your own CardPresenter
which is capable of presenting that circular card type.
The leanback showcase sample app goes into great detail about customizing cards. I'd suggest looking at all of it but the relevant part would be their custom CharacterCardView
. Which has it's entirely own custom layout. And then it has it's own CharacterCardPresenter
. I'd copy the code right into here but those classes links will do much better justice.
The alternative is to override lb_image_card_view.xml
and replace it with your own circular view. As long as you keep the resource ids
and the view types the same, you could maybe get away with styling it how you like. ImageCardView
is also highly styleable which you can read about in the ImageCardView docs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With