//让HotSeat拦截touch,传递给workspace
//在workspace的父类PagedView中,处理onUnhandledTap的touch,这是为了让即使上滑[b]没有图标[/b]的HotSeat区域,也能处理上滑
+ public boolean onInterceptTouchEvent(MotionEvent ev) {
+ boolean superB = super.onInterceptTouchEvent(ev);
+ boolean workspaceB = Launcher.mLauncher.getWorkspace().onInterceptTouchEvent(ev);
+ Log.d(TAG, "superB " + superB + " workspaceB " + workspaceB);
return false;
}
//在workspace的父类PagedView中,处理onUnhandledTap的touch,这是为了让即使上滑[b]没有图标[/b]的HotSeat区域,也能处理上滑
+ protected void onUnhandledTap(MotionEvent ev) {
+ //for show firstAddMenu when touch from empty dock
+ Launcher.mLauncher.getWorkspace().onInterceptTouchEvent(ev);
+ }
本文介绍了如何通过修改HotSeat组件的触摸事件处理逻辑,确保即使在没有图标的情况下也能正确响应上滑操作。通过拦截touch事件并传递给workspace进行处理,实现了更好的用户体验。
788

被折叠的 条评论
为什么被折叠?



