Example #1
0
 /// <summary>Creates a GestureDetector with the supplied listener.</summary>
 /// <remarks>
 /// Creates a GestureDetector with the supplied listener.
 /// You may only use this constructor from a UI thread (this is the usual situation).
 /// </remarks>
 /// <seealso cref="android.os.Handler.Handler()">android.os.Handler.Handler()</seealso>
 /// <param name="context">the application's context</param>
 /// <param name="listener">
 /// the listener invoked for all the callbacks, this must
 /// not be null.
 /// </param>
 /// <param name="handler">the handler to use</param>
 /// <exception cref="System.ArgumentNullException">
 /// if
 /// <code>listener</code>
 /// is null.
 /// </exception>
 public GestureDetector(android.content.Context context, android.view.GestureDetector
                        .OnGestureListener listener, android.os.Handler handler) : this(context, listener
                                                                                        , handler, context != null && context.getApplicationInfo().targetSdkVersion >= android.os.Build
                                                                                        .VERSION_CODES.FROYO)
 {
     mInputEventConsistencyVerifier = android.view.InputEventConsistencyVerifier.isInstrumentationEnabled
                                          () ? new android.view.InputEventConsistencyVerifier(this, 0) : null;
 }
 public ScaleGestureDetector(android.content.Context context, android.view.ScaleGestureDetector
                             .OnScaleGestureListener listener)
 {
     mInputEventConsistencyVerifier = android.view.InputEventConsistencyVerifier.isInstrumentationEnabled
                                          () ? new android.view.InputEventConsistencyVerifier(this, 0) : null;
     // Pointer IDs currently responsible for the two fingers controlling the gesture
     android.view.ViewConfiguration config = android.view.ViewConfiguration.get(context
                                                                                );
     mContext  = context;
     mListener = listener;
     mEdgeSlop = config.getScaledEdgeSlop();
 }
Example #3
0
 /// <summary>Creates a GestureDetector with the supplied listener.</summary>
 /// <remarks>
 /// Creates a GestureDetector with the supplied listener.
 /// You may only use this constructor from a UI thread (this is the usual situation).
 /// </remarks>
 /// <seealso cref="android.os.Handler.Handler()">android.os.Handler.Handler()</seealso>
 /// <param name="context">the application's context</param>
 /// <param name="listener">
 /// the listener invoked for all the callbacks, this must
 /// not be null.
 /// </param>
 /// <param name="handler">the handler to use</param>
 /// <param name="ignoreMultitouch">
 /// whether events involving more than one pointer should
 /// be ignored.
 /// </param>
 /// <exception cref="System.ArgumentNullException">
 /// if
 /// <code>listener</code>
 /// is null.
 /// </exception>
 public GestureDetector(android.content.Context context, android.view.GestureDetector
                        .OnGestureListener listener, android.os.Handler handler, bool ignoreMultitouch)
 {
     mInputEventConsistencyVerifier = android.view.InputEventConsistencyVerifier.isInstrumentationEnabled
                                          () ? new android.view.InputEventConsistencyVerifier(this, 0) : null;
     if (handler != null)
     {
         mHandler = new android.view.GestureDetector.GestureHandler(this, handler);
     }
     else
     {
         mHandler = new android.view.GestureDetector.GestureHandler(this);
     }
     mListener = listener;
     if (listener is android.view.GestureDetector.OnDoubleTapListener)
     {
         setOnDoubleTapListener((android.view.GestureDetector.OnDoubleTapListener)listener
                                );
     }
     init(context, ignoreMultitouch);
 }
Example #4
0
 /// <summary>Creates a GestureDetector with the supplied listener.</summary>
 /// <remarks>
 /// Creates a GestureDetector with the supplied listener.
 /// You may only use this constructor from a UI thread (this is the usual situation).
 /// </remarks>
 /// <seealso cref="android.os.Handler.Handler()">android.os.Handler.Handler()</seealso>
 /// <param name="context">the application's context</param>
 /// <param name="listener">
 /// the listener invoked for all the callbacks, this must
 /// not be null.
 /// </param>
 /// <exception cref="System.ArgumentNullException">
 /// if
 /// <code>listener</code>
 /// is null.
 /// </exception>
 public GestureDetector(android.content.Context context, android.view.GestureDetector
                        .OnGestureListener listener) : this(context, listener, null)
 {
     mInputEventConsistencyVerifier = android.view.InputEventConsistencyVerifier.isInstrumentationEnabled
                                          () ? new android.view.InputEventConsistencyVerifier(this, 0) : null;
 }
Example #5
0
 public GestureDetector(android.view.GestureDetector.OnGestureListener listener, android.os.Handler
                        handler) : this(null, listener, handler)
 {
     mInputEventConsistencyVerifier = android.view.InputEventConsistencyVerifier.isInstrumentationEnabled
                                          () ? new android.view.InputEventConsistencyVerifier(this, 0) : null;
 }
