-
Notifications
You must be signed in to change notification settings - Fork 423
Open
Description
hi sir,
I've read your blog and code , and it's great. But I got a little problem still bothering me.
public int getScrollY() {
View c = mListView.getChildAt(0);
if (c == null) {
return 0;
}
int firstVisiblePosition = mListView.getFirstVisiblePosition();
int top = c.getTop();
int headerHeight = 0;
if (firstVisiblePosition >= 1) {
headerHeight = mPlaceHolderView.getHeight();
}
return -top + firstVisiblePosition * c.getHeight() + headerHeight;
}
I tried to remove the "firstVisiblePosition * c.getHeight()" and it still work well. So I am still confused about the meaning of this statement.
Metadata
Metadata
Assignees
Labels
No labels