React Native flexDirection Row Column Explained iOS Android example

flexDirection style is used to set Primary Axis of layout. It would automatically determines and set all the children of Root view(On which you have applied the flexDirection) in Horizontally(Row Format) and Vertically(Column Format). The default value of flexDirection is column. If we do not apply the flexDirection on our view then it will automatically sets the children into […]

React Native Show JSON ListView click item value on another Activity Screen iOS Android Example

Passing data from one activity to another is very important in react native. The React Navigation library gives us a method named as this.props.navigation.navigate(Your_Activity_Name, Value_You_Want_To_Send). So in this tutorial we would going to Show JSON ListView click item value on another Activity Screen in iOS Android react native application. We would retrieve the JSON ListView FlatList […]

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. […]