Android 13 Hotseat定制化修改——006 hotseat图标禁止移动到Launcher中

目录

一.背景

二.方案

三.具体实践


一.背景

客户定制需要修改让hotseat中的icon不要移动到Launcher中,所以需要进行定制

二.方案

原生的Hotseat与Launcher是可以相互移动的,然后现在的需求是Hotseat中的图标只能在Hotseat中移动,所以需要做下限制

思路:在事件拦截的地方判断是否触摸的开始位置在Hotseat区域,如果是在Hotseat区域然后在事件监听的地方进行特殊处理,让其不能移动到Hotseat区域外

三.具体实践

代码是修改BaseDragLayer类中的onInte

你可能感兴趣的:(Android,13,Framework,Android,Framework,Launcher,Hotseat,禁止拖动,Hotseat图标,Launcher图标)