1.概述
在11.0的系统产品开发中,对于Launcher3中的功能定制也是有好多的,在实现对app拖拽的限制,app图标的高度,folder图标高度等等功能,在拖拽hotseat的时候也是
在某些产品中由于hotseat的图标已经固定了,不能往外拖拽hotseat图标,也不能把hotseat外的图标拖拽到hotseat中,这在项目中也是需要实现的功能,
所以这就需要从Launcher3中的图标拖拽中来了解拖拽流程,然后实现拖拽功能的限制
2.禁止拖拽hotseat和禁止拖拽图标到hotseat的功能实现的核心类
packages\apps\Launcher3\src\com\android\launcher3\Workspace.java
packages\apps\Launcher3\src\com\android\launcher3\DropTarget.java
3.禁止拖拽hotseat和禁止拖拽图标到hotseat的功能实现的核心功能分析和实现
3.1 DropTarget.java中关于拖拽的相关方法分析
/** X offset from the upper-left corner of the cell to where we touched. */
public int xOffset = -1;
/** Y offset from the upper-left corner of the