示例#1
0
 // Passes the touch event to ScaleGestureDetector so that its internal
 // state won't go wrong, but instructs the listener to ignore the result
 // of processing, if any.
 void passTouchEventThrough(MotionEvent event) {
   mMultiTouchListener.setTemporarilyIgnoreDetectorEvents(true);
   try {
     mMultiTouchDetector.onTouchEvent(event);
   } catch (Exception e) {
     Log.e(TAG, "ScaleGestureDetector got into a bad state!", e);
     assert (false);
   }
 }
示例#2
0
 // Passes the touch event to ScaleGestureDetector so that its internal state
 // won't go wrong. ScaleGestureDetector needs two pointers in a MotionEvent
 // to recognize a zoom gesture.
 boolean processTouchEvent(MotionEvent event) {
   // TODO: Need to deal with multi-touch transition
   mMultiTouchListener.setTemporarilyIgnoreDetectorEvents(false);
   try {
     return mMultiTouchDetector.onTouchEvent(event);
   } catch (Exception e) {
     Log.e(TAG, "ScaleGestureDetector got into a bad state!", e);
     assert (false);
   }
   return false;
 }
示例#3
0
 void updateMultiTouchSupport() {
   mMultiTouchListener.setPermanentlyIgnoreDetectorEvents(
       !mContentViewCore.getContentSettings().supportsMultiTouchZoom());
 }
示例#4
0
 boolean isMultiTouchZoomSupported() {
   return !mMultiTouchListener.getPermanentlyIgnoreDetectorEvents();
 }