Fixing bottom fading the contact list
Bug: 3324620
Change-Id: Ie5dbfe699865f4fb7b15b981ec0309b45d0fb177
diff --git a/src/com/android/contacts/widget/PinnedHeaderListView.java b/src/com/android/contacts/widget/PinnedHeaderListView.java
index b0ea207..cef7203 100644
--- a/src/com/android/contacts/widget/PinnedHeaderListView.java
+++ b/src/com/android/contacts/widget/PinnedHeaderListView.java
@@ -171,13 +171,6 @@
mHeaders[i].view = mAdapter.getPinnedHeaderView(i, mHeaders[i].view, this);
}
- // Disable vertical fading when the pinned header is present
- // TODO change ListView to allow separate measures for top and bottom fading edge;
- // in this particular case we would like to disable the top, but not the bottom edge.
- if (mSize > 0) {
- setFadingEdgeLength(0);
- }
-
mAnimationTargetTime = System.currentTimeMillis() + mAnimationDuration;
mAdapter.configurePinnedHeaders(this);
invalidateIfAnimating();
@@ -188,6 +181,12 @@
}
}
+ @Override
+ protected float getTopFadingEdgeStrength() {
+ // Disable vertical fading at the top when the pinned header is present
+ return mSize > 0 ? 0 : super.getTopFadingEdgeStrength();
+ }
+
public void onScrollStateChanged(AbsListView view, int scrollState) {
mScrollState = scrollState;
if (mOnScrollListener != null) {