1.1概述
在10.0的rom定制化开发中,由于Launcher3有一些功能需要定制,这样的需求也好多的,现在功能需求要求桌面固定在Launcher3的app列表页,不让左右移动,就是禁止左右移动的功能实现,所以需要禁止滑动分析页面滑动部分的功能,然后禁用
2.1Launcher3桌面禁止左右滑动的核心代码
packages\apps\Launcher3\src\com\android\launcher3\PagedView.java
packages\apps\Launcher3\src\com\android\launcher3\allapps\AllAppsPagedView.java
packages/apps/Launcher3/src/com/android/launcher3/allapps/AllAppsContainerView.java
3.Launcher3桌面禁止左右滑动的功能分析以及功能实现
3.1 AllAppsPagedView.java关于app列表页app绑定功能分析
public class AllAppsPagedView extends PagedView<PersonalWorkSlidingTabStrip> {
final static float START_DAMPING_TOUCH_SLOP_ANGLE = (float) Math.PI / 6;
final static float MAX_SWIPE_ANGLE = (float) Math.PI / 3;
fi