Merge "Fix juttering problem with split staging animation" into tm-qpr-dev
This commit is contained in:
@@ -432,10 +432,10 @@ public class LandscapePagedViewHandler implements PagedOrientationHandler {
|
|||||||
int drawableWidth, int drawableHeight, DeviceProfile dp,
|
int drawableWidth, int drawableHeight, DeviceProfile dp,
|
||||||
@StagePosition int stagePosition) {
|
@StagePosition int stagePosition) {
|
||||||
float insetAdjustment = getPlaceholderSizeAdjustment(dp) / 2f;
|
float insetAdjustment = getPlaceholderSizeAdjustment(dp) / 2f;
|
||||||
out.setX(Math.round(onScreenRectCenterX / fullscreenScaleX
|
out.setX(onScreenRectCenterX / fullscreenScaleX
|
||||||
- 1.0f * drawableWidth / 2));
|
- 1.0f * drawableWidth / 2);
|
||||||
out.setY(Math.round((onScreenRectCenterY + insetAdjustment) / fullscreenScaleY
|
out.setY((onScreenRectCenterY + insetAdjustment) / fullscreenScaleY
|
||||||
- 1.0f * drawableHeight / 2));
|
- 1.0f * drawableHeight / 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -463,20 +463,20 @@ public class PortraitPagedViewHandler implements PagedOrientationHandler {
|
|||||||
boolean pinToRight = stagePosition == STAGE_POSITION_BOTTOM_OR_RIGHT;
|
boolean pinToRight = stagePosition == STAGE_POSITION_BOTTOM_OR_RIGHT;
|
||||||
float insetAdjustment = getPlaceholderSizeAdjustment(dp, pinToRight) / 2f;
|
float insetAdjustment = getPlaceholderSizeAdjustment(dp, pinToRight) / 2f;
|
||||||
if (!dp.isLandscape) {
|
if (!dp.isLandscape) {
|
||||||
out.setX(Math.round(onScreenRectCenterX / fullscreenScaleX
|
out.setX(onScreenRectCenterX / fullscreenScaleX
|
||||||
- 1.0f * drawableWidth / 2));
|
- 1.0f * drawableWidth / 2);
|
||||||
out.setY(Math.round((onScreenRectCenterY + insetAdjustment) / fullscreenScaleY
|
out.setY((onScreenRectCenterY + insetAdjustment) / fullscreenScaleY
|
||||||
- 1.0f * drawableHeight / 2));
|
- 1.0f * drawableHeight / 2);
|
||||||
} else {
|
} else {
|
||||||
if (pinToRight) {
|
if (pinToRight) {
|
||||||
out.setX(Math.round((onScreenRectCenterX - insetAdjustment) / fullscreenScaleX
|
out.setX((onScreenRectCenterX - insetAdjustment) / fullscreenScaleX
|
||||||
- 1.0f * drawableWidth / 2));
|
- 1.0f * drawableWidth / 2);
|
||||||
} else {
|
} else {
|
||||||
out.setX(Math.round((onScreenRectCenterX + insetAdjustment) / fullscreenScaleX
|
out.setX((onScreenRectCenterX + insetAdjustment) / fullscreenScaleX
|
||||||
- 1.0f * drawableWidth / 2));
|
- 1.0f * drawableWidth / 2);
|
||||||
}
|
}
|
||||||
out.setY(Math.round(onScreenRectCenterY / fullscreenScaleY
|
out.setY(onScreenRectCenterY / fullscreenScaleY
|
||||||
- 1.0f * drawableHeight / 2));
|
- 1.0f * drawableHeight / 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user