From f025c7a5ea97a9fbcd82619872ededdb78a0f42d Mon Sep 17 00:00:00 2001 From: Nouman Tahir Date: Thu, 15 Apr 2021 01:42:15 +0500 Subject: [PATCH] welcome ui pixel perfect fine tuning --- .../application/screen/welcomeScreen.js | 45 ++++++++++--------- .../application/screen/welcomeStyles.js | 25 ++++++++--- 2 files changed, 43 insertions(+), 27 deletions(-) diff --git a/src/screens/application/screen/welcomeScreen.js b/src/screens/application/screen/welcomeScreen.js index cc99b8269..e69454bf9 100644 --- a/src/screens/application/screen/welcomeScreen.js +++ b/src/screens/application/screen/welcomeScreen.js @@ -1,6 +1,7 @@ import React from 'react'; import { useIntl } from 'react-intl'; import { Text, Image, View, SafeAreaView } from 'react-native'; + import EStyleSheet from 'react-native-extended-stylesheet'; import { Icon, MainButton } from '../../../components'; @@ -26,28 +27,30 @@ const WelcomeScreen = ({ handleButtonPress }) => { ); return ( - - - - {intl.formatMessage({ id: 'welcome.label' })} - {intl.formatMessage({ id: 'welcome.title' })} - - - {_renderInfo('question', 'welcome.line1_heading', 'welcome.line1_body')} - {_renderInfo('emotsmile', 'welcome.line2_heading', 'welcome.line2_body')} - {_renderInfo('people', 'welcome.line3_heading', 'welcome.line3_body')} - + + + + + {intl.formatMessage({ id: 'welcome.label' })} + {intl.formatMessage({ id: 'welcome.title' })} + + + {_renderInfo('question', 'welcome.line1_heading', 'welcome.line1_body')} + {_renderInfo('emotsmile', 'welcome.line2_heading', 'welcome.line2_body')} + {_renderInfo('people', 'welcome.line3_heading', 'welcome.line3_body')} + - - + + + ); }; diff --git a/src/screens/application/screen/welcomeStyles.js b/src/screens/application/screen/welcomeStyles.js index 79527af6a..62fb95ede 100644 --- a/src/screens/application/screen/welcomeStyles.js +++ b/src/screens/application/screen/welcomeStyles.js @@ -1,13 +1,23 @@ +import { Dimensions, Platform } from 'react-native'; import EStyleSheet from 'react-native-extended-stylesheet'; import scalePx from '../../../utils/scalePx'; +const WINDOW_HEIGHT = Dimensions.get('window').height; + export default EStyleSheet.create({ + root: { + flex: 1, + backgroundColor: '$primaryBackgroundColor', + }, container: { flex: 1, justifyContent: 'space-between', - paddingVertical: 100, + paddingTop: Platform.select({ + ios: 30, + android: 50, + }), + paddingBottom: 20, paddingHorizontal: 40, - backgroundColor: '$primaryBackgroundColor', }, welcomeText: { fontSize: scalePx(34), @@ -19,10 +29,13 @@ export default EStyleSheet.create({ }, mascot: { position: 'absolute', - width: 160, + width: '45%', height: 227, - marginTop: 90, - right: 0, + marginTop: Platform.select({ + ios: 20, + android: WINDOW_HEIGHT * 0.07, + }), + right: 8, opacity: 0.7, shadowColor: '$primaryBlack', shadowOffset: { width: 0, height: 0 }, @@ -35,7 +48,7 @@ export default EStyleSheet.create({ }, sectionRow: { flexDirection: 'row', - marginTop: 64, + marginTop: 52, }, sectionTitle: { fontSize: scalePx(17),