Android添加书签(二)(15)
来源:未知 责任编辑:责任编辑 发表时间:2013-11-26 22:12 点击:次
.getString(Browser.HISTORY_PROJECTION_TITLE_INDEX))) {
values.put(Browser.BookmarkColumns.TITLE, title);
}
String url = map.getString(Browser.BookmarkColumns.URL);
if (!url.equals(mCursor.getString(Browser.HISTORY_PROJECTION_URL_INDEX))) {
values.put(Browser.BookmarkColumns.URL, url);
}
byte[] favicon = map.getByteArray("FAV_BYTES");
if (favicon != null) {
values.put(Browser.BookmarkColumns.FAVICON, favicon);
}
if (includeCreateTime) {
Long createTime = map.getLong(Browser.BookmarkColumns.CREATED);
if (createTime != null)
values.put(Browser.BookmarkColumns.CREATED, createTime);
}
if (values.size() > 0
&& mContentResolver.update(Browser.BOOKMARKS_URI, values,
"_id = " + id, null) != -1) {
refreshList();
}
}
/**
* Delete a row from the database. Requeries the database. Does nothing if
* the provided position is out of range.
*
* @param position
* Position in the list.
*/
public void deleteRow(int position) {
if (position < 0 || position >= getCount()) {
return;
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>