Z
Z
Zdaart55332020-09-01 15:09:04
Android
Zdaart5533, 2020-09-01 15:09:04

How to expand and collapse a CardView in Android?

I saw how many people use CardView, as an example:
Closed
5f4e396cbb67f746723342.png
Open
5f4e3995503ea756124365.png
But I can't figure out how to expand and collapse it like that. Please help or code example.

PS It seems like I heard what is being done with the help of Transition

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denis Zagaevsky, 2020-09-01
@zagayevskiy

the simplest option is to change visible VISIBLE/GONE + animateLayoutChanges for CargView.

A
alekseyHunter, 2020-09-02
@alekseyHunter

You can use ready made libraries like this one

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question