问题描述
你能告诉我 ArrayAdapter
、 BaseAdapter
和 ListAdapter
之间的区别吗.
Could you please tell me difference between ArrayAdapter
, BaseAdapter
and ListAdapter
.
推荐答案
BaseAdapter
顾名思义,是所有适配器的基类.
BaseAdapter
as the name suggests, is a base class for all the adapters.
当您扩展 Base 适配器类时,您需要实现所有方法,例如 getCount()
、getId()
等.
When you are extending the Base adapter class you need to implement all the methods like getCount()
, getId()
etc.
ArrayAdapter
是一个可以处理数据数组的类.您只需要覆盖 getview()
方法.
ListAdapter
是由具体的适配器类实现的接口.
ListAdapter
is a an interface implemented by concrete adapter classes.
BaseAdapter
是抽象类,而 ArrayAdapter
和 ListAdapter
是具体类.
BaseAdapter
is an abstract class whereas ArrayAdapter
and ListAdapter
are the concrete classes.
ArrayAdapter
和 ListAdapter
类的开发是因为通常我们处理数组数据集和列表数据集.
ArrayAdapter
and ListAdapter
classes are developed since in general we deal with the array data sets and list data sets.
这篇关于ArrayAdapter 、 BaseAdapter 和 ListAdapter 有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!