In an AppCompatActivity with a RecyclerView in a fragment (myFragment1), viewholders and so on, so if I click on an item,
AppCompatActivity
RecyclerView
myFragment1
viewholders
Try adding setReorderingAllowed(true)
setReorderingAllowed(true)
For example:
getSupportFragmentManager().beginTransaction() .setReorderingAllowed(true) .addSharedElement(myImage, "mytransition") .add(R.id.recycler_view_container, myFragment2) .hide(myFragment1) commit();