fragment-transitions

Shared elements animating between fragments

ε祈祈猫儿з 提交于 2019-11-27 09:41:59
问题 I'm trying to animate 2 simple Views from a selected item in a RecyclerView to a new fragment. I've looked at a lot of examples of animating shared elements from one Activity to another Activity, but very few examples of animating a shared element from one Fragment to another Fragment within the same Activity. It almost works. Here is my structure. Activity -- Full screen Fragment1 with RecyclerView -- Full screen Fragment2 with details When the user selects an item in the RecyclerView in

How to postpone a Fragment's enter transition in Android Lollipop?

安稳与你 提交于 2019-11-27 01:41:30
问题 In Android Lollipop, the Activity#postponeEnterTransition() and Activity#startPostponedEnterTransition() methods give the Activity the ability to delay starting the entering and exiting shared element transitions until all data is loaded. These work great for Activity transitions. Is there a way to achieve the same effect when using Fragment transitions? 回答1: There's no direct equivalent in Fragment Transitions because Fragments use FragmentTransaction and we can't really postpone something