Answers for "react native my drawer changing the the statusbar colot"

0

react native my drawer changing the the statusbar colot

Add Componett

<StatusBar  backgroundColor={'red'}/>
  
this workes for me 
if not follow this

https://reactnavigation.org/docs/status-bar/

or this

https://stackoverflow.com/questions/57170391/react-native-drawer-change-color-of-status-bar


)=============================§§===========================
blow function will change the status bar color on android only acording to your screen color



React.useEffect((): any => {
                const navListener = navigation.addListener('focus', (): void => {
  StatusBar.setBarStyle('dark-content');
  Platform.OS === 'android' && StatusBar.setBackgroundColor(Colors.appcolor);
});
return (): void => navigation.removeListener('focus', null); // cleanup
}, []);
Posted by: Guest on June-14-2021

Code answers related to "react native my drawer changing the the statusbar colot"

Code answers related to "Javascript"

Browse Popular Code Answers by Language