Skip to content

Commit

Permalink
Fix custom content scroll effects bug (recent regression) (issue 1118…
Browse files Browse the repository at this point in the history
…8769)

Change-Id: Ib90c024daf64baac2ccd1cfd04897d18cd35e111
  • Loading branch information
Adam Cohen committed Oct 11, 2013
1 parent f7d4585 commit a45de07
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/com/android/launcher3/Workspace.java
Original file line number Diff line number Diff line change
Expand Up @@ -1409,11 +1409,11 @@ private void updateStateForCustomContent(int screenCenter) {
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);
Expand Down

0 comments on commit a45de07

Please sign in to comment.