DEV Community

skptricks
skptricks

Posted on

1

React Native ActivityIndicator Andriod IOS Example

This tutorial explains how to display loading screen or activity indicator in react native application for android and ios device. ActivityIndicator is the common circular loading indicator used in both android and iOS devices. This type of loader which is basically used to display a loading dotted moving circle on android and iPhone devices, When user trying to loading something from server.

React Native ActivityIndicator Andriod IOS Example

React Native ActivityIndicator Example
Lets see the complete source code that helps to display loading screen or activity indicator in react native application for android and ios device.

Step 1: Create a new react native project, if you don’t know how to create a new project in react native just follow this tutorial.

Step 2: Open App.js File in your favorite code editor and erase all code and follow this tutorial.

Step 3: Through react , react-native packages import all required components.
import React, { Component } from 'react';
import { StyleSheet, View, ActivityIndicator, Button } from 'react-native';

Step 4: Lets create constructor block inside your App component. In the constructor block we have created state variables that helps to hide and show activity indicator from the device screen.

Read more...

Sentry blog image

The Visual Studio App Center’s retiring

But sadly….you’re not. See how to make the switch to Sentry for all your crash reporting needs.

Read more

Top comments (0)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.

Sentry growth stunted Image

If you are wasting time trying to track down the cause of a crash, it’s time for a better solution. Get your crash rates to zero (or close to zero as possible) with less time and effort.

Try Sentry for more visibility into crashes, better workflow tools, and customizable alerts and reporting.

Switch Tools

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay