Image Icon Inside the React Native Button

We always want to make our buttons as good as possible to provide the best UI experience. Everybody knows that the button is the most important thing in the mobile application as we require buttons on mostly each screen. So to start showing Image Icon Inside the React Native Button we are expecting you understand the Button and Touchable, If not then you can see our previous example of React Native Button and React Native Touchable.

React Native Button has some limitation as it is not so much customizable and we can not change the style of a React Native Button. So if we want to make a button with some customization we have to use React Native Touchable. To describe React Native Touchable, It is a component to overcome the limitation of the stying of button component. So we are going to use Touchable as or button in this Example.

We have 4 types of Touchables

– TouchableNativeFeedback (Only For Android)
– TouchableHighlight (For Android/IOS Both)
– TouchableOpacity (For Android/IOS Both)
– TouchableWithoutFeedback (For Android/IOS Both)

We are going to use TouchableOpacity in this example because it can be used in Both Android and IOS and it also provides native feel.

To Import TouchableOpacity in code

Render Using

To Make a React Native App

Getting started with React Native will help you to know more about the way you can make a React Native project. We are going to use react-native init to make our React Native App. Assuming that you have node installed, you can use npm to install the react-native-cli command line utility. Open the terminal and go to the workspace and run
npm install -g react-native-cli
Run the following commands to create a new React Native project
react-native init ProjectName
This will make a project structure with an index file named App.js in your project directory.

Open App.js in any code editor and replace the code with the following code.

App.js

To Run the React Native App

Open the terminal again and jump into your project using.
cd ProjectName
To run the project on an Android Virtual Device or on real debugging device
react-native run-android
or on the iOS Simulator by running
react-native run-ios (macOS only).

IOS

Android

     

This is how You can set image inside the React Native Button. If you have any doubt or you want to share something about the topic you can comment below or contact us here. There will be more posts coming soon. Stay tuned!

Hope you liked it. 🙂

Set Alpha Opacity / Transparency of Image View in React Native

This is an Example to Set Alpha Opacity / Transparency of Image View in React Native.  In this example, we will set the alpha opacity of the Image View. It is useful when you use the image in the background and show something over it like we generally do in Splash Screen of the App where we have an Image in background and Application name and logo over it. In this situation, you have to change the opacity of the image to enhance the visibility of the text or another component over it. We will set the opacity in style to reduce the visibility of the image. So let’s get started.

Set Alpha Opacity / Transparency in React Native

To Make a React Native App

Getting started with React Native will help you to know more about the way you can make a React Native project. We are going to use react-native init to make our React Native App. Assuming that you have node installed, you can use npm to install the react-native-cli command line utility. Open the terminal and go to the workspace and run
npm install -g react-native-cli
Run the following commands to create a new React Native project
react-native init ProjectName
This will make a project structure with an index file named App.js in your project directory.

Open App.js in any code editor and replace the code with the following code.

App.js

To Run the React Native App

Open the terminal again and jump into your project using.
cd ProjectName
To run the project on an Android Virtual Device or on real debugging device
react-native run-android
or on the iOS Simulator by running
react-native run-ios (macOS only).

IOS

Android

This is how you can Set Alpha Opacity / Transparency of Image View in React Native. If you have any doubt or you want to share something about the topic you can comment below or contact us here. There will be more posts coming soon. Stay tuned!

Hope you liked it. 🙂

Make Circular Image in React Native using Border Radius

This is an example to Make Circular Image in React Native using Border Radius. Round Shape / Circular Image in React Native is the extension of our previous post on React Native Image component. We will use the same Image component as we have used before in our Image Example but here we will use borderRadius style to make it in Round Shape.

In this example, we will show you how to make a Round Shape Image. A simple example of using Round Shape Image is to show user image in the user profile in our App. So let’s get started.

To Import Image component

Render Using

1. Static Image Resources

require can also be used for including audio, video or document files in your project. Most common .mp3, .wav, .mp4, .mov, .html and .pdf. For the Image component, we will include image using require.

2. Network Requests for Images

3. Uri Data Images

4. SVG Images

To use SVG image from the image folder of your project.

and install it from the terminal through

To Make a React Native App

Getting started with React Native will help you to know more about the way you can make a React Native project. We are going to use react-native init to make our React Native App. Assuming that you have node installed, you can use npm to install the react-native-cli command line utility. Open the terminal and go to the workspace and run
npm install -g react-native-cli
Run the following commands to create a new React Native project
react-native init ProjectName
This will make a project structure with an index file named App.js in your project directory.

Open App.js in any code editor and replace the code with the following code.

App.js

To Run the React Native App

Open the terminal again and jump into your project using.
cd ProjectName
To run the project on an Android Virtual Device or on real debugging device
react-native run-android
or on the iOS Simulator by running
react-native run-ios (macOS only).

This is how you can Make Circular Image in React Native using Border Radius. If you have any doubt or you want to share something about the topic you can comment below or contact us here. There will be more posts coming soon. Stay tuned!

Hope you liked it. 🙂

React Native Rotate Image View Using Animation

This is an Example of React Native Rotate Image View Using Animation. We are using the property of Animated Component from react-native.

To Make a React Native App

Getting started with React Native will help you to know more about the way you can make a React Native project. We are going to use react-native init to make our React Native App. Assuming that you have node installed, you can use npm to install the react-native-cli command line utility. Open the terminal and go to the workspace and run
npm install -g react-native-cli
Run the following commands to create a new React Native project
react-native init ProjectName
This will make a project structure with an index file named App.js in your project directory.

