|
结构 继承关系 public static interface SimpleCusrorAdapter.ViewBinder
java.lang.Object android.widget.SimpleCursorAdapter.ViewBinder
类概述 这个内部接口可以在外部通过SimpleCursorAdapter.ViewBinder的方式进行Cursor 与View的绑定。Android推荐我们采用这种方式进行绑定操作,而不是沿用SimpleCursorAdapter内部的方式。 参见 bindView(android.view.View, android.content.Context, android.database.Cursor) setViewImage(ImageView, String) setViewText(TextView, String) 公共方法 public abstract boolean setViewValue (View view, Cursor cursor, int columnIndex) 将指定的列数据绑定到指定的视图上。当ViewBinder处理时,这个方法必须返回true。如果这个方法返回false, SimpleCursorAdapter将用自己的方式进行绑定操作。 参数 view 被绑定的视图。 cursor 数据库游标,绑定数据从它这里获取 columnIndex 列位置,能够在数据库游标中寻找到。 返回值 返回true意味着数据与视图已经绑定上,否则为未绑定上。
|