codeforbtv / cvoeo-app

The "Money on My Mind" app helps CVOEO's Reach-Up clients stay on track with their personal finance coaching.
Apache License 2.0
11 stars 4 forks source link

Android- login page shouldn't scroll #98

Open kmeyersvt opened 5 years ago

kmeyersvt commented 5 years ago

On my Samsung S9, I can scroll up and down and it doesn't really do anything. The page shouldn't scroll even it resizes.

rraabe commented 5 years ago

I was playing around with this one for a bit. The only way I could fix the scrolling was to remove the scroll view and resize the logo scale to 0.70. I've only tried this on my Motox4 so I need to get into GenyMotion and try a few other phones. Could we set the logo scale to be based off the device window size? Or is there a better way to go about resizing the view?

johnneed commented 5 years ago

@rraabe

Dimensions.get('window') is your friend here. Do something like this:

import {Dimensions } from "react-native";
const screenWidth = Dimensions.get('window').width;
const logoSize = Math.round(width/2)
...

<Image style={{width:logoSize, height: logoSize}} source={{myLogo}}/>

You should make sure your screen is set in a element that is the exact screen size. There is already a Container Component.

more info here: https://facebook.github.io/react-native/docs/dimensions