shared-element-transition

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

How can I scale textviews using shared element transitions?

只谈情不闲聊 提交于 2019-11-27 00:14:43
问题 I am able to get TextViews to transition perfectly between two activities using ActivityOptions.makeSceneTransitionAnimation . However I want to make the text scale up as it transitions. I can see the material design example scaling up the text "Alphonso Engelking" in the contact card transition. I've tried setting the scale attributes on the destination TextView and using the changeTransform shared element transitions, but it doesn't scale and the text ends up being truncated as it

ViewPager Fragments – Shared Element Transitions

不想你离开。 提交于 2019-11-27 00:07:15
问题 An app I'm developing displays a grid of images. When you tap an image, it goes into the details view. The details view contains a ViewPager that allows you swipe between every image in the grid. This is done by passing a lists of paths (containing every image in the grid), along with an offset of the image that was tapped so the ViewPager can be set to show that page initially. What's the best way to have a shared element transition inside the Fragment of the current offset page in the

Shared element transition with Dialog Activity

久未见 提交于 2019-11-26 19:45:49
问题 I put together a very simple app that uses shared element transitions when starting an activity with Dialog theme (source code on github). I got the following result: As you can see there are 2 problems with the transition/animation: The animation is only visible in the area of the dialog activity so it clips and looks ugly. There is no transition/animation when I tap outside the activity to go back. How can I fix these problems? Any help would be appreciated. EDIT: After Quanturium's answer

Blinking screen on image transition between activities

情到浓时终转凉″ 提交于 2019-11-26 17:58:40
问题 I implemented an image transition between two activities using the new shared elements from lollipop. It's working but I get a weird white blinking on the entire screen during the transition and I can't find how to get rid of it. Here is an example: Here is how the second activity is launched public static void launch( @NonNull Activity activity, @NonNull View transitionView, Game game) { ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation( activity,

How do I prevent the status bar and navigation bar from animating during an activity scene animation transition?

断了今生、忘了曾经 提交于 2019-11-26 13:57:00
Firstly, my status bar background is set to dark brown, and my navigation bar background is default black. I'm using the Material light theme. I'm starting a new activity using ActivityOptions.makeSceneTransitionAnimation with default transitions, and I notice that both the status and navigation bars briefly fade to white and then back to the correct colors. According to the documentation : To get the full effect of a transition, you must enable window content transitions on both the calling and called activities. Otherwise, the calling activity will start the exit transition, but then you'll

How do I prevent the status bar and navigation bar from animating during an activity scene animation transition?

独自空忆成欢 提交于 2019-11-26 03:47:13
问题 Firstly, my status bar background is set to dark brown, and my navigation bar background is default black. I\'m using the Material light theme. I\'m starting a new activity using ActivityOptions.makeSceneTransitionAnimation with default transitions, and I notice that both the status and navigation bars briefly fade to white and then back to the correct colors. According to the documentation: To get the full effect of a transition, you must enable window content transitions on both the calling