From f506e76eb0c32abb4b6d10c9119c53a5450f2890 Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Wed, 22 Jul 2020 20:10:33 -0400 Subject: [PATCH] Improve add server screen layout in landscape --- screens/AddServerScreen.js | 64 ++++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/screens/AddServerScreen.js b/screens/AddServerScreen.js index daf470d..79a36b3 100644 --- a/screens/AddServerScreen.js +++ b/screens/AddServerScreen.js @@ -4,7 +4,9 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ import React from 'react'; -import { Image, StyleSheet, View } from 'react-native'; +import { Image, KeyboardAvoidingView, Platform, StyleSheet, View } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { useHeaderHeight } from '@react-navigation/stack'; import { useTranslation } from 'react-i18next'; import ServerInput from '../components/ServerInput'; @@ -12,50 +14,52 @@ import Colors from '../constants/Colors'; const AddServerScreen = () => { const { t } = useTranslation(); + const headerHeight = useHeaderHeight(); return ( - - - + + + + + - - - + + ); }; const styles = StyleSheet.create({ - serverTextContainer: { + screen: { flex: 1, - alignContent: 'flex-start' + backgroundColor: Colors.backgroundColor }, container: { flex: 1, - alignItems: 'center', - justifyContent: 'center', - backgroundColor: Colors.backgroundColor + justifyContent: 'space-evenly' }, logoContainer: { - marginTop: 80, - marginBottom: 48, - alignItems: 'center', - justifyContent: 'center' + alignItems: 'center' }, logoImage: { - width: '90%', - height: undefined, - maxWidth: 481, - maxHeight: 151, - // Aspect ration of the logo - aspectRatio: 3.18253 + marginVertical: 10, + width: 481, + height: 151, + maxWidth: '90%', + resizeMode: 'contain' } });