I have a RecyclerView that contains a list of MaterialCardView. Inside MaterialCardView, there is a RecyclerView and an Expand / Collapse button. When clicking on Collapse, the internal RecyclerView is assigned Visible.GONE, but on devices with API <24, the change in the height of the cardview is not correctly processed
[See API19|API22|API23|API29] (http://g.recordit.co/08OJWDaOja.gif)
`` `
TransitionManager.beginDelayedTransition(recyclerView, new AutoTransition());
if(state){
mProfileList.setVisibility(View.VISIBLE);
mExpand.setText(R.string.item_group_collapse);
managerProfiles.updateGroupState(group, true);
}else{
mProfileList.setVisibility(View.GONE);
mExpand.setText(R.string.item_group_expand);
managerProfiles.updateGroupState(group, false);
}
`` `