Search code examples
androidandroid-recyclerviewandroid-cardviewcardslib

Expandable CardView using Cardslib


I need to create cards that expand when a button on the card is pressed, to show additional features.

I'm planning to use : https://github.com/gabrielemariotti/cardslib

The guide is a bit confusing. Could someone please elaborate on how to go about. Also, the cards I show are populated by a RecyclerView.

I've attached screenshots of the required design below :

Before expanding :

enter image description here

After expanding :

enter image description here

Also, since the entire layout changes after expanding, I need the layout of the 'unexpanded' card to be hidden after the layout of the 'expanded' card becomes visible.

Any help would be awesome!! Thanks!


Solution

  • Reading this solves the problem : https://github.com/gabrielemariotti/cardslib/blob/master/doc/CARDRECYCLERVIEW.md