Android添加书签(二)(13)
来源:未知 责任编辑:责任编辑 发表时间:2013-11-26 22:12 点击:次
// start again
}
processed = i + 1;
}
}
}
/**
* Return a hashmap with one row's Title, Url, and favicon.
*
* @param position
* Position in the list.
* @return Bundle Stores title, url of row position, favicon, and id for the
* url. Return a blank map if position is out of range.
*/
public Bundle getRow(int position, boolean includeCreateTime) {
Bundle map = new Bundle();
if (position < 0 || position >= mCount) {
return map;
}
mCursor.moveToPosition(position);
String url = mCursor.getString(Browser.HISTORY_PROJECTION_URL_INDEX);
map.putString(Browser.BookmarkColumns.TITLE,
mCursor.getString(Browser.HISTORY_PROJECTION_TITLE_INDEX));
map.putString(Browser.BookmarkColumns.URL, url);
byte[] data = mCursor.getBlob(Browser.HISTORY_PROJECTION_FAVICON_INDEX);
if (data != null) {
map.putByteArray("FAV_BYTES", data);
map.putParcelable(Browser.BookmarkColumns.FAVICON,
BitmapFactory.decodeByteArray(data, 0, data.length));
}
if (includeCreateTime && createdColumnIndex != -1) {
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>