Interface Adapter
来源:互联网 发布:电机控制算法书籍 编辑:程序博客网 时间:2024/05/06 06:26
public interface Adapter:
(所在包)android.widget.Adapter
Known Indirect Subclasses(已知的间接子类)
ArrayAdapter<T>, BaseAdapter, CursorAdapter, HeaderViewListAdapter, ListAdapter, ResourceCursorAdapter, SimpleAdapter,
SimpleCursorAdapter, SpinnerAdapter,WrapperListAdapter。
Class Overview(类概述)
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和这个view相关的数据之间的桥梁。Adapter也提供对数据条目的访问。Adapter也负责为数据设置中的每个条目生产view。)
See Also(参见)
ArrayAdapter
CursorAdapter
SimpleCursorAdapter
(1)public abstract int getCount ()How many items are in the data set represented by this Adapter.
position Position of the item whose data we want within the adapter's data set.(位置:我们需要的在Adapter数据集里的数据的位置。)
How many items are in the data set represented by this Adapter.
Returns:Count of items.
(这个Adapter所代表的数据集有多少项。返回值:项目的计数)
(2)public abstract Object getItem(int position)
Get the data item associated with the specified position in the data set.(得到数据集里指定位置的数据项。)
Parameters(参数)
Returns:
- The data at the specified position.(返回:在指定位置的数据。)
- (3)public abstract long getItemId(int position)
- Get the row id associated with the specified position in the list.
- (得到与列表指定位置相关的行的id)
Parameters
position The position of the item within the adapter's data set whose row id we want.Returns
- The id of the item at the specified position.
- Interface Adapter
- 使用Adapter和Interface提高方法的复用性
- Adapter
- adapter
- adapter
- adapter
- adapter
- Adapter
- Adapter
- adapter
- Adapter
- Adapter
- Adapter
- adapter
- adapter
- adapter
- Adapter
- Adapter
- JMS-任务管理系统 报表1
- 软件工程系暑假培训计划之二——iOS培训大纲
- GDB调试core文件
- 第10章PADS Layout的元器件的布局
- J2SE 必知必会(一)
- Interface Adapter
- sysbench压测directio+fsync时的问题
- 杭电1241-Oil Deposits
- wordpress二次开发教程手记:站外以HTML的形式调用wordpress文章
- 解决12306.cn网站验证码获取提示“基础连接已经关闭: 未能为 SSL/TLS 安全通道建立信任关系“的问题
- iOS之第三方FMDB框架操作数据库
- J2SE 必知必会(二)
- What is a DesignPattern? 什么是设计模式
- 场效应管导通条件