From 1c9458e1cd90b0706bacffbf6ac33bf16240694e Mon Sep 17 00:00:00 2001 From: Jim Grenadier Date: Thu, 4 May 2023 17:23:48 -0500 Subject: [PATCH] Update AppIntroScreen.tsx fix tutorial image sizes for small nexus one phone. This was found in issue 477 but was not caused by the component upgrade. --- src/screens/AppIntroScreen/AppIntroScreen.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/screens/AppIntroScreen/AppIntroScreen.tsx b/src/screens/AppIntroScreen/AppIntroScreen.tsx index e0e49ad5b..287af0477 100644 --- a/src/screens/AppIntroScreen/AppIntroScreen.tsx +++ b/src/screens/AppIntroScreen/AppIntroScreen.tsx @@ -13,6 +13,7 @@ import AppIntroSlider from 'react-native-app-intro-slider' import Constants from 'expo-constants' import AsyncStorage from '@react-native-async-storage/async-storage' import DeviceInfo from 'react-native-device-info' +import { Dimensions } from 'react-native' const data = [ { @@ -138,6 +139,11 @@ export default class AppIntroScreen extends React.Component { } _renderItem = ({ item }: { item: Item }) => { + const windowHeight = Dimensions.get('window').height; + const ImageHeight = (windowHeight) < 550 ? 240 : 320; + const ImageWidth = ImageHeight; + // console.log(windowHeight); + // console.log(ImageHeight); return ( - + {item.text}