Re: ListActivity woes
Nomade <spjeanfritz <at> gmail.com>
2008-06-01 10:04:41 GMT
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 <d... <at> cowlark.com> 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
(Continue reading)