2
我希望我的應用程序的所有屏幕都顯示在iOS和Android上的狀態欄下方,因此我必須將StatusBar
組件或paddingTop
添加到我的所有屏幕。反應本機避免狀態欄在所有屏幕上重疊
有沒有辦法做到這一點全球?在Redux應用程序中,適當的頂級組件在哪裏添加StatusBar
? (例如https://github.com/react-community/react-navigation/tree/master/examples/ReduxExample的哪一部分)?
哪個組件應該包裝在Redux Navigation應用程序中?試過https://github.com/react-community/react-navigation/blob/master/examples/ReduxExample/src/navigators/AppNavigator.js#L17和https://github.com/react-community/react-navigation /blob/master/examples/ReduxExample/index.js#L19,兩者都不起作用(沒有任何渲染) – Avery235
@ Avery235在這種情況下,您想包裝您的LoginScree,MainScreen,ProfileScreen,將NavigationContainer導入到這些頁面組件中,請按照我提供的示例將這些頁面的組件放入其中。 – dotcomXY
這不起作用,因爲反應導航(它有一個導航欄)環繞着組件(LoginScreen等) – Avery235