public interface ListAdapter
implements Adapter
android.widget.ListAdapter |
![]() |
扩展Adapter
,这是ListView
与支持列表的数据之间的桥梁。 数据常常来自Cursor,但这不是必需的。 ListView可以显示任何包含在ListAdapter中的数据。
Inherited constants |
---|
![]() android.widget.Adapter
|
公共方法(Public methods) |
|
---|---|
abstract boolean |
areAllItemsEnabled() 指示是否启用此适配器中的所有项目。 |
abstract boolean |
isEnabled(int position) 如果指定位置上的项目不是分隔符,则返回true。 |
继承方法(Inherited methods) |
|
---|---|
![]() android.widget.Adapter
|
boolean areAllItemsEnabled ()
指示是否启用此适配器中的所有项目。 如果此方法返回的值随时间而改变,则不能保证其生效。 如果为true,则表示所有项目都是可选择的并且可点击(没有分隔符)。
返回(Returns) | |
---|---|
boolean |
True if all items are enabled, false otherwise. |
也可以看看:
boolean isEnabled (int position)
如果指定位置上的项目不是分隔符,则返回true。 (分隔符是不可选择的,不可点击的项目)。 如果位置无效,则结果未指定。 在这种情况下应该抛出ArrayIndexOutOfBoundsException
以快速失败。
参数(Parameters) | |
---|---|
position |
int : Index of the item |
返回(Returns) | |
---|---|
boolean |
True if the item is not a separator |
也可以看看: