I’m creating a custom ListView that will that will accommodate rows having different layouts (i.e. Headings, and clickable items). Is there any particular difference between my custom adapter class extending Adapter over BaseAdapter? It looks like I need to override the same methods (getItem, getView… ect) in either case. Are there any performance differences? or does one do some of the implementation for you if you call super.method()? I understand that BaseAdapter is a subclass of Adapter, but what extra functionality do you get out of it?
Cheers,
Luke.
You have to implement fewer methods if you inherit from
BaseAdapterrather than creating a full implementation of theAdapterinterface. For example,BaseAdapterhandlesregisterDataSetObserver()andunregisterDataSetObserver()for you.Not usually.
Absolutely not.
Adapteris an interface, not a class.BaseAdapterimplementsAdapter.You do not get any “extra functionality” out of
Adapter, becauseAdapteris an interface.