在launcher的hotSeat上滑手指,达到和在桌面上滑一样的手势效果

//让HotSeat拦截touch,传递给workspace


+    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,这是为了让即使上滑 没有图标的HotSeat区域,也能处理上滑

+    protected void onUnhandledTap(MotionEvent ev) {
+        //for show firstAddMenu when touch from empty dock
+        Launcher.mLauncher.getWorkspace().onInterceptTouchEvent(ev);
+    }

猜你喜欢

转载自ccsosnfs.iteye.com/blog/2136275
今日推荐