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
This commit is contained in:
Adam Cohen
2011-11-01 17:29:52 -07:00
parent 4a4f5c3557
commit 21b411074e
4 changed files with 79 additions and 13 deletions
+9 -7
View File
@@ -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);