Cancel general return transition to Android Lollipop

I played with Lollipop Activity Transition.

I have a button in Activity A that, when pressed, calls Activity B. In Activity B, I override onBackPressed () and call finishAfterTransition ()

Activity B has only two relative layout blocks with background color. I put the general transition of the element from Button to one of the blocks, and it works fine. Even the return transition works.

But the problem that I encountered is that I cannot cancel the transition with the return of the common element and implement the normal transition.

The goal was to move two blocks off the screen, top to top and bottom to bottom. This does not work if sharing is enabled.

I tried to set the transition to exit and set it to null for the sharedElementReturn transition to action B. Does not work.

I tried to set the transition to re-entry in Activity A with a slide shift, but at the same time, the general transition of the element will be canceled by a reverse click.

If I turn off the transition of the common element, the desired effect will be completed upon returning from Activity B to A.

Any ideas?

+7
android android-transitions shared-element-transition
source share

No one has answered this question yet.

See related questions:

3606
Close / hide Android soft keyboard
3295
Why is the Android emulator so slow? How can we speed up Android emulator development?
3288
Correct use cases for Android UserManager.isUserAGoat ()?
2609
Is there a unique identifier for an Android device?
2510
How to keep Android activity state by saving instance state?
1207
Strange memory issue when loading image into Bitmap object
1002
Grid motion detection
14
Overview of transitions of common exit / reenter elements
8
Transition a common Android item between 2 RecyclerViews
one
Transition to enter and exit public and non-public access for Activity

All Articles