Handle page offset for grid overview
- Use TaskView's actual position with grid/fullscreen translation considered for taskPosition calculation - Shift taskPosition by midpoint scroll, and no longer assumes midpoint is on middle of the screen - Handle situation that TaskView is on left/right of midpoint, making the calculation generic to be able to handle grid situation Bug: 175939487 Test: Launch modal view with wide/, RTL/non-RTL, orientation/simulated landscape combinations Change-Id: Idd0cc9c5e24f453d830e1420319a38d3d784270d
This commit is contained in:
1 parent
def4ff1570
commit
9594c6987f
5 files changed
+150
-46
No files matched your search
@@ -117,11 +117,26 @@ public class PortraitPagedViewHandler implements PagedOrientationHandler {
|
||||
return view.getMeasuredWidth();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPrimarySize(View view) {
|
||||
return view.getWidth();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getPrimarySize(RectF rect) {
|
||||
return rect.width();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getStart(RectF rect) {
|
||||
return rect.left;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getEnd(RectF rect) {
|
||||
return rect.right;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getClearAllSidePadding(View view, boolean isRtl) {
|
||||
return (isRtl ? view.getPaddingRight() : - view.getPaddingLeft()) / 2;
|
||||
|
||||
Reference in new issue
Block a user