React Native Add onLongPress on Button using TouchableOpacity

onLongPress={} event is like setOnLongClickListener() available in android application development. onLongPress={} activated the button after a few seconds of press, User need to press and hold the button for few seconds(1.3 seconds) approximate. But Button component in react native directly dose not support the onLongPress={} event, So instead of Button component we have to use TouchableOpacity component. So […]

React Native Enable Disable TextInput Programmatically Android iOS

TextInput comes with prop editable={Boolean Value}, This prop can Enable Disable TextInput input value dynamically. If the value of editable={false} then it will disable the complete TextInput component and restricts the application user to enter or type any value inside it. If the value of editable={true} then it will Enable the TextInput and user can now enter value inside it. […]

React Native set View Align Horizontally Center dynamically on button click

The Style attribute alignItems : ‘ ‘ is used on a View or component to set their children alignment. There are 4 different options available in this attribute flex-start, center, flex-end, and stretch. So in this tutorial we would going to set View Align Horizontally Center dynamically on button click using alignItems :’center’ in react native android iOS app example. […]

React Native calculate child view X Y Dimensions dynamically on Button Click iOS Android Example

React Native gives us a function named as measureLayout() which works with ReactNative.findNodeHandle() event. This function would allow us the calculate the Child View X-Position, Y-Position, Width and Height. The X-Position and Y-Position is in the respect of Root Parent View. Using this tutorial developers can find the position of View component on screen. So in this tutorial […]

React Native Call Function Task After Some Time Delay Using setTimeout(function())

The setTimeout(function(){}) is used to set a valued interval time to execute a particular task. This function would hold the event to defined time(In milliseconds-seconds) and than execute the Method. So in this tutorial we would going to create a react native app to Call Function Task After Some Time Delay Using setTimeout(function(){})  in android iOS application. […]

Add Permissions for Android in AndroidManifest.xml in React Native

Permissions is designed to maintain the security between application and application user. Using the permissions we can give the privilege to android app to access any specific feature of that application. Android has its unique file structure for application development so Android gives us a file named as AndroidManifest.xml. The AndroidManifest.xml file contain all the important information […]