Reputation: 9
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?
Upvotes: 0
Views: 136
Reputation: 2035
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
Upvotes: 1