(7)Launcher3客制化之,修改单屏幕后,Fix在Hotseat拖动应用删除报错
来源:互联网 发布:淘宝极速退款条件 编辑:程序博客网 时间:2024/05/21 01:58
修改单屏幕后,在workspace里面拖动图标,到删除按钮上松开的时候,报错问题。
并且无法再次显示拖动的图标。
拖动松开手时候触发
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; }
1 0
- (7)Launcher3客制化之,修改单屏幕后,Fix在Hotseat拖动应用删除报错
- Android Launcher3 去掉应用列表后,在系统桌面拖动应用图标卸载应用
- Launcher3--launcher3 icon以及hotseat size大小修改
- Launcher3将hotseat栏固定,禁止拖动,禁止形成文件夹
- Launcher3源码浅析(5.1)--Hotseat
- Android Launcher3修改行数,列数,布局等;隐藏HostSeat,使用户无法拖拽应用图标到Hotseat
- 修改Launcher3的Hotseat的位置到右侧的方法
- (8)Launcher3客制化之ContentProvider内容提供者,实现其他应用修改数据库更新等操作
- Android Launcher3在Hotseat中将AllappsButton 替换成普通shortcut
- Launcher3 HotSeat显示名称
- Launcher3 Hotseat布局
- android去掉Launcher3中的hotseat
- Android4.4 应用分析——修改Launcher3应用以适应单屏壁纸
- (1)桌面客制化之单屏幕修改以及wight修改
- Launcher3分析之拖动图标的流程
- AndroidL中修改launcher3主菜单布局
- (3)Launcher3客制化之删除主页的固定ic_allapp图标
- Android Launcher3(二) -- Drag拖动实现
- css+div学习笔记
- Tight words (dp)
- 线程并发工具--Exchanger
- 抉择
- hdoj.1678 Shopaholic 20141018
- (7)Launcher3客制化之,修改单屏幕后,Fix在Hotseat拖动应用删除报错
- 收藏的android大神的博客地址
- NYIST 542 - 试制品 (STL + 小暴力)
- 加油加油
- [数据结构] 二叉树的操作实现
- 使scp不用输入密码
- Ubuntu14.04 下使用tasksel架建LAMP
- Storm的tuple介绍
- POJ1087 A Plug for UNIX 【最大流】