0

I have a cardView in recyclerView, so I need to push the button "Explore" and open the cardView and see TextView, it is like this example.

So, what should I use to do that?

Stephen Rauch
  • 47,830
  • 31
  • 106
  • 135
David
  • 9
  • 6

1 Answers1

1

If you are just using CardView, do this in your on onClickListener of cardview:

TransitionManager.beginDelayedTransition(cardview);
detailsView.setVisibility(View.VISIBLE);

By default keep the visibility of your detailsView to be GONE in your xml.

If you are using CardViews inside a ListView or RecyclerView see answer for recommended way of doing it: RecyclerView expand/collapse items

Miravzal
  • 2,025
  • 1
  • 13
  • 11