I couldn't find any docs or knowledge about this value. Are these values determined at the java level for android?
I couldn't find any docs or knowledge about this value. Are these values determined at the java level for android?
It should be 500 milliseconds.
You can find out in the code file in node_modules\react-native\Libraries\Components\Touchable\TouchableOpacity.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,
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.