Example #6
0
		public ScaleGestureDetector(android.content.Context context, android.view.ScaleGestureDetector
			.OnScaleGestureListener listener)
		{
			mInputEventConsistencyVerifier = android.view.InputEventConsistencyVerifier.isInstrumentationEnabled
				() ? new android.view.InputEventConsistencyVerifier(this, 0) : null;
			// Pointer IDs currently responsible for the two fingers controlling the gesture
			android.view.ViewConfiguration config = android.view.ViewConfiguration.get(context
				);
			mContext = context;
			mListener = listener;
			mEdgeSlop = config.getScaledEdgeSlop();
		}
Example #7
0
		/// <summary>Creates a GestureDetector with the supplied listener.</summary>
		/// <remarks>
		/// Creates a GestureDetector with the supplied listener.
		/// You may only use this constructor from a UI thread (this is the usual situation).
		/// </remarks>
		/// <seealso cref="android.os.Handler.Handler()">android.os.Handler.Handler()</seealso>
		/// <param name="context">the application's context</param>
		/// <param name="listener">
		/// the listener invoked for all the callbacks, this must
		/// not be null.
		/// </param>
		/// <param name="handler">the handler to use</param>
		/// <param name="ignoreMultitouch">
		/// whether events involving more than one pointer should
		/// be ignored.
		/// </param>
		/// <exception cref="System.ArgumentNullException">
		/// if
		/// <code>listener</code>
		/// is null.
		/// </exception>
		public GestureDetector(android.content.Context context, android.view.GestureDetector
			.OnGestureListener listener, android.os.Handler handler, bool ignoreMultitouch)
		{
			mInputEventConsistencyVerifier = android.view.InputEventConsistencyVerifier.isInstrumentationEnabled
				() ? new android.view.InputEventConsistencyVerifier(this, 0) : null;
			if (handler != null)
			{
				mHandler = new android.view.GestureDetector.GestureHandler(this, handler);
			}
			else
			{
				mHandler = new android.view.GestureDetector.GestureHandler(this);
			}
			mListener = listener;
			if (listener is android.view.GestureDetector.OnDoubleTapListener)
			{
				setOnDoubleTapListener((android.view.GestureDetector.OnDoubleTapListener)listener
					);
			}
			init(context, ignoreMultitouch);
		}
Example #8
0
		/// <summary>Creates a GestureDetector with the supplied listener.</summary>
		/// <remarks>
		/// Creates a GestureDetector with the supplied listener.
		/// You may only use this constructor from a UI thread (this is the usual situation).
		/// </remarks>
		/// <seealso cref="android.os.Handler.Handler()">android.os.Handler.Handler()</seealso>
		/// <param name="context">the application's context</param>
		/// <param name="listener">
		/// the listener invoked for all the callbacks, this must
		/// not be null.
		/// </param>
		/// <param name="handler">the handler to use</param>
		/// <exception cref="System.ArgumentNullException">
		/// if
		/// <code>listener</code>
		/// is null.
		/// </exception>
		public GestureDetector(android.content.Context context, android.view.GestureDetector
			.OnGestureListener listener, android.os.Handler handler) : this(context, listener
			, handler, context != null && context.getApplicationInfo().targetSdkVersion >= android.os.Build
			.VERSION_CODES.FROYO)
		{
			mInputEventConsistencyVerifier = android.view.InputEventConsistencyVerifier.isInstrumentationEnabled
				() ? new android.view.InputEventConsistencyVerifier(this, 0) : null;
		}
Example #9
0
		/// <summary>Creates a GestureDetector with the supplied listener.</summary>
		/// <remarks>
		/// Creates a GestureDetector with the supplied listener.
		/// You may only use this constructor from a UI thread (this is the usual situation).
		/// </remarks>
		/// <seealso cref="android.os.Handler.Handler()">android.os.Handler.Handler()</seealso>
		/// <param name="context">the application's context</param>
		/// <param name="listener">
		/// the listener invoked for all the callbacks, this must
		/// not be null.
		/// </param>
		/// <exception cref="System.ArgumentNullException">
		/// if
		/// <code>listener</code>
		/// is null.
		/// </exception>
		public GestureDetector(android.content.Context context, android.view.GestureDetector
			.OnGestureListener listener) : this(context, listener, null)
		{
			mInputEventConsistencyVerifier = android.view.InputEventConsistencyVerifier.isInstrumentationEnabled
				() ? new android.view.InputEventConsistencyVerifier(this, 0) : null;
		}
Example #10
0
		public GestureDetector(android.view.GestureDetector.OnGestureListener listener, android.os.Handler
			 handler) : this(null, listener, handler)
		{
			mInputEventConsistencyVerifier = android.view.InputEventConsistencyVerifier.isInstrumentationEnabled
				() ? new android.view.InputEventConsistencyVerifier(this, 0) : null;
		}