mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 02:38:20 +00:00
Fix custom content scroll effects bug (recent regression) (issue 11188769)
Change-Id: Ib90c024daf64baac2ccd1cfd04897d18cd35e111
This commit is contained in:
@@ -1409,11 +1409,11 @@ public class Workspace extends SmoothPagedView
|
||||
if (hasCustomContent()) {
|
||||
int index = mScreenOrder.indexOf(CUSTOM_CONTENT_SCREEN_ID);
|
||||
|
||||
int scrollDelta = getScrollForPage(index + 1) - getScrollX() +
|
||||
getLayoutTransitionOffsetForPage(index + 1);
|
||||
translationX = scrollDelta;
|
||||
progress = (1.0f * scrollDelta) /
|
||||
(getScrollForPage(index + 1) - getScrollForPage(index));
|
||||
int scrollDelta = getScrollX() - getScrollForPage(index) -
|
||||
getLayoutTransitionOffsetForPage(index);
|
||||
float scrollRange = getScrollForPage(index + 1) - getScrollForPage(index);
|
||||
translationX = scrollRange - scrollDelta;
|
||||
progress = (scrollRange - scrollDelta) / scrollRange;
|
||||
|
||||
if (isLayoutRtl()) {
|
||||
translationX = Math.min(0, translationX);
|
||||
|
||||
Reference in New Issue
Block a user