0

I've been trying to use NativeScript with Angular to create my first mobile application and have been doing pretty well so far. Recently though, I've ran into this problem where the page won't scroll to show me the rest of the page. I've re-created this in the Playground for you guys to see as well. I've tried changing the order that the ScrollView and StackLayouts are but I can't seem to figure out why it won't scroll. Here's the Playground: https://play.nativescript.org/?template=play-ng&id=rNYOHR

Note: I'm on an iPhone 5S so some people out there with bigger phones might be able to see the whole thing, but I can't.

2
  • Generally you wouldn't use % for margin / padding, just numbers (that defaults to DIP - Density Independent Pixel) should give decent spacing on all screen ranges. Commented Mar 8, 2019 at 14:44
  • @Manoj ahhhh. interesting. that fixed the problem that I was having with spacing! thank you so much!! Commented Mar 8, 2019 at 19:23

1 Answer 1

2

I have updated the playground for you here. You have given height for the StackLayout in class and that is the culprit here.

.pageBackground{
    background-image: url('https://backgroundtown.com/content/images/thumbs/0002610_classic-texture-dark-cool-gray.jpeg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    /* height: 100% */
}

.main-container{
    /* height: 100%; */
    width: 100%;
    /* overflow-y: scroll; */
}

P.S. I have tested on larger screen ios well.

Sign up to request clarification or add additional context in comments.

2 Comments

this is awesome. is there any reason that this completely get rid of all of the vertical spacing that I had? before: imgur.com/FtVYPXT, after: imgur.com/JgshVuX
May be something to do with form-control class.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.