[android-developers] Re: bug with notifyDataSetChanged() in ArrayAdapter ?
On Jun 17, 9:37 am, Christophe <christophe.lebesner...@gmail.com>
wrote:
> myArrayList is a simple ArrayList :
>
> ArrayList<Step> myArrayList = new ArrayList<step>();
>
> which I give to my adapter in my ListActivity :
>
> adapter = new StepItemAdapter(this, myArrayList);
> this.setListAdapter(adapter);
if your StepItemAdapter extends ArrayAdapter you dont need myArrayList
>
> Later I add item to my list and try to refresh the view :
>
> myArrayList.add(position, new Step());
> adapter.notifyDataSetChanged();
just use adapter.add() and/or adapter.insert()
pskink
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home