Christopher Perry
Christopher Perry

Reputation: 39225

How to determine if a view is visible in a ListView?

I want to be able to tell if a view is visible in my listview, which is populated by a custom CursorAdapter. How can I do this?

Upvotes: 10

Views: 6741

Answers (1)

Romain Guy
Romain Guy

Reputation: 98501

You can check whether a given position is visible, using getFirstVisiblePosition() and getChildCount().

Upvotes: 14

Related Questions