diff options
Diffstat (limited to 'src/com/android/launcher2/PagedView.java')
-rw-r--r-- | src/com/android/launcher2/PagedView.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/com/android/launcher2/PagedView.java b/src/com/android/launcher2/PagedView.java index d8a8bb260..df1d5252f 100644 --- a/src/com/android/launcher2/PagedView.java +++ b/src/com/android/launcher2/PagedView.java @@ -1703,7 +1703,7 @@ public abstract class PagedView extends ViewGroup { } } - private ImageView getScrollingIndicator() { + protected ImageView getScrollingIndicator() { // We use mHasScrollIndicator to prevent future lookups if there is no sibling indicator // found if (mHasScrollIndicator && mScrollIndicator == null) { @@ -1742,9 +1742,7 @@ public abstract class PagedView extends ViewGroup { // Fade the indicator in updateScrollingIndicatorPosition(); mScrollIndicator.setVisibility(View.VISIBLE); - if (mScrollIndicatorAnimator != null) { - mScrollIndicatorAnimator.cancel(); - } + cancelScrollingIndicatorAnimations(); if (immediately) { mScrollIndicator.setAlpha(1f); } else { @@ -1755,6 +1753,12 @@ public abstract class PagedView extends ViewGroup { } } + protected void cancelScrollingIndicatorAnimations() { + if (mScrollIndicatorAnimator != null) { + mScrollIndicatorAnimator.cancel(); + } + } + protected void hideScrollingIndicator(boolean immediately) { if (getChildCount() <= 1) return; if (!isScrollingIndicatorEnabled()) return; @@ -1763,9 +1767,7 @@ public abstract class PagedView extends ViewGroup { if (mScrollIndicator != null) { // Fade the indicator out updateScrollingIndicatorPosition(); - if (mScrollIndicatorAnimator != null) { - mScrollIndicatorAnimator.cancel(); - } + cancelScrollingIndicatorAnimations(); if (immediately) { mScrollIndicator.setVisibility(View.GONE); mScrollIndicator.setAlpha(0f); |