summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-07-08 16:41:21 -0700
committerSunny Goyal <sunnygoyal@google.com>2015-07-08 16:44:37 -0700
commitcb037eee8ca863ad99d9cdbacd6a82759295e5a0 (patch)
tree6c053fba394cc9628d03a4936d5c1b10500b8e30 /src
parent987922d81e2948707b23af8dd7608e0a710c6b46 (diff)
downloadandroid_packages_apps_Trebuchet-cb037eee8ca863ad99d9cdbacd6a82759295e5a0.tar.gz
android_packages_apps_Trebuchet-cb037eee8ca863ad99d9cdbacd6a82759295e5a0.tar.bz2
android_packages_apps_Trebuchet-cb037eee8ca863ad99d9cdbacd6a82759295e5a0.zip
Fixing overscroll not drawn in rtl
> Using the currect right page index in rtl > Updating current scroll after max scroll has been calculated. This prevens an extra overscroll when the layout happens for the first time. Bug: 22358804 Change-Id: If07132701936e06f727211122a3b3e6f8426c07b
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/PagedView.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java
index 873c0684e..218c1a36f 100644
--- a/src/com/android/launcher3/PagedView.java
+++ b/src/com/android/launcher3/PagedView.java
@@ -909,11 +909,6 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
}
}
- if (mFirstLayout && mCurrentPage >= 0 && mCurrentPage < childCount) {
- updateCurrentPageScroll();
- mFirstLayout = false;
- }
-
final LayoutTransition transition = getLayoutTransition();
// If the transition is running defer updating max scroll, as some empty pages could
// still be present, and a max scroll change could cause sudden jumps in scroll.
@@ -938,6 +933,11 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
updateMaxScrollX();
}
+ if (mFirstLayout && mCurrentPage >= 0 && mCurrentPage < childCount) {
+ updateCurrentPageScroll();
+ mFirstLayout = false;
+ }
+
if (mScroller.isFinished() && mChildCountOnLastLayout != childCount) {
if (mRestorePage != INVALID_RESTORE_PAGE) {
setCurrentPage(mRestorePage);
@@ -1173,7 +1173,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
if (!mEdgeGlowRight.isFinished()) {
final int restoreCount = canvas.save();
Rect display = mViewport;
- canvas.translate(display.left + mPageScrolls[getChildCount() - 1], display.top);
+ canvas.translate(display.left + mPageScrolls[mIsRtl ? 0 : (getPageCount() - 1)], display.top);
canvas.rotate(90);
getEdgeVerticalPostion(sTmpIntPoint);