I've worked a lot with ArrayAdapters and ListView/GridView.  I've
never had a problem like you describe.  It definitely isn't a
fundamental flaw.  Note that ListView recycles views, so that may be
why you are getting the state of the checkbox transferred from one
list item to the next.

These lines look odd to me:
    rowView.setText(shoppingItems.getItem(position).getName());
    rowView.setChecked(shoppingItems.getItem(position).isChecked());

It looks like you're referencing the ArrayList directly instead of
using what is passed into your adapter's constructor.

Try this instead:
     rowView.setText(itemList.getItem(position).getName());
     rowView.setChecked(itemList.getItem(position).isChecked());

On Nov 23, 5:14 pm, scottishwildcat <[email protected]> wrote:
> Thanks, but as I said, I tried that, and it didn't help. And you shouldn't
> have to do that anyway -- according to the API 
> documentation<http://developer.android.com/reference/android/widget/ArrayAdapter.ht...)>,
> notification is meant to happen automatically when you're just calling the
> adapter's add, remove, insert and clear methods, unless you explicitly call
> setNotifyOnChange(false) when you create the adapter (which I didn't).
>
> Cheers,
> Calum.

-- 
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