summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/PagedView.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/PagedView.java')
-rw-r--r--src/com/android/launcher3/PagedView.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java
index 3e2ec5857..7b5662523 100644
--- a/src/com/android/launcher3/PagedView.java
+++ b/src/com/android/launcher3/PagedView.java
@@ -786,14 +786,14 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
int widthSize = MeasureSpec.getSize(widthMeasureSpec);
int heightMode = MeasureSpec.getMode(heightMeasureSpec);
int heightSize = MeasureSpec.getSize(heightMeasureSpec);
- // NOTE: We multiply by 1.5f to account for the fact that depending on the offset of the
+ // NOTE: We multiply by 2f to account for the fact that depending on the offset of the
// viewport, we can be at most one and a half screens offset once we scale down
DisplayMetrics dm = getResources().getDisplayMetrics();
int maxSize = Math.max(dm.widthPixels + mInsets.left + mInsets.right,
dm.heightPixels + mInsets.top + mInsets.bottom);
- int parentWidthSize = (int) (1.5f * maxSize);
- int parentHeightSize = maxSize;
+ int parentWidthSize = (int) (2f * maxSize);
+ int parentHeightSize = (int) (2f * maxSize);
int scaledWidthSize, scaledHeightSize;
if (mUseMinScale) {
scaledWidthSize = (int) (parentWidthSize / mMinScale);
@@ -1820,7 +1820,9 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
addView(mDragView, pageUnderPointIndex);
onAddView(mDragView, pageUnderPointIndex);
mSidePageHoverIndex = -1;
- mPageIndicator.setActiveMarker(getNextPage());
+ if (mPageIndicator != null) {
+ mPageIndicator.setActiveMarker(getNextPage());
+ }
}
};
postDelayed(mSidePageHoverRunnable, REORDERING_SIDE_PAGE_HOVER_TIMEOUT);