When I make an Activity scene transition, my problem is that while the Shared Element Transition is running, the other elements fade out. I found out that they don't really fade out, but the background of the second activity fades in.
When I set the background fade duration of the second activity to a very long time, I don't see the elements being covered. But thats not a real solution but more of a hack. What can I do there?
Transition code is starting here and in the other activity is receiving here.
Related
I have an activity with a shared element that transitions into another activity. This works fine but the problem is the second activity has some dividers that get drawn on top of the previous activity which looks weird. I saw this video which shows that the enter transition can be delayed until the shared element is placed:
https://www.youtube.com/watch?v=RhiPJByIMrM&index=8&list=WL
Does anyone know how to achieve this?
Thanks.
Activity B starts and pushes Activity A to the left. This transition takes 200ms and I implement this calling this method in onCreate() before setContentView()
overridePendingTransition(R.anim.slide_in_right_to_left, R.anim.slide_out_right_to_left);
What I want to achieve is to start animating UI elements in the contentView at 100ms...So that the whole animation has a continuous feel. I haven't found where in the code I should start animating the UI elements.
http://1.bp.blogspot.com/-Vv4SxVSI2DY/VEqQxAf3PWI/AAAAAAAAA7c/mfq7XBrIGgo/s400/activity_transitions%2B%281%29.gif
This is a material animation I want to implement, but I can't achieve a similar effect. First of all, the shared element transition moves the image into the second activity. This is quite simple, but then the root layout of the activity starts expanding and during the animation the user can see the first activity until the second activity's view doesn't hide it totally.
I was playing around with Lollipop's Activity Transition.
I have a button in Activity A which when clicked calls Activity B. In the Activity B, I am overriding onBackPressed() and calling finishAfterTransition()
Activity B just has two relative layout blocks with the background color. I have put a shared element transition from the Button to one of the blocks and it works perfectly. Even the return transition works.
But the problem I am having is that I am not able to cancel the shared element return transition and implement a normal exit transition.
The intent was to slide the two blocks off the screen, top one off the top and bottom one off the bottom. That's not working if I have a shared element transition enabled.
I tried setting the exit transition and setting null to sharedElementReturn transition on Activity B. Not working.
I tried setting the reenter transition on Activity A with the slide transition, but still, the shared element transition is reversed on the back press.
If I turn off the shared element transition, the desired effect is perfect on return from Activity B to A.
Any ideas?
Is there a way to get the TabHost Activity to animate every time the tab is tapped? Right now i have the animation applied to the Activity that appears under the tab, but it will only every animate once (the first time it is loaded). Its a simple animation of the View coming in from left to right.
You should add onResume() method and do the same thing as the onCreate() in the activity. Then the animation should appears every time you tap it.