Android添加书签(二)(19)
来源:未知 责任编辑:责任编辑 发表时间:2013-11-26 22:12 点击:次
createdColumnIndex = columns.length - 1;
columns[createdColumnIndex] = Browser.BookmarkColumns.CREATED;
String whereClause = Browser.BookmarkColumns.BOOKMARK + " == 1";
String orderBy = Browser.BookmarkColumns.CREATED + " DESC";
String[] selectionArgs = null;
mCursor = mContentResolver.query(Browser.BOOKMARKS_URI, columns,
whereClause, selectionArgs, orderBy);
mCursor.registerContentObserver(mChangeObserver);
mCursor.registerDataSetObserver(mDataSetObserver);
mDataValid = true;
notifyDataSetChanged();
mCount = mCursor.getCount();
}
/**
* How many items should be displayed in the list.
*
* @return Count of items.
*/
public int getCount() {
if (mDataValid) {
return mCount;
} else {
return 0;
}
}
public boolean areAllItemsEnabled() {
return true;
}
public boolean isEnabled(int position) {
return true;
}
/**
* Get the data associated with the specified position in the list.
*
* @param position
* Index of the item whose data we want.
* @return The data at the specified position.
*/
public Object getItem(int position) {
return null;
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>