react native my drawer changing the the statusbar colot

Solutions on MaxInterview for react native my drawer changing the the statusbar colot by the best coders in the world

showing results for - "react native my drawer changing the the statusbar colot"
Guadalupe
09 Feb 2020
1Add Componett
2
3<StatusBar  backgroundColor={'red'}/>
4  
5this workes for me 
6if not follow this
7
8https://reactnavigation.org/docs/status-bar/
9
10or this
11
12https://stackoverflow.com/questions/57170391/react-native-drawer-change-color-of-status-bar
13
14
15)=============================§§===========================
16blow function will change the status bar color on android only acording to your screen color
17
18
19
20React.useEffect((): any => {
21                const navListener = navigation.addListener('focus', (): void => {
22  StatusBar.setBarStyle('dark-content');
23  Platform.OS === 'android' && StatusBar.setBackgroundColor(Colors.appcolor);
24});
25return (): void => navigation.removeListener('focus', null); // cleanup
26}, []);
27
28
29