diff options
author | Winson Chung <winsonc@google.com> | 2013-09-03 17:48:37 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2013-09-05 12:14:28 -0700 |
commit | c58497ee619416c4949b16eb43486c11618b69e5 (patch) | |
tree | b8bfd3ec331885a25f42c69fb41dbfd861a4763a /src/com/android/launcher3/PageIndicator.java | |
parent | 2d8de5845be5f49d3767b8354f0d5479a0715abe (diff) | |
download | android_packages_apps_Trebuchet-c58497ee619416c4949b16eb43486c11618b69e5.tar.gz android_packages_apps_Trebuchet-c58497ee619416c4949b16eb43486c11618b69e5.tar.bz2 android_packages_apps_Trebuchet-c58497ee619416c4949b16eb43486c11618b69e5.zip |
Initial changes to restore AllApps.
- Removes unused all apps code due to dynamic grid/spacing
- Attempts to use CellLayout instead of PagedViewCellLayout
Change-Id: I3c49bca9fc35dfeaf250591fd63bc7f36119968f
Diffstat (limited to 'src/com/android/launcher3/PageIndicator.java')
-rw-r--r-- | src/com/android/launcher3/PageIndicator.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/com/android/launcher3/PageIndicator.java b/src/com/android/launcher3/PageIndicator.java index ce9814505..110d6d9c3 100644 --- a/src/com/android/launcher3/PageIndicator.java +++ b/src/com/android/launcher3/PageIndicator.java @@ -161,30 +161,30 @@ public class PageIndicator extends LinearLayout { mWindowRange[1] = windowEnd; } - void addMarker(int index, int layoutId) { + void addMarker(int index, int layoutId, boolean allowAnimations) { index = Math.max(0, Math.min(index, mMarkers.size())); PageIndicatorMarker marker = (PageIndicatorMarker) mLayoutInflater.inflate(layoutId, this, false); mMarkers.add(index, marker); - offsetWindowCenterTo(mActiveMarkerIndex, true); + offsetWindowCenterTo(mActiveMarkerIndex, allowAnimations); } - void addMarkers(ArrayList<Integer> layoutIds) { + void addMarkers(ArrayList<Integer> layoutIds, boolean allowAnimations) { for (int i = 0; i < layoutIds.size(); ++i) { - addMarker(Integer.MAX_VALUE, layoutIds.get(i)); + addMarker(Integer.MAX_VALUE, layoutIds.get(i), allowAnimations); } } - void removeMarker(int index) { + void removeMarker(int index, boolean allowAnimations) { if (mMarkers.size() > 0) { index = Math.max(0, Math.min(mMarkers.size() - 1, index)); mMarkers.remove(index); - offsetWindowCenterTo(mActiveMarkerIndex, true); + offsetWindowCenterTo(mActiveMarkerIndex, allowAnimations); } } - void removeAllMarkers() { + void removeAllMarkers(boolean allowAnimations) { while (mMarkers.size() > 0) { - removeMarker(Integer.MAX_VALUE); + removeMarker(Integer.MAX_VALUE, allowAnimations); } } |