Thanks for the code, can you explain me one thing please ? In this line of code onPress={() => setIsStatusBarVisible(!isStatusBarVisible)} I was trying to do - onPress={() => setIsStatusBarVisible(true)} why did that not work and why is the (!) one working ?
@@fawaazshaikh5997 setIsStatusBarVisible(!isStatusBarVisible) - it works both ways so you can turn the status bar on and off. Your solution works in one direction
i kept trying barStyle="light-content" for white icons and text in the status bar, but it wasn't working. Looked up expo's documentation. Turns out its just style="light" within the status bar.
bhai please tell me how to set the color of area below the navigation area also know as gesture area, which is meant to quickly switch between the recent apps in android. How to set the color according to background color. Please it is urgent.
Your teaching style, enthusiasm, and ability to break down complex concepts into easily understandable parts are truly remarkable 👌😊
Source code, just in case ...
import { useState } from "react";
import { Button, StatusBar, View } from "react-native";
export default function App() {
const [isStatusBarVisible, setIsStatusBarVisible] = useState(false);
return (
setIsStatusBarVisible(!isStatusBarVisible)}
/>
);
}
Enjoy!
thank you
@@mauroreis4006 My pleasure.
Thanks for the code, can you explain me one thing please ? In this line of code onPress={() => setIsStatusBarVisible(!isStatusBarVisible)} I was trying to do - onPress={() => setIsStatusBarVisible(true)} why did that not work and why is the (!) one working ?
@@fawaazshaikh5997 setIsStatusBarVisible(!isStatusBarVisible) - it works both ways so you can turn the status bar on and off. Your solution works in one direction
me too bro i tried using the true and it didn't work@@fawaazshaikh5997
Please includes push notification and sign in with google
Thank you for all the amazing tutorial
thank you bro ... waiting for more
Lot of love ❤️❤️
Useful video. Thank you 😊
Was able to add a button to toggle the state of the status bar 👍
how?
Exceptional ❤
i kept trying barStyle="light-content" for white icons and text in the status bar, but it wasn't working. Looked up expo's documentation. Turns out its just style="light" within the status bar.
seems like API has been updated
because this video was uploaded 6 Months ago
bhai please tell me how to set the color of area below the navigation area also know as gesture area, which is meant to quickly switch between the recent apps in android. How to set the color according to background color. Please it is urgent.
How do you make this work with expo router when you have a layout file
can someone help i am not able to run barstyle it is giving error
challenge answer:
import { useState } from 'react';
import { View, StatusBar, Button} from 'react-native';
export default function App(){
const [isStatusBarVisible, setisStatudBarVisible] = useState(false)
return (
setisStatudBarVisible(!isStatusBarVisible)}
/>
);
}
can we customly change background color of status bar in ios? i cannot find the logic for it
guy literally said background color is only supported on android. if you want it on ios your gonna have to make something custom
Challenge Answere:-
const StatusBarComponent = () => {
const [hideStatuBar, setHideStatusBar] = useState(false);
return (
setHideStatusBar(!hideStatuBar)}
/>
);
};
export default StatusBarComponent;
import this componenet in App.js
Can you please help me make my content such as texts appear under the statusbar instead of on the statusbar with the clock?
instead of wraping the text in view wrap it in SafeAreaView
status bar hidden but there is black area instead ,
is it because of notch camera ??????
When and why use Status Bar?
why should we use this status bar sir ??
Please include upload a file from file manager