完整内容,请查看:http://www.zhdoc.net/android/reference/android/widget/Adapter.html
Adapter
public interface Adapter
android.widget.Adapter |
An Adapter object acts as a bridge between an AdapterView
and the underlying data for that view. The Adapter provides access to the data items. The Adapter is also responsible for making a View
for each item in the data set.
一个Adapter对象充当AdapterView
和视图的潜在数据之间的一个桥梁。Adapter提供了对数据项的访问。Adapter还负责对数据集中的每个项创建View
。
See also:
另请参考:
摘要
常量 | |
---|---|
int | IGNORE_ITEM_VIEW_TYPE An item view type that causes the |
int | NO_SELECTION |
Public methods | |
---|---|
abstract int | getCount() How many items are in the data set represented by this Adapter. |
abstract Object | getItem(int position) Get the data item associated with the specified position in the data set. |
abstract long | getItemId(int position) Get the row id associated with the specified position in the list. |
abstract int | getItemViewType(int position) Get the type of View that will be created by |
abstract View | getView(int position, View convertView, ViewGroup parent) Get a View that displays the data at the specified position in the data set. |
abstract int | getViewTypeCount() Returns the number of types of Views that will be created by |
abstract boolean | hasStableIds() Indicates whether the item ids are stable across changes to the underlying data. |
abstract boolean | isEmpty() |
abstract void | registerDataSetObserver(DataSetObserver observer) Register an observer that is called when changes happen to the data used by this adapter. |
abstract void | unregisterDataSetObserver(DataSetObserver observer) Unregister an observer that has previously been registered with this adapter via |