Fragment shared element transitions don't work with ViewPager

后端 未结 3 1810
无人及你
无人及你 2020-12-12 20:40

My app contains a view which consists of a ViewPager consisting of a handful of fragments. When you click on an item in one of these fragments, the expected behavior is for

3条回答
  •  甜味超标
    2020-12-12 21:03

    On the activity supportPostponeEnterTransition();

    And when your fragments are loaded (try to sync them, maybe with EventBus or whatever)

    startPostponedEnterTransition();

    Refer to this sample

    http://www.androiddesignpatterns.com/2015/03/activity-postponed-shared-element-transitions-part3b.html

提交回复
热议问题