Update animations for TM-QPR: OverviewSplitSelect > Home transition
The animation from OverviewSplitSelect to Home is now updated to the latest spec. See bug for details. - New timings - FloatingTaskView now translates out, instead of fading - FloatingTaskView and SplitInstructionsView now disappear concurrently with the rest of Overview, instead of afterward Fixes: 236761067 Test: Manual on tablet and phone Change-Id: Iaa1c804a60859232f331950098b67968cc187e82
This commit is contained in:
@@ -52,9 +52,9 @@ import com.android.launcher3.R;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.util.DisplayController;
|
||||
import com.android.launcher3.util.SplitConfigurationOptions;
|
||||
import com.android.launcher3.util.SplitConfigurationOptions.SplitBounds;
|
||||
import com.android.launcher3.util.SplitConfigurationOptions.SplitPositionOption;
|
||||
import com.android.launcher3.util.SplitConfigurationOptions.StagePosition;
|
||||
import com.android.launcher3.util.SplitConfigurationOptions.SplitBounds;
|
||||
import com.android.launcher3.views.BaseDragLayer;
|
||||
|
||||
import java.util.List;
|
||||
@@ -756,4 +756,36 @@ public class PortraitPagedViewHandler implements PagedOrientationHandler {
|
||||
return new Pair<>(secondary, primary);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getFloatingTaskOffscreenTranslationTarget(View floatingTask, RectF onScreenRect,
|
||||
@StagePosition int stagePosition, DeviceProfile dp) {
|
||||
if (dp.isLandscape) {
|
||||
float currentTranslationX = floatingTask.getTranslationX();
|
||||
return stagePosition == STAGE_POSITION_TOP_OR_LEFT
|
||||
? currentTranslationX - onScreenRect.width()
|
||||
: currentTranslationX + onScreenRect.width();
|
||||
} else {
|
||||
float currentTranslationY = floatingTask.getTranslationY();
|
||||
return currentTranslationY - onScreenRect.height();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFloatingTaskPrimaryTranslation(View floatingTask, float translation,
|
||||
DeviceProfile dp) {
|
||||
if (dp.isLandscape) {
|
||||
floatingTask.setTranslationX(translation);
|
||||
} else {
|
||||
floatingTask.setTranslationY(translation);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Float getFloatingTaskPrimaryTranslation(View floatingTask, DeviceProfile dp) {
|
||||
return dp.isLandscape
|
||||
? floatingTask.getTranslationX()
|
||||
: floatingTask.getTranslationY();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user