Android添加书签(二)(18)
来源:未知 责任编辑:责任编辑 发表时间:2013-11-26 22:12 点击:次
boolean succeed = c.moveToFirst();
ContentValues values = null;
while (succeed) {
if (values == null) {
final ByteArrayOutputStream os = new ByteArrayOutputStream();
favicon.compress(Bitmap.CompressFormat.PNG, 100, os);
values = new ContentValues();
values.put(Browser.BookmarkColumns.FAVICON, os.toByteArray());
}
cr.update(
ContentUris.withAppendedId(Browser.BOOKMARKS_URI,
c.getInt(0)), values, null, null);
succeed = c.moveToNext();
}
c.close();
}
/**
* Internal function used in search, sort, and refreshList.
*/
private int createdColumnIndex = -1;
private void searchInternal() {
if (mCursor != null) {
mCursor.unregisterContentObserver(mChangeObserver);
mCursor.unregisterDataSetObserver(mDataSetObserver);
mCursor.deactivate();
}
// need to add the created date column to the query
String[] columns = new String[Browser.HISTORY_PROJECTION.length + 1];
System.arraycopy(Browser.HISTORY_PROJECTION, 0, columns, 0,
Browser.HISTORY_PROJECTION.length);
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>