(7)Launcher3客制化之,改动单屏幕后,Fix在Hotseat拖动应用删除报错
改动单屏幕后,在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拖动应用删除报错的更多相关文章
- (8)Launcher3客制化之ContentProvider内容提供者,实现其它应用改动数据库更新等操作
首先加入两个权限 <uses-permission android:name="com.android.launcher3.permission.READ_SETTINGS" ...
- Dynamics AX 2012 R2 客制化RDP报表参数对话框
当我们在使用RDP报表时,AX会根据Data Contract,自动生成报表参数对话框上的字段控件.一般情况下,该对话框能够满足我们的需求,但是如果有较为复杂或特殊的需求,就要我们对该对话框进行客制化 ...
- BEvent_客制化BusinessEvent通过PLSQL Procedurer接受消息传递(案例)
2014-06-27 Created By BaoXinjian
- Form_通过Zoom客制化跳转页面功能(案例)
2012-09-08 Created By BaoXinjian
- 转:FORM:客制化Form的菜单栏和右鍵菜單
Oracle EBS还允许客制化Form的菜单栏. 用户最多可以定义45个form-level的trigger,名称必须为SPECIALn, 其中SPECIAL1 to SPECIAL15属于Tool ...
- Android MTK6580 客制化关机充电动画
1.客制化关机充电图片 vendor/mediatek/proprietary/bootable/bootloader/lk/dev/logo/xxx 找到对应分辨率替换 2.调整显示图片位置.大小 ...
- Report_客制化Excel报表中的XLS标记(案例)
2014-06-06 Created By BaoXinjian
- (整理)FORM:Oracle EBS客制化Form的菜单栏用法说明
用户最多可以定义45个form-level的trigger,名称必须为SPECIALn, 其中SPECIAL1 to SPECIAL15属于Tools菜单项,放在“工具”主菜单下. SPECIAL16 ...
- Android RRO机制的运用-----google开机向导客制化
上周五的时候领导分了一个任务,客户让在google开机向导里面增加一页,首先就想到了android的Overlay,然后网上搜了下,发下有很多人写了这方面的技术.而且写的都还不错,所以本篇只当记录作用 ...
随机推荐
- [Javascript] this in Function Calls
In most cases, the value of a function's this argument is determined by how the function is called. ...
- 深度学习2015年文章整理(CVPR2015)
国内外从事计算机视觉和图像处理相关领域的著名学者都以在三大顶级会议(ICCV.CVPR和ECCV)上发表论文为荣,其影响力远胜于一般SCI期刊论文.这三大顶级学术会议论文也引领着未来的研究趋势.CVP ...
- mongo数据库--非关系型数据库
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvdGFuZ2xpdXFpbmc=/font/5a6L5L2T/fontsize/400/fill/I0JBQk ...
- ip6tables: ipv6-icmp vs icmp
ip6tables: ipv6-icmp vs icmp资料来源 https://www.jethrocarr.com/2013/02/09/ip6tables-ipv6-icmp-vs-icmp/I ...
- recyclerview23+出现多个item只显示第一个item的问题
1.改成21+可以,如果不行,就使用第2或第3个解决方案 2.对每个item的inflate,传入两个参数,第二个参数设置为null,而不是使用3个参数(第二个parent,第三个false) 3.i ...
- 玩转redux--从会用到庖丁解牛
目录 为何而写 redux是什么 redux的设计哲学 redux的工作流 redux的几个核心要素 store action reducer actionCreator combineReducer ...
- IOS越狱开发错误解决
Questions: haseScriptExecution Run\ Script /Users/jun/Library/Developer/Xcode/DerivedData/ButtonMa ...
- 重构insert update 比较两个datatbale
#region 下载时重构insert(数据带null处理) public void DownDataInsert(DataTable _dt, string TableName,DBHelper d ...
- POJ--2516--Minimum Cost【最小费用最大流】
链接:http://poj.org/problem?id=2516 题意:有k种货物,n个客户对每种货物有一定需求量,有m个仓库.每一个仓库里有一定数量的k种货物.然后k个n*m的矩阵,告诉从各个仓库 ...
- Python和C|C++的混编(二):利用Cython进行混编
还能够使用Cython来实现混编 1 下载Cython.用python setup.py install进行安装 2 一个实例 ① 创建helloworld文件夹 创建helloworld.pyx,内 ...