Open App.js in any code editor and replace the code with the following code.

App.js

To Run the React Native App

Open the terminal again and jump into your project using.
cd ProjectName
To run the project on an Android Virtual Device or on real debugging device
react-native run-android
or on the iOS Simulator by running
react-native run-ios (macOS only).

IOS

      

Android

     

This is how you can rotate an image with animation. If you have any doubt or you want to share something about the topic you can comment below or contact us here. There will be more posts coming soon. Stay tuned!

Hope you liked it. 🙂

React Native Full Screen Background Image

While developing an App we usually need a Full-Screen Background Image, especially while making a Splash / Introductory Screen. So here is the Example of React Native Full Screen Background Image.

To make a full-screen background we are using ImageBackground component provided by React Native.

To Import Image Background in Code

Render Using

1. Static Image Resources

require can also be used for including audio, video or document files in your project. Most common .mp3, .wav, .mp4, .mov, .html and .pdf.

2. Network Requests for Images

3. Uri Data Images

To Make a React Native App

Getting started with React Native will help you to know more about the way you can make a React Native project. We are going to use react-native init to make our React Native App. Assuming that you have node installed, you can use npm to install the react-native-cli command line utility. Open the terminal and go to the workspace and run
npm install -g react-native-cli
Run the following commands to create a new React Native project
react-native init ProjectName
This will make a project structure with an index file named App.js in your project directory.

Open App.js in any code editor and replace the code with the following code.

App.js

To Run the React Native App

Open the terminal again and jump into your project using.
cd ProjectName
To run the project on an Android Virtual Device or on real debugging device
react-native run-android
or on the iOS Simulator by running
react-native run-ios (macOS only).

Android

IOS

This is how you can set a Full-screen background Image. If you have any doubt or you want to share something about the topic you can comment below or contact us here. There will be more posts coming soon. Stay tuned!

Hope you liked it. 🙂

Flip Image View Horizontally Using Animation in React Native

This is an Example to Flip Image View Horizontally Using Animation in React Native. We are using the property of Animated Component from react-native.

To flip image view horizontally using animation, We will flip the image on click of Button. So let’s get started.

To Make a React Native App

Getting started with React Native will help you to know more about the way you can make a React Native project. We are going to use react-native init to make our React Native App. Assuming that you have node installed, you can use npm to install the react-native-cli command line utility. Open the terminal and go to the workspace and run
npm install -g react-native-cli
Run the following commands to create a new React Native project
react-native init ProjectName
This will make a project structure with an index file named App.js in your project directory.

Open App.js in any code editor and replace the code with the following code.

App.js

To Run the React Native App

Open the terminal again and jump into your project using.
cd ProjectName
To run the project on an Android Virtual Device or on real debugging device
react-native run-android
or on the iOS Simulator by running
react-native run-ios (macOS only).

     

This is how you can flip the image horizontally using Animation. If you have any doubt or you want to share something about the topic you can comment below or contact us here. There will be more posts coming soon. Stay tuned!

Hope you liked it. 🙂

Example to Set Border Radius of an Image in React Native

This is an Example to Set Border Radius of an Image in React Native. We will set the border radius of the Image using StyleSheet element overflow and borderRadius.

Set Border Radius Using

Let’s get started.

To Make a React Native App

Getting started with React Native will help you to know more about the way you can make a React Native project. We are going to use react-native init to make our React Native App. Assuming that you have node installed, you can use npm to install the react-native-cli command line utility. Open the terminal and go to the workspace and run
npm install -g react-native-cli
Run the following commands to create a new React Native project
react-native init ProjectName
This will make a project structure with an index file named App.js in your project directory.

Open App.js in any code editor and replace the code with the following code.

App.js

To Run the React Native App

Open the terminal again and jump into your project using.
cd ProjectName
To run the project on an Android Virtual Device or on real debugging device
react-native run-android
or on the iOS Simulator by running
react-native run-ios (macOS only).

This is how you can set a border radius of an Image in React Native. If you have any doubt or you want to share something about the topic you can comment below or contact us here. There will be more posts coming soon. Stay tuned!

Hope you liked it. 🙂

Image Icon in React Native TextInput

While working with React Native TextInput we need to assist the user what to insert in TextInput. We can use React Native Text with TextInput or we can show hint inside the TextInput but we can also add some icons to show the use of TextInput. Here is the example to show Image Icon In React Native TextInput.

To Import TextInput in Code

Render Using

In this example, we will make two TextInput with icons to enter the name and contact number. So let’s get started.

To Make a React Native App

Getting started with React Native will help you to know more about the way you can make a React Native project. We are going to use react-native init to make our React Native App. Assuming that you have node installed, you can use npm to install the react-native-cli command line utility. Open the terminal and go to the workspace and run
npm install -g react-native-cli
Run the following commands to create a new React Native project
react-native init ProjectName
This will make a project structure with an index file named App.js in your project directory.

Open App.js in any code editor and replace the code with the following code.

App.js

To Run the React Native App

Open the terminal again and jump into your project using.
cd ProjectName
To run the project on an Android Virtual Device or on real debugging device
react-native run-android
or on the iOS Simulator by running
react-native run-ios (macOS only).

IOS

Android

This is how you can add image icon inside the React Native TextInput. If you have any doubt or you want to share something about the topic you can comment below or contact us here. There will be more posts coming soon. Stay tuned!

Hope you liked it. 🙂