Hero position incorrectly calculated during the transition element

I have two activities: Toolbars and Coordinators. In both cases.

Toolbars can be hidden by scrolling thanks to CoordinatorLayout.

I am trying to make a general transition between them between them, and these are the steps that I have done so far:

  • Set the image representation as a hero.
  • Set the toolbar, navigation bar and status bar as a hero to avoid overlay problems.

Here is my problem:

When the animation of the shared element begins, the hero’s toolbar slides from a height down, causing the entire screen to move up.

As the position of the hero’s image is calculated before this animation, it starts blinking to the end position after the move animation.

Is there a way to let the animator correctly calculate the final position of the image?

I'm not sure that I have examined my problem in sufficient detail, so I can provide additional information with comments.

Sorry for the long question.

Thanks in advance.

+7
android animation android-toolbar shared-element-transition coordinator-layout
source share

No one has answered this question yet.

See related questions:

31
Transition of elementary element activity to android 5
14
Overview of transitions of common exit / reenter elements
eleven
Shared element transitions do not work in conjunction with the coordinator Layout and CollapsingToolbarLayout
10
Common elements and content transitions in fragments
10
Dying kids with view heroes in a common element transition
7
Hiccups in activity transitions with common elements
3
Shift from common item
3
Content transitions at the top of common elements in android
one
Transition between common parts
one
Transitions with shared elements in Vue: how to transition between related elements in different views by changing a route

All Articles