Merge "Fix the split divider position being shifted during animating" into udc-dev am: 4c77d93241
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23630897 Change-Id: Ie54f4d3cee7e37f85e82080f2b35373d464cb4bf Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -170,6 +170,9 @@ public class TransitionUtil {
|
|||||||
if (isOpeningType(mode)) {
|
if (isOpeningType(mode)) {
|
||||||
t.setAlpha(leash, 0.f);
|
t.setAlpha(leash, 0.f);
|
||||||
}
|
}
|
||||||
|
// Set the transition leash position to 0 in case the divider leash position being
|
||||||
|
// taking down.
|
||||||
|
t.setPosition(leash, 0, 0);
|
||||||
t.setLayer(leash, Integer.MAX_VALUE);
|
t.setLayer(leash, Integer.MAX_VALUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -228,7 +231,11 @@ public class TransitionUtil {
|
|||||||
t.reparent(change.getLeash(), leashSurface);
|
t.reparent(change.getLeash(), leashSurface);
|
||||||
t.setAlpha(change.getLeash(), 1.0f);
|
t.setAlpha(change.getLeash(), 1.0f);
|
||||||
t.show(change.getLeash());
|
t.show(change.getLeash());
|
||||||
t.setPosition(change.getLeash(), 0, 0);
|
if (!isDividerBar(change)) {
|
||||||
|
// For divider, don't modify its inner leash position when creating the outer leash
|
||||||
|
// for the transition. In case the position being wrong after the transition finished.
|
||||||
|
t.setPosition(change.getLeash(), 0, 0);
|
||||||
|
}
|
||||||
t.setLayer(change.getLeash(), 0);
|
t.setLayer(change.getLeash(), 0);
|
||||||
return leashSurface;
|
return leashSurface;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user