Cleaning up overscroll effect in launcher workspace
-> Making sure workspace is drawn above the hotseat and qsb
-> Dimming the dock divider and page indicator during overscroll
Change-Id: I40766aa88e58db2d102c11d1ae8b2455aa459a07
diff --git a/src/com/android/launcher2/PagedView.java b/src/com/android/launcher2/PagedView.java
index d8a8bb2..df1d525 100644
--- a/src/com/android/launcher2/PagedView.java
+++ b/src/com/android/launcher2/PagedView.java
@@ -1703,7 +1703,7 @@
}
}
- 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 @@
// 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 @@
}
}
+ protected void cancelScrollingIndicatorAnimations() {
+ if (mScrollIndicatorAnimator != null) {
+ mScrollIndicatorAnimator.cancel();
+ }
+ }
+
protected void hideScrollingIndicator(boolean immediately) {
if (getChildCount() <= 1) return;
if (!isScrollingIndicatorEnabled()) return;
@@ -1763,9 +1767,7 @@
if (mScrollIndicator != null) {
// Fade the indicator out
updateScrollingIndicatorPosition();
- if (mScrollIndicatorAnimator != null) {
- mScrollIndicatorAnimator.cancel();
- }
+ cancelScrollingIndicatorAnimations();
if (immediately) {
mScrollIndicator.setVisibility(View.GONE);
mScrollIndicator.setAlpha(0f);