Android添加书签(二)(23)
来源:未知 责任编辑:责任编辑 发表时间:2013-11-26 22:12 点击:次
mCurrentSelection--;
updateRow(rowOnTop, false);
updateRow(rowUnder, false);
return mCurrentSelection;
} else
return position;
}
// returns new position
public int moveItemDown(int position) {
if (position < mCount - 1) {
Bundle rowOnTop = getRow(position, false);
Bundle rowUnder = getRow(position + 1, false);
int upId = rowOnTop.getInt("id");
rowOnTop.putInt("id", rowUnder.getInt("id"));
rowUnder.putInt("id", upId);
mCurrentSelection++;
updateRow(rowOnTop, false);
updateRow(rowUnder, false);
return mCurrentSelection;
} else
return position;
}
// returns new position
public int moveToTop(int position) {
if (position > 0) {
// get the row
Bundle rowToMove = getRow(position, false);
// set its created time to now
rowToMove.putLong(Browser.BookmarkColumns.CREATED,
new Date().getTime());
// update the row
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>