改动单屏幕后,在workspace里面拖动图标。到删除button上松开的时候,报错问题。

而且无法再次显示拖动的图标。

拖动松开手时候触发

public void onDropCompleted(final View target, final DragObject d,
            final boolean isFlingToDelete, final boolean success) {         if (mDeferDropAfterUninstall) {//假设要卸载软件又一次调用一次
            mDeferredAction = new Runnable() {
                    public void run() {
                        onDropCompleted(target, d, isFlingToDelete, success);
                        mDeferredAction = null;
                    }
                };
            return;
        }         boolean beingCalledAfterUninstall = mDeferredAction != null;         if (success && !(beingCalledAfterUninstall && !mUninstallSuccessful)) {
            if (target != this && mDragInfo != null) {
                CellLayout parentCell = getParentCellLayoutForView(mDragInfo.cell);
                if (parentCell != null) {
                    parentCell.removeView(mDragInfo.cell);
                }
                if (mDragInfo.cell instanceof DropTarget) {
                    mDragController.removeDropTarget((DropTarget) mDragInfo.cell);
                }
                // If we move the item to anything not on the Workspace, check if any empty
                // screens need to be removed. If we dropped back on the workspace, this will
                // be done post drop animation.
                stripEmptyScreens();
            }
        } else if (mDragInfo != null && target != null && (!(target instanceof InfoDropTarget))) {
            CellLayout cellLayout;
            if (mLauncher.isHotseatLayout(target)) {
                cellLayout = mLauncher.getHotseat().getLayout();
            } else {
                cellLayout = getScreenWithId(mDragInfo.screenId);
            }
            
//            if (cellLayout == null) {
//                throw new RuntimeException("Invalid state: cellLayout == null in "
//                        + "Workspace#onDropCompleted. Please file a bug. ");
//            }
            在此处增加这两句就可以修复此BUG
            if (cellLayout != null) {
                cellLayout.onDropChild(mDragInfo.cell);
            }
            
            if( mDragInfo.cell!=null){
            <span style="white-space:pre"> </span>  mDragInfo.cell.setVisibility(VISIBLE);
            }
        }
        if ((d.cancelled || target instanceof InfoDropTarget || (beingCalledAfterUninstall && !mUninstallSuccessful))
                && mDragInfo.cell != null) {
            mDragInfo.cell.setVisibility(VISIBLE);
        }
        
       
        mDragOutline = null;
        mDragInfo = null;
   
    }

(7)Launcher3客制化之,改动单屏幕后,Fix在Hotseat拖动应用删除报错的更多相关文章

  1. (8)Launcher3客制化之ContentProvider内容提供者,实现其它应用改动数据库更新等操作

    首先加入两个权限 <uses-permission android:name="com.android.launcher3.permission.READ_SETTINGS" ...

  2. Dynamics AX 2012 R2 客制化RDP报表参数对话框

    当我们在使用RDP报表时,AX会根据Data Contract,自动生成报表参数对话框上的字段控件.一般情况下,该对话框能够满足我们的需求,但是如果有较为复杂或特殊的需求,就要我们对该对话框进行客制化 ...

  3. BEvent_客制化BusinessEvent通过PLSQL Procedurer接受消息传递(案例)

    2014-06-27 Created By BaoXinjian

  4. Form_通过Zoom客制化跳转页面功能(案例)

    2012-09-08 Created By BaoXinjian

  5. 转:FORM:客制化Form的菜单栏和右鍵菜單

    Oracle EBS还允许客制化Form的菜单栏. 用户最多可以定义45个form-level的trigger,名称必须为SPECIALn, 其中SPECIAL1 to SPECIAL15属于Tool ...

  6. Android MTK6580 客制化关机充电动画

    1.客制化关机充电图片 vendor/mediatek/proprietary/bootable/bootloader/lk/dev/logo/xxx 找到对应分辨率替换 2.调整显示图片位置.大小 ...

  7. Report_客制化Excel报表中的XLS标记(案例)

    2014-06-06 Created By BaoXinjian

  8. (整理)FORM:Oracle EBS客制化Form的菜单栏用法说明

    用户最多可以定义45个form-level的trigger,名称必须为SPECIALn, 其中SPECIAL1 to SPECIAL15属于Tools菜单项,放在“工具”主菜单下. SPECIAL16 ...

  9. Android RRO机制的运用-----google开机向导客制化

    上周五的时候领导分了一个任务,客户让在google开机向导里面增加一页,首先就想到了android的Overlay,然后网上搜了下,发下有很多人写了这方面的技术.而且写的都还不错,所以本篇只当记录作用 ...

随机推荐

  1. HDU 4588 Count The Carries 数位DP || 打表找规律

    2013年南京邀请赛的铜牌题...做的非常是伤心.另外有两个不太好想到的地方.. ..a 能够等于零,另外a到b的累加和比較大.大约在2^70左右. 首先说一下解题思路. 首先统计出每一位的1的个数, ...

  2. Cocos2D实现RPG队伍菜单随意调整角色顺序的效果

    大熊猫猪·侯佩原创或翻译作品.欢迎转载,转载请注明出处. 假设认为写的不好请多提意见,假设认为不错请多多支持点赞.谢谢! hopy ;) 前一篇我们实现了队伍实现拖尾效果,可是在实际游戏中我们往往须要 ...

  3. List与array的相互转换

    1.List->Array 调用List的toArray方法 List<String> list = new ArrayList<String>(); list.add( ...

  4. C#最简单的登录Web服务

    因为演示程序,所以有下面问题: 1.password是明码传输. 本文在  C#建立最简单的web服务,无需IIS  的基础上完毕. 详细步骤: 一.RequestProcessor添加变量mLogi ...

  5. jQuery08源码 (5140 , 6057) DOM操作 : 添加 删除 获取 包装 DOM筛选

    jQuery.fn.extend({ //$('ul').find('li').css('background','red'); //$('ul').find( $('li') ).css('back ...

  6. java接口理解(转载)

    今天和同事好好的讨论了java接口的原理和作用,发现原来自己的对接口的理解仅仅是局限在概念的高度抽象上,觉得好像理解了但是不会变化应用其实和没有理解差不多.以前看一个帖子说学习一个东西不管什么时候都要 ...

  7. Node.js REPL(交互式解析器)

    Node.js REPL(交互式解释器) Node 自带了交互式解释器,可以执行以下任务: 读取 - 读取用户输入,解析输入了Javascript 数据结构并存储在内存中. 执行 - 执行输入的数据结 ...

  8. css--两行显示省略号兼容火狐浏览器

    css--两行显示省略号兼容火狐浏览器 正常写法: .ellipse1{overflow: hidden;white-space: nowrap;text-overflow: ellipsis;} . ...

  9. WinForm无边框窗体移动方法

    C#WinForm无边框窗体移动方法.模仿鼠标单击标题栏移动窗体位置 这里介绍俩种办法 方法一:直接通过修改窗体位置从而达到移动窗体的效果 方法二:直接伪装发送单击任务栏消息,让应用程序误以为单击任务 ...

  10. poj2796

    #include <cstdio> /* * source poj.2796 * 题目: * 给定一个非负数的数组 其中value[l,r] = sum(l,r) * min (l,r); ...