Android添加书签(二)(24)
来源:未知 责任编辑:责任编辑 发表时间:2013-11-26 22:12 点击:次
updateRow(rowToMove, true);
mCurrentSelection = 0;
return mCurrentSelection;
} else
return position;
}
// returns new post
public int moveToBottom(int position) {
if (position < mCount - 1) {
// get the time the last row in the list was created
Bundle lastRow = getRow(mCount - 1, true);
Long createTime = lastRow.getLong(Browser.BookmarkColumns.CREATED);
long newCreateTime = (createTime == null || createTime == 0) ? 0
: createTime - 1;
// set the create time of our row to older than the last on the list
Bundle rowToMove = getRow(position, false);
rowToMove.putLong(Browser.BookmarkColumns.CREATED, newCreateTime);
updateRow(rowToMove, true);
mCurrentSelection = mCount - 1;
return mCurrentSelection;
} else
return position;
}
public String launchUrlOfItem(int position) {
try {
return getRow(position, false).getString(
Browser.BookmarkColumns.URL);
} catch (Exception e) {
return null;
}
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>