views:

85

answers:

1

I've got my ListView on screen. It's scrolled to the top. I see 6 rows. And when I Log getFirstVisiblePosition() and getLastVisiblePosition(), it says 0 and 6.

Is getLastVisiblePosition() actually returning the first non-visible position? In other words, should my test for whether a particular row is onscreen be not

first <= row && row <= last

but rather

first <= row && row < last

?

+1  A: 

Hey Carl, I believe that Android 1.6-2.1 has a bug on this, I cannot find it, but I think I even came across it on the official bugtraq. I am not sure if this is fixed on 2.2. But it definitely has something Funky.

Tancho