BaseAdapter doesn't have a clear() method. That means that you will need to declare adapter as AllAdapter and not as BaseAdapter. Can you show us how you declared adapter?
Rob Spoor wrote:BaseAdapter doesn't have a clear() method. That means that you will need to declare adapter as AllAdapter and not as BaseAdapter. Can you show us how you declared adapter?
This is how I declare adapter
And code after setContentView
And finally AllAdapter Class
Learning language is easy but learning basics is difficult
That doesn't answer my question:
Where do you think the clear() method is defined? What class is it in?
If the compiler can not find a definition for a method it will flag that statement as an error.
Norm Radder wrote:That doesn't answer my question:
Where do you think the clear() method is defined? What class is it in?
If the compiler can not find a definition for a method it will flag that statement as an error.
Do you mean that I need to create a clear method in AllAdapter class ? I would like to clear all the listview item first before they added into listview.
Learning language is easy but learning basics is difficult