改动单屏幕后,在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. hdu5305 Friends(dfs+map/hash)

    题目:pid=5305">http://acm.hdu.edu.cn/showproblem.php?pid=5305 题意:给定N个人和M条朋友关系,是朋友关系的两个人之间有两种联系 ...

  2. ZOJ 3524 Crazy Shopping

    Crazy Shopping Time Limit: 3000ms Memory Limit: 65536KB This problem will be judged on ZJU. Original ...

  3. 【吴节操点评】中国企业SaaS应用深谙未来者寥寥数几 两极分化将加剧

    数年前,在国外企业级应用如火如荼的时候.国内却是一片空白.而现在企业SaaS应用市场,包含用友.金蝶.东软在内的三巨头.已经有数十家之多.相比美国3000亿美元的企业应用三巨头来说,中国企业应用前三甲 ...

  4. JavaScript全讲-架构原则解析

    因为近期一直在忙,非常久没有更新,见谅. 上篇我们讲完JavaScript函数式编程的特性,今天我们就来聊聊JavaScript中的架构. 提到JavaScript架构.非常多人会认为不可思议,由于架 ...

  5. ZOJ Problem Set - 3819Average Score

    ZOJ Problem Set - 3819Average Score 题目链接 题目大意:给你两个班的的学生的分数(A,B班).A班有一个学生的分数没有给出. 如今要求你给出这个学生分数的上下限.使 ...

  6. postgresql 查看单个表大小

    3中方法,不论什么一个都行 方法一 ,查一个表 select pg_size_pretty(pg_relation_size('table_name')); 方法二 ,查出全部表并按大小排序 SELE ...

  7. POJ3622 Gourmet Grazers(FHQ Treap)

    Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 2363   Accepted: 881 Description Like s ...

  8. Java学习笔记三.3

    9.异常处理:Java中的异常处理对象就是将以前的if语句进行的判断进行抽象化,并形成的一套错误处理体系.最顶端是Throwable,接着是Error,Exception,其中Exception又明显 ...

  9. 原生JavaScript 封装ajax

    原生JavaScript 封装ajax   function myajax(options){ //新建一个局部对象 用来存放用户输入的各种参数 var opt={ type:options.type ...

  10. Python 极简教程(一)前言

    现在 Python 用处很多,学的人也很多,其流行程度自不必说.但是很多人学 Python 的时候都遇到过问题,特别对于非计算机专业毕业的人来说. 现在的教程非常多,但是绝大部分对于初学者都不够友好. ...