what i can say about that is that when you go to an other activity or
when you scroll down you list it use the cursor you place in the
SimpleAdapter so when someone click a checkbox for exemple in a row of
your list it is your job to do an update to your cursor (do this by
using the update function for the cursor in java doc).

Once you do that the listActivity will leave your data as selected
because it is bind with your cursor and will automaticaly put the
right data.

to Access an element in a listView use the listView object in the
onListItemClick methode and the position or the View object (you can
do a : (TextView) v.findViewById(R.id.txtResultSendSMS)  v: is the
view that as been clicked).


On May 31, 2:01 pm, David Given <[EMAIL PROTECTED]> wrote:
> Mark Murphy wrote:
>
> [...]
>
> > If you're sure your data set won't be a-changin' underneath you, you
> > could try using an unmanaged cursor. However, if other activities have
> > the capability of modifying the data you're showing in the list (e.g.,
> > it's a public content provider), then I suspect you *want* to requery
> > upon the activity restarting, lest you show stale data to the user.
>
> Yup, switching to an unmanaged cursor fixed it. I also checked that my
> ListView automatically notices when my database update thread modifies
> the database; that still works, so manually requerying is obviously
> unnecessary.
>
> Thanks!
>
> Romain Guy wrote:
> >> On a related note, with a ListActivity, is it my responsibility to save
> >> > the selected item in the icicle on freeze and restore it on thaw, or
> >> > will the ListActivity do it for me?
>
> > Not in post-M5 SDKs :)
>
> > A lot of work went into ListView's state saving after M5 so you might
> > want to wait until the next public release of the SDK before trying to
> > work around this issue as it is probably handled for you already.
>
> Fair enough. I'll wait for the next SDK before tackling the freeze/thaw
> issue; hopefully the problem will just go away!
>
> --
> ┌─── dg@cowlark.com ─────http://www.cowlark.com─────
> │ "I have always wished for my computer to be as easy to use as my
> │ telephone; my wish has come true because I can no longer figure out
> │ how to use my telephone." --- Bjarne Stroustrup
>
>  signature.asc
> 1KDownload
--~--~---------~--~----~------------~-------~--~----~
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]
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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to