前言

  本章内容是 android.widget.ListAdapter,版本为Android 2.2 r1,翻译来自"德罗德",欢迎大家访问他的博客:http://sparkrico.javaeye.com,再次感谢"德罗德" !期待你一起参与Android中文API的翻译,联系我over140@gmail.com。

声明

  欢迎转载,但请保留文章原始出处:)

   农民伯伯:http://over140.blog.51cto.com/

    Android中文翻译组:http://code.taobao.org/project/view/404/

正文

  一、结构

public interface ListAdapter extends Adapter

android.widget.ListAdapter

直接子类

ArrayAdapter<T>, BaseAdapter, CursorAdapter, HeaderViewListAdapter, ResourceCursorAdapter, SimpleAdapter, SimpleCursorAdapter, WrapperListAdapter

  二、概述

    扩展Adapter 是在ListView与数据之间的一座桥梁。通常数据来自于游标,但不是必须的。ListView可以显示包含在ListAdapter里的所有数据。

三、公共方法

public abstract boolean areAllItemsEnabled ()

ListAdapter中所有的项目都是可用的?如果是,则代表所有的项目都是可选择,可用鼠标点击的。

返回值

如果所有项目是可用的返回真

public abstract boolean isEnabled (int position)

如果指定的位置不是一个隔离(separator)项目(隔离项目是一个不可选择,不可用鼠标点击的项目)则返回真。如果位置是无效的,其结果将是不确定的。在这种情况下一个ArrayIndexOutOfBoundsException(越界)异常将抛出。

参数

position 项目的索引

返回值

如果这个项目不是一个隔离(separator)项目则返回真。

  四、补充

  文章精选

   android adapter的体系

更多相关文章

  1. Android(安卓)Hello World
  2. Android(安卓): 网络版学生系统
  3. 修改eclipse中Android工程的sdk
  4. Android串口通信:串口读写实例
  5. Android高仿网易新闻客户端之首页
  6. Android(安卓)Studio编码问题
  7. AndroidStudio部署项目时出现错误:Instant Run requires 'Tools |
  8. Android中使用HTTP服务
  9. Android(安卓)Hawk数据库 github开源项目

随机推荐

  1. android 内存泄漏的分析
  2. Android软键盘弹出时把布局顶上去,控件乱
  3. Android:Property Animation
  4. ViewGroups
  5. Android(安卓)进程和线程(二)
  6. android 加载图片
  7. android之style样式-EditText样式
  8. 最全的android模拟器使用--ADB命令的介绍和
  9. Android官方命令深入分析之Device Monito
  10. android 加载大图长图失真或者不显示。