I am trying to perform a simple transition of a common item, where the line of the click list item goes to the top header of the summary action view. I want the top header to display the position of the list item, fade out by itself, and then convert to the end position.
This is the simple sharedElementEnterTransition
one I wrote for the activity being called:
<?xml version="1.0" encoding="utf-8"?>
<transitionSet xmlns:android="http://schemas.android.com/apk/res/android">
<fade android:fadingMode="fade_out" />
<changeBounds />
<changeTransform />
<changeImageTransform />
</transitionSet>
However, the transition fade
does nothing. I see that the resulting review suddenly appears in place, and then moves to the final position.
Here where I start the activity
view.setOnClickListener(view -> {
final Intent intent = new Intent(...);
view.setTransitionName("test");
final ActivityOptions options =
ActivityOptions.makeSceneTransitionAnimation(activity, view, "test");
startActivity(intent, options.toBundle());
});
I can’t understand what’s going on. Does anyone have any idea? Layout codes are what you expect with help android:transitionName="test"
.