您现在的位置:主页 > 技术中心 > 编程开发 > 移动开发 > Android

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; 
        } 
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 验证码:点击我更换图片

推荐热点

  • Android 完全退出程序
  • 原创:Android应用开发-Andorid歌词秀,含源码
  • android 屏幕保护
  • Android手机软件汉化教程---第四课 dex文件汉化
  • 众多Android 开源项目推荐,给力工作给力学习
  • Android Audio代码分析4
  • Android得到已安装的应用程序信息!
  • MIUI:10个亮点及5处不足
  • Android成长的幕后推手:工程师鲁宾
?? - ?? - ÝřŝžľŘÝź - TAGąęÇŠ - RSSśŠÔÄ - ??
Copyright © 2004-2024 上海卓卓网络科技有限公司