Merge "Cleaning up overscroll effect in launcher workspace" into ics-mr1

This commit is contained in:
Adam Cohen authored and Android (Google) Code Review committed 2011-11-04 13:59:53 -07:00
commit acec671920
4 files changed
+79 -13

No files matched your search

+9 -7
View File
@@ -1711,7 +1711,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) {
@@ -1750,9 +1750,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 {
@@ -1763,6 +1761,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;
@@ -1771,9 +1775,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);