> > > I have a strange problem with one of my ListActivity. I have overrided
> > > the default ArrayAdapter in order to customize my list. I have then
> > > filled the adapter with an ArrayList.


This is a custom array adapter.

Thanks and Regards,
Kumar Bibek
http://tech-droid.blogspot.com

On Jun 17, 1:27 pm, Christophe <[email protected]>
wrote:
> the only example I have found for ArrayAdapter in the API example
> doesn't show how to add element in the array :
>
> http://developer.android.com/resources/samples/ApiDemos/src/com/examp...
>
> and getCount() is not overrided in this example ...
>
> On Jun 16, 9:39 pm, Kumar Bibek <[email protected]> wrote:
>
> > You have to override the getCount method. Please go through the
> > examples to check how the Adapters work.
>
> > Thanks and Regards,
> > Kumar Bibekhttp://tech-droid.blogspot.com
>
> > On Jun 16, 6:07 pm, Christophe <[email protected]>
> > wrote:
>
> > > hello everyone,
>
> > > I have a strange problem with one of my ListActivity. I have overrided
> > > the default ArrayAdapter in order to customize my list. I have then
> > > filled the adapter with an ArrayList.
>
> > > If I insert an element on the list and then call
> > > notifyDataSetChanged() on the adapter everything works fine.
>
> > > But if I insert an element at the END of the list and then call
> > > notifyDataSetChanged(), the new element doesn't  appear ...
>
> > > And finally if I override getCount() on my adapter like this :
>
> > > @Override
> > > public int getCount() {
> > >         return myArrayList.size();
>
> > > }
>
> > > then everything works fine.
> > > Is this a bug or am I doing something wrong ?
>
>

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