现在的位置: 首页 > 综合 > 正文

杂记2

2013年03月24日 ⁄ 综合 ⁄ 共 1144字 ⁄ 字号 评论关闭

 

修改页面Tag的东西。在Launcher.xml内添加LinearLayout.第一次Launcher内setupViews的时候用AddView将给定的资源添加进去。以后在workspace内在切屏函数computeScroll内调用Launcher内的替换函数    public void refreshTopTag(int currentScreen,int screenCount){
        for(int i = 0; i<screenCount; i++){
            resetTopTagLayout(i,currentScreen,screenCount);
        }
    }
    public void resetTopTagLayout(int pageindex,int currentScreen,int screenCount){
        
        if(pageindex != currentScreen){
            Drawable dotCurrentScreen =  getResources().getDrawable(dotId);
            ImageView mTemp = (ImageView) mTopTagLayout.getChildAt(pageindex);
            mTemp.setImageDrawable(dotCurrentScreen);
        }
        else{
            
            Drawable dotCurrentScreen =  getResources().getDrawable(screenDots[currentScreen]);
            ImageView mTemp = (ImageView) mTopTagLayout.getChildAt(currentScreen);
            mTemp.setImageDrawable(dotCurrentScreen);
        }
        mTopTagLayout.invalidate();

Android 总结 2: 动态添加screen底端菜单内快捷键,要求与screen内的applications 不冲突,也就是说,桌面上有的底端菜单内不能有,反之亦然。 做法,更改loadFavorites,解析default_workspace.xml,获取标签为container的内容,也就是包名,与显示位置(负数)。使用Java.util.map的HashMap保存结果,每个包名对应一个坐标位置,更改loadFavorites的返回值类型HashMap,使用load调用,并与screen内的application比较。分开显示

 

 

 

抱歉!评论已关闭.