IT. Expert System.

Android Reference

GestureDetectorCompat


android.support.v4.view

Class GestureDetectorCompat



  • public class GestureDetectorCompat
    extends Object
    Detects various gestures and events using the supplied MotionEvents. The GestureDetector.OnGestureListener callback will notify users when a particular motion event has occurred. This class should only be used with MotionEvents reported via touch (don't use for trackball events).

    This compatibility implementation of the framework's GestureDetector guarantees the newer focal point scrolling behavior from Jellybean MR1 on all platform versions.

    To use this class:
    • Constructor Detail

      • GestureDetectorCompat

        public GestureDetectorCompat(Context context,
                             GestureDetector.OnGestureListener listener)
        Creates a GestureDetectorCompat with the supplied listener. As usual, you may only use this constructor from a UI thread.
        Parameters:
        context - the application's context
        listener - the listener invoked for all the callbacks, this must not be null.
        See Also:
        Handler.Handler()
      • GestureDetectorCompat

        public GestureDetectorCompat(Context context,
                             GestureDetector.OnGestureListener listener,
                             Handler handler)
        Creates a GestureDetectorCompat with the supplied listener. As usual, you may only use this constructor from a UI thread.
        Parameters:
        context - the application's context
        listener - the listener invoked for all the callbacks, this must not be null.
        handler - the handler that will be used for posting deferred messages
        See Also:
        Handler.Handler()
    • Method Detail

      • isLongpressEnabled

        public boolean isLongpressEnabled()
        Returns:
        true if longpress is enabled, else false.
      • setIsLongpressEnabled

        public void setIsLongpressEnabled(boolean enabled)
        Set whether longpress is enabled, if this is enabled when a user presses and holds down you get a longpress event and nothing further. If it's disabled the user can press and hold down and then later moved their finger and you will get scroll events. By default longpress is enabled.
        Parameters:
        enabled - whether longpress should be enabled.
      • setOnDoubleTapListener

        public void setOnDoubleTapListener(GestureDetector.OnDoubleTapListener listener)
        Sets the listener which will be called for double-tap and related gestures.
        Parameters:
        listener - the listener invoked for all the callbacks, or null to stop listening for double-tap gestures.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 673 / 158857736. Delta: 0.06796 с