ReactNative Status bar is easy to use and all you need to do is set properties to change it.
The hidden property can be used to hide the status bar.
The barStyle can have three values – dark-content, light-content and default
Syntax
|
Example
//This is an example code for StatusBar// import React, {Component} from 'react'; //import react in our code. import {StyleSheet, View, Text, StatusBar, Platform} from 'react-native'; // import all basic components
export default class StatusbarExample extends Component { render() { return ( <View style={styles.MainContainer}> <StatusBar barStyle="dark-content" // dark-content, light-content and default hidden={false} //To hide statusBar backgroundColor="#00BCD4" //Background color of statusBar translucent={false} //allowing light, but not detailed shapes networkActivityIndicatorVisible={true} /> <Text> Status Bar Example </Text> </View> ); } } const styles = StyleSheet.create({ MainContainer: { justifyContent: 'center', alignItems: 'center', flex: 1, }, });
|
Ruby program to add two integer numbers
how to create an array with Array.[](*args) in Ruby ?
What are the various Ruby runtimes, and how are they different?
Ruby program to check whether the given number is prime or not
Ruby program to reverse a string
Ruby program to check whether the given number is palindrome
Ruby program to print Fibonacci series
How to Replace array elements in Ruby?
Ruby program to print an array
Ruby program to check whether the given number is Armstrong
Program to Print Triangle of Numbers in Ruby
How to add/remove elements to Array in Ruby?
How to shuffle an array in Ruby?
Creating Array with Array.new(size, obj) in Ruby
Ruby program to generate random numbers
Ruby program to Calculate the factorial of given number
What are #method_missing and #send? Why are they useful?
How to Sort Array in Ruby?
How to get index of array element in Ruby
How to Get Input with Gets in Ruby
How to create two dimensional array in ruby?