On Sat, Jul 16, 2011 at 09:28:06AM -0400, Mark Murphy wrote:
> On Sat, Jul 16, 2011 at 9:19 AM, Jim Graham <[email protected]> wrote:

> I've never done this, so this is very rough. YMMV. Also, I am
> assuming that 42 is a position and that you have no headers or
> footers on the list.

Yes, when I said "row 42" I did mean the row at position 42.
And you are correct, I haven't added any headers or footers.
And row, ummm, excue me, position 42, is just a hypothetical
row number/position/whatever.  It could be anywhere from 0 to
297 (or was that 296?  I can't remember off-hand.)  42 was just
a randomly-selected example position.

> Step #1: Confirm that 42 is in the range from
> getFirstVisiblePosition() to getLastVisiblePosition(). Do
> something if it's not.

Interesting.  A search on that in the dev guide leads me to
ListView, where, unless I missed it again and again, it isn't
even mentioned.  :-)  So let me see if I have this right, without
referring to the dev guide (which usually seems to produce much
better search results for me these days)....

I have a ListView; let's call it myList.  I would use something
like:

   topidx = myList.getFirstVisiblePosition()

to find out what the position/row number is on top of the screen.

If it's the one I want, I'm done.  If not, move the one I want up
by the difference, and double-check, adjusting again if I missed
by one.

Have I got that right?  If so, that's exactly what I need to
solve all of this.  If not, what did I miss?

Later,
   --jim

-- 
73 DE N5IAL (/4)        MiSTie #49997  < Running FreeBSD 7.0 >
[email protected] ICBM/Hurricane: 30.44406N 86.59909W
Point Lobos Photography Set 1 (Photo-posters):  http://jdgapps.com

        Do not look into waveguide with remaining eye!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to