Expand and collapse CardView

Robert Vangor picture Robert Vangor · Feb 19, 2016 · Viewed 64.8k times · Source

What is the proper way to expand a CardView?

example

Answer

Madhur picture Madhur · Feb 19, 2016

Use an expandable list view with cardview

or even

You can use wrap content as height of cardview and use textview inside it below title, so on click make the textview visible and vice-versa.

but isn't it bad design ?

nope it isn't if you give some transition or animation when it's expanded or collapsed

If you want to see some default transition then just write android:animateLayoutChanges="true" in parent layout.