mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 17:06:49 +00:00
Merge "Fix split animation for grid RTL" into sc-v2-dev am: d1c9cd2700
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16418133 Change-Id: I98fab9b33140369690a3c893643be02515f0d11f
This commit is contained in:
@@ -129,7 +129,7 @@ public class FloatingTaskView extends FrameLayout {
|
||||
public void update(RectF position, float progress, float windowRadius) {
|
||||
MarginLayoutParams lp = (MarginLayoutParams) getLayoutParams();
|
||||
|
||||
float dX = position.left - lp.getMarginStart();
|
||||
float dX = position.left - mStartingPosition.left;
|
||||
float dY = position.top - lp.topMargin;
|
||||
|
||||
setTranslationX(dX);
|
||||
@@ -160,10 +160,15 @@ public class FloatingTaskView extends FrameLayout {
|
||||
lp.ignoreInsets = true;
|
||||
// Position the floating view exactly on top of the original
|
||||
lp.topMargin = Math.round(pos.top);
|
||||
lp.setMarginStart(Math.round(pos.left));
|
||||
if (mIsRtl) {
|
||||
lp.setMarginStart(mLauncher.getDeviceProfile().widthPx - Math.round(pos.right));
|
||||
} else {
|
||||
lp.setMarginStart(Math.round(pos.left));
|
||||
}
|
||||
|
||||
// Set the properties here already to make sure they are available when running the first
|
||||
// animation frame.
|
||||
int left = lp.leftMargin;
|
||||
int left = (int) pos.left;
|
||||
layout(left, lp.topMargin, left + lp.width, lp.topMargin + lp.height);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user