mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 08:16:49 +00:00
Fix curve properties not applying when dismissing task
- ag/10936255 replaced getViewCenterPosition() with getChildStart(), meaning getTranslationX() was no longer included. - This change goes back to using getViewCenterPosition() and renames it to getChildStartWithTranslation(). - Update typo with parameter in getCurveProperties being mInsets instead of insets. Bug: 153574162 Change-Id: I9b46daecf3ee6dbefe0270e70fdc5e6d9d0b0c00
This commit is contained in:
@@ -65,11 +65,11 @@ public class PortraitPagedViewHandler implements PagedOrientationHandler {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getCurveProperties(PagedView view, Rect mInsets, CurveProperties out) {
|
||||
public void getCurveProperties(PagedView view, Rect insets, CurveProperties out) {
|
||||
out.scroll = view.getScrollX();
|
||||
out.halfPageSize = view.getNormalChildWidth() / 2;
|
||||
out.halfScreenSize = view.getMeasuredWidth() / 2;
|
||||
out.screenCenter = mInsets.left + view.getPaddingLeft() + out.scroll + out.halfPageSize;
|
||||
out.screenCenter = insets.left + view.getPaddingLeft() + out.scroll + out.halfPageSize;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -154,11 +154,6 @@ public class PortraitPagedViewHandler implements PagedOrientationHandler {
|
||||
view.setTranslationY(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getViewCenterPosition(View view) {
|
||||
return view.getLeft() + view.getTranslationX();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPrimaryScroll(View view) {
|
||||
return view.getScrollX();
|
||||
@@ -202,6 +197,11 @@ public class PortraitPagedViewHandler implements PagedOrientationHandler {
|
||||
return view.getLeft();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getChildStartWithTranslation(View view) {
|
||||
return view.getLeft() + view.getTranslationX();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCenterForPage(View view, Rect insets) {
|
||||
return (view.getPaddingTop() + view.getMeasuredHeight() + insets.top
|
||||
|
||||
Reference in New Issue
Block a user