Z-Order in Shared Element Activity Transition Animations

965 views Asked by At

I am doing some basic shared element activity transition animations with code similar to this:

Intent i = new Intent(AnActivity.this, AnotherActivity.class);
ActivityOptionsCompat options =
        ActivityOptionsCompat.makeSceneTransitionAnimation(this,
                Pair.create(vBackground, "background"),
                Pair.create(vImage, "image"),
                Pair.create(vName, "name"),
                Pair.create(vDistance, "distance")
        );
startActivity(i, options.toBundle());

Can I change the Z-order that the animation assigns to the views?

The reason is that some of the views are hidden by the others during the animation, even though in both activity layouts this is not the case. Somewhere in the transition code, the Z-order of the views gets changed.

I have tried reordering the Pair.create(...) lines, but to no great success.

0

There are 0 answers