mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Animate SplitPlaceholderView when entering split from overview
Bugs tracked in b/181704764 Bug: 181704764 Test: Tested on phone and large screen in multiple orientations Change-Id: I07509006ae3d1f4425dc5119d0c8ed52b41a3bc2
This commit is contained in:
@@ -204,6 +204,16 @@ public class LandscapePagedViewHandler implements PagedOrientationHandler {
|
||||
return Surface.ROTATION_90;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPrimaryScale(View view, float scale) {
|
||||
view.setScaleY(scale);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSecondaryScale(View view, float scale) {
|
||||
view.setScaleX(scale);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getChildStart(View view) {
|
||||
return view.getTop();
|
||||
@@ -352,6 +362,25 @@ public class LandscapePagedViewHandler implements PagedOrientationHandler {
|
||||
STAGE_POSITION_TOP_OR_LEFT, STAGE_TYPE_MAIN));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getInitialSplitPlaceholderBounds(int placeholderHeight, DeviceProfile dp,
|
||||
SplitPositionOption splitPositionOption, Rect out) {
|
||||
// In fake land/seascape, the placeholder always needs to go to the "top" of the device,
|
||||
// which is the same bounds as 0 rotation.
|
||||
int width = dp.widthPx;
|
||||
out.set(0, 0, width, placeholderHeight);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getFinalSplitPlaceholderBounds(int splitDividerSize, DeviceProfile dp,
|
||||
SplitPositionOption initialSplitOption, Rect out1, Rect out2) {
|
||||
// In fake land/seascape, the window bounds are always top and bottom half
|
||||
int screenHeight = dp.heightPx;
|
||||
int screenWidth = dp.widthPx;
|
||||
out1.set(0, 0, screenWidth, screenHeight / 2 - splitDividerSize);
|
||||
out2.set(0, screenHeight / 2 + splitDividerSize, screenWidth, screenHeight);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FloatProperty getSplitSelectTaskOffset(FloatProperty primary, FloatProperty secondary,
|
||||
DeviceProfile deviceProfile) {
|
||||
|
||||
Reference in New Issue
Block a user