Android添加书签(二)(14)
来源:未知 责任编辑:责任编辑 发表时间:2013-11-26 22:12 点击:次
Long createTime = mCursor.getLong(createdColumnIndex);
if (createTime != null && createTime != 0) {
map.putLong(Browser.BookmarkColumns.CREATED, createTime);
}
}
map.putInt("id", mCursor.getInt(Browser.HISTORY_PROJECTION_ID_INDEX));
return map;
}
/**
* Update a row in the database with new information. Requeries the database
* if the information has changed.
*
* @param map
* Bundle storing id, title and url of new information
*/
public void updateRow(Bundle map, boolean includeCreateTime) {
// Find the record
int id = map.getInt("id");
int position = -1;
for (mCursor.moveToFirst(); !mCursor.isAfterLast(); mCursor
.moveToNext()) {
if (mCursor.getInt(Browser.HISTORY_PROJECTION_ID_INDEX) == id) {
position = mCursor.getPosition();
break;
}
}
if (position < 0) {
return;
}
mCursor.moveToPosition(position);
ContentValues values = new ContentValues();
String title = map.getString(Browser.BookmarkColumns.TITLE);
if (!title.equals(mCursor
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>