Skip to content

Commit 1a1857d

Browse files
authored
Merge pull request #41 from funnyzak/feature/safearea_style
2 parents 3adc49c + fb4445e commit 1a1857d

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

src/navigation/Navigator.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
NavigationContainerRefWithCurrent,
99
NavigationState,
1010
PartialState,
11+
DefaultTheme,
1112
Route
1213
} from '@react-navigation/native'
1314
import { createNativeStackNavigator, NativeStackNavigationOptions } from '@react-navigation/native-stack'
@@ -194,7 +195,6 @@ const MainAppNavigator = ({ navigation, route }: MainScreenProps) => {
194195
options={{
195196
title: translate(`router.${ROUTES.HotDraw}`),
196197
...defaultTabBarSetting(theme, insets),
197-
198198
tabBarIcon: ({ focused }) =>
199199
renderBottomIcon(
200200
focused,
@@ -295,6 +295,13 @@ export const AppNavigationContainer = () => {
295295
ref={(navigatorRef: NavigationContainerRefWithCurrent<RootStackParamList>) => {
296296
NavigationService.setTopLevelNavigator(navigatorRef)
297297
}}
298+
theme={{
299+
dark: theme.name === 'dark',
300+
colors: {
301+
...DefaultTheme.colors,
302+
background: theme.colors.background
303+
}
304+
}}
298305
documentTitle={{
299306
formatter: (options, route) => `${options?.title ?? route?.name}`
300307
}}>

src/screens/login/SignIn.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,9 @@ const Screen = ({
9999
}
100100

101101
return (
102-
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'padding' : 'height'}>
102+
<View style={[SylCommon.Layout.fill, { backgroundColor: theme.colors.background }]}>
103103
<SetStatusBar backgroundColor={theme.colors.background} />
104-
<StatusBar backgroundColor={theme.colors.background} />
105-
<SafeAreaView style={[SylCommon.Layout.fill, { backgroundColor: theme.colors.background }]}>
104+
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'padding' : 'height'} style={{ flex: 1 }}>
106105
<View style={[SylCommon.Card.container(theme), styles.mainContainer(theme)]}>
107106
<View style={styles.columnItem(theme)}>
108107
<Image
@@ -151,8 +150,8 @@ const Screen = ({
151150
</Text>
152151
</Pressable>
153152
</View>
154-
</SafeAreaView>
155-
</KeyboardAvoidingView>
153+
</KeyboardAvoidingView>
154+
</View>
156155
)
157156
}
158157

0 commit comments

Comments
 (0)