(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,然后网上搜了下,发下有很多人写了这方面的技术.而且写的都还不错,所以本篇只当记录作用 ...
随机推荐
- 怎么成为合格的WEB前端开发工程师
web前端开发工程师目前来讲是一个热门职位,但是要成为一个合格的web前端开发工程师,需要掌握的知识可不少,零度就简单的为大家讲讲. 大致的来讲,web前端开发工程师需要掌握的知识有:HTML.CSS ...
- 博弈论 SG函数(模板) HDU 1848 Fibonacci again and again
Fibonacci again and again Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Jav ...
- spark ml阅读笔记
参考文档:http://www.cnblogs.com/huliangwen/p/7491797.html
- DG应用日志相关操作
应用archive log: recover managed standby database disconnect; 应用redo logfile: recover managed stan ...
- C/C++(文件操作二)
二进制读写才是本质 二进制的读写对文件标记不敏感. eg: 对图片进行加密与解密: 用命令的形式去执行: //xx.exe -c src dest 加密 //xx.exe -d src dest 解密 ...
- LAMP环境搭建成功后的部分相关配置
LAMP环境搭建成功后,通常还需要做一些其他配置来完善,本文主要记录常用到的一些设置. 所有的配置是基于Ubuntu 16.04 + Apache2.4 + Mysql5.7 + Php7.0,对于其 ...
- netstat---显示Linux中网络系统的状态信息
netstat命令用来打印Linux中网络系统的状态信息,可让你得知整个Linux系统的网络情况. 语法 netstat(选项) 选项 -a或--all:显示所有连线中的Socket: -A<网 ...
- iframe自适应高度解决方法 .
<div id="leftBar"> <iframe name="tag" src="_iframe.html" styl ...
- Java反射之getInterfaces()方法
今天学习Spring3框架,在理解模拟实现Spring Ioc容器的时候遇到了getInterfaces()方法.getInterfaces()方法和Java的反射机制有关.它能够获得这个对象所实现的 ...
- 前6名免费DNS服务 - 公共DNS服务
前6名免费DNS服务 - 公共DNS服务 谷歌 8.8.8.8,8.8.4.4备份,用户将期望并获得高可用性,如DNSSEC等过滤和安全保护. OpenDNS 现在是Cisco帝国的一部分,主要是20 ...