getChildAt(position) won't work if you scroll the list. You are just
trying to retrieve the data in an unusual way. Like we said before,
you should talk to the Adapter, not to ListView to get the data. You
could also call obtainItem(int position) on the ListView, which is
similar to calling adapter.getItem(int position). However, *in your
case*, you will get back a Cursor and there's no way we will know what
you want out of this cursor. It's up to you to get the right data out
of the cursor.

On Thu, Jun 26, 2008 at 11:07 PM, Sylvester Steele
<[EMAIL PROTECTED]> wrote:
>
> phew!
>
> finally, (TextView)fruitsList.getChildAt(position)).getText() worked.
>
> But why are all these typecasting acrobatics necessary? I mean why
> isn't there a simple method that does this?
>
> Or is what I am asking too unusual?
>
> Thanks Mark and thanks Romain.
>
> Sylvester
> >
>



-- 
Romain Guy
www.curious-creature.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to