Skip to content

Commit 3ab7657

Browse files
Merge pull request MeetMe#4 from bdonahue/master
Adding support for getFirstVisiblePosition and getLastVisiblePosition
2 parents f8c3d8e + 8747633 commit 3ab7657

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

AndroidHorizontalListView/src/com/meetme/android/horizontallistview/HorizontalListView.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,16 @@ public void scrollTo(int x) {
867867
requestLayout();
868868
}
869869

870+
@Override
871+
public int getFirstVisiblePosition() {
872+
return mLeftViewAdapterIndex;
873+
}
874+
875+
@Override
876+
public int getLastVisiblePosition() {
877+
return mRightViewAdapterIndex;
878+
}
879+
870880
/** Draws the overscroll edge glow effect on the left and right sides of the horizontal list */
871881
private void drawEdgeGlow(Canvas canvas) {
872882
if (mEdgeGlowLeft != null && !mEdgeGlowLeft.isFinished() && isEdgeGlowEnabled()) {

0 commit comments

Comments
 (0)