skip to Main Content

I couldn’t find any docs or knowledge about this value. Are these values determined at the java level for android?

2

Answers


  1. It should be 500 milliseconds.

    You can find out in the code file in node_modulesreact-nativeLibrariesComponentsTouchableTouchableOpacity.js.

    TouchableOpacity.js

    import Pressability, {
      type PressabilityConfig,
    } from '../../Pressability/Pressability';
    
    _createPressabilityConfig(): PressabilityConfig {
        return {
          ...
          delayLongPress: this.props.delayLongPress,
          ...
        };
      }
    

    As you may see, it is defined in Pressability.js.

    Pressability.js

      /**
       * Duration (in addition to `delayPressIn`) after which a press gesture is
       * considered a long press gesture. Defaults to 500 (milliseconds).
       */
      delayLongPress?: ?number,
    
    Login or Signup to reply.
  2. Find the basic default values for all the touchableOpacity attributes below,

    enabled: If true, parallax effects are enabled. Defaults to true.
    shiftDistanceX: Defaults to 2.0.
    shiftDistanceY: Defaults to 2.0.
    tiltAngle: Defaults to 0.05.
    magnification: Defaults to 1.0.
    pressMagnification: Defaults to 1.0.
    pressDuration: Defaults to 0.3.
    pressDelay: Defaults to 0.0.

    And you may find all these in here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search