implementation 'me.yokeyword:fragmentation:1.3.5'
使用这个版本的时候,
extraTransaction() .addSharedElement(holder, getResources().getString(R.string.image_transition)) .replace(detailFragment);
这段代码是只有进入动画,没有返回动画。
如果使用
getFragmentManager().beginTransaction() .replace(R.id.main_cl_container, detailFragment) .addToBackStack(null) .addSharedElement(holder, getResources().getString(R.string.image_transition)) .commit();
就是好的。(代码出自https://github.com/YoKeyword/Fragmentation/issues/638)
这个肯定和官方代码的BUG没有什么关系了,望@YoKeyword 大神查验。
implementation 'me.yokeyword:fragmentation:1.3.5'使用这个版本的时候,
extraTransaction() .addSharedElement(holder, getResources().getString(R.string.image_transition)) .replace(detailFragment);这段代码是只有进入动画,没有返回动画。
如果使用
getFragmentManager().beginTransaction() .replace(R.id.main_cl_container, detailFragment) .addToBackStack(null) .addSharedElement(holder, getResources().getString(R.string.image_transition)) .commit();就是好的。(代码出自https://github.com/YoKeyword/Fragmentation/issues/638)
这个肯定和官方代码的BUG没有什么关系了,望@YoKeyword 大神查验。