shared-element-transition

Animate ImageView between two activities using shared element transitions with ChangeImageTransform

妖精的绣舞 提交于 2019-11-28 18:23:48
I am trying to animate one ImageView to another position between two activities in Android API level 21. Since "MoveImage" in Android L Preview has been removed, I use " ChangeImageTransform " instead, but the sample code in documents doesn't work out (the two images animated separately). <transitionSet xmlns:android="http://schemas.android.com/apk/res/android"> <changeImageTransform> <targets> <target android:targetId="@id/ivA" /> <target android:targetId="@id/ivB" /> </targets> </changeImageTransform> </transitionSet> Is there any working example? Thanks! To make a screen transition

Shared elements animating between fragments

那年仲夏 提交于 2019-11-28 16:25:31
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 Fragment1, I replace Fragment1 with Fragment2 that has a View with the shared elements in it in different

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

给你一囗甜甜゛ 提交于 2019-11-28 06:55:41
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? There's no direct equivalent in Fragment Transitions because Fragments use FragmentTransaction and we can't really postpone something that is supposed to happen in a transaction. To get the equivalent, you can add a Fragment and hide it in a

How can I scale textviews using shared element transitions?

ぐ巨炮叔叔 提交于 2019-11-28 04:10:47
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 transitions. How can I scale TextViews using shared element transition? Edit: As pointed out by Kiryl Tkach in

Shared element transition with Dialog Activity

你离开我真会死。 提交于 2019-11-27 19:08:39
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 I did the following things to get it working: Use the following theme instead of a Dialog theme:

Hiccups in activity transitions with shared elements

好久不见. 提交于 2019-11-27 16:39:03
问题 I want to use the new Activity Transitions of Android Lollipop. But currently I am seeing very weird hickups during the animations. I hacked together the smallest sample I could think of. This is what I did in a very short version: Enabled window content transitions in my styles.xml Referenced a very simple slide.xml as exit transition in my style Provided a android:transitionName for a shared element in both layouts Called ActivityOptions.makeSceneTransitionAnimation() with that name and the

How to know when Shared Element Transition ends

痞子三分冷 提交于 2019-11-27 13:31:14
问题 I am working with Shared Element Transitions between activities. The transition is working fine but I want to know when the shared element transition ends so that I can show other things. I tried using onSharedElementEnd in SharedElementCallback in the activity I am transition to but that gets called before the transition starts. is there another callback i can listen for? 回答1: Did you try to bind animation listener to the shared element view inside onMapSharedElements ? ViewCompat.animate

Are Activity/Fragment Transitions compatible with pre-Lollipop devices?

谁都会走 提交于 2019-11-27 11:40:59
I'm trying to make an Activity Transition using Shared Elements on a pre-Lollipop device (4.x). Is it possible? So far, I'm trying this: public class RewardDetail extends ActionBarActivity { @Override public void onCreate(final Bundle savedInstanceState) { ... ViewCompat.setTransitionName(imageView, TRANSITION_NAME); } ... public static void launch(ActionBarActivity activity, View transitionView, WelcomeReward detailData) { ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(activity, transitionView, TRANSITION_NAME); Intent intent = new Intent(activity,

Animate ImageView between two activities using shared element transitions with ChangeImageTransform

半世苍凉 提交于 2019-11-27 11:18:14
问题 I am trying to animate one ImageView to another position between two activities in Android API level 21. Since "MoveImage" in Android L Preview has been removed, I use "ChangeImageTransform" instead, but the sample code in documents doesn't work out (the two images animated separately). <transitionSet xmlns:android="http://schemas.android.com/apk/res/android"> <changeImageTransform> <targets> <target android:targetId="@id/ivA" /> <target android:targetId="@id/ivB" /> </targets> <

Blinking screen on image transition between activities

亡梦爱人 提交于 2019-11-27 10:47:30
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, transitionView, game.gameFullId); Intent intent = new Intent(activity, ListImportationLoginActivity.class); intent