Merge "Flip recents if setting is true" into ub-launcher3-master

This commit is contained in:
Tony Wickham
2018-02-27 19:50:17 +00:00
committed by Android (Google) Code Review
4 changed files with 32 additions and 10 deletions
@@ -260,6 +260,7 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag
int launchedTaskIndex = recentsView.indexOfChild(v);
int centerTaskIndex = recentsView.getCurrentPage();
boolean launchingCenterTask = launchedTaskIndex == centerTaskIndex;
boolean isRtl = recentsView.isRtl();
if (launchingCenterTask) {
if (launchedTaskIndex - 1 >= recentsView.getFirstTaskIndex()) {
TaskView adjacentPage1 = (TaskView) recentsView.getPageAt(launchedTaskIndex - 1);
@@ -268,7 +269,7 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag
new PropertyListBuilder()
.scale(adjacentPage1.getScaleX() * mRecentsScale)
.translationY(mRecentsTransY)
.translationX(mIsRtl ? mRecentsTransX : -mRecentsTransX)
.translationX(isRtl ? mRecentsTransX : -mRecentsTransX)
.build());
launcherAnimator.play(adjacentTask1ScaleAndTranslate);
}
@@ -279,7 +280,7 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag
new PropertyListBuilder()
.scale(adjacentTask2.getScaleX() * mRecentsScale)
.translationY(mRecentsTransY)
.translationX(mIsRtl ? -mRecentsTransX : mRecentsTransX)
.translationX(isRtl ? -mRecentsTransX : mRecentsTransX)
.build());
launcherAnimator.play(adjacentTask2ScaleAndTranslate);
}
@@ -291,7 +292,7 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag
LauncherAnimUtils.ofPropertyValuesHolder(centerTask,
new PropertyListBuilder()
.scale(v.getScaleX())
.translationX(mIsRtl ? -translationX : translationX)
.translationX(isRtl ? -translationX : translationX)
.build());
launcherAnimator.play(centerTaskParallaxToRight);
int otherAdjacentTaskIndex = centerTaskIndex + (centerTaskIndex - launchedTaskIndex);
@@ -303,7 +304,7 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag
LauncherAnimUtils.ofPropertyValuesHolder(otherAdjacentTask,
new PropertyListBuilder()
.translationX(otherAdjacentTask.getTranslationX()
+ (mIsRtl ? -translationX : translationX))
+ (isRtl ? -translationX : translationX))
.build());
launcherAnimator.play(otherAdjacentTaskParallaxToRight);
}
@@ -750,7 +751,7 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag
Matrix matrix = new Matrix();
float height = mLauncher.getDeviceProfile().heightPx;
float width = mLauncher.getDeviceProfile().widthPx;
float endX = (Utilities.isRtl(mLauncher.getResources()) ? -width : width) * 1.16f;
float endX = (mLauncher.<RecentsView>getOverviewPanel().isRtl() ? -width : width) * 1.16f;
ValueAnimator closingAnimator = ValueAnimator.ofFloat(0, 1);
closingAnimator.setDuration(CLOSING_TRANSITION_DURATION_MS);