Today I tried to rewrite Snapchat's UI as a challenge. I started with the landing page, but I reached an issue with doing the buttons at the bottom, they have a gap underneath them.
I'm quite surprised it doesn't go 100% to the bottom naturally, but is there a way I can do this? I could do margin-top
on the bottom stack layout but is there a better way?
UPDATE: Putting margin-top
on the bottom StackLayout
just pushes the height up, it doesn't make it go down, it seems like the positioning is locked to around 96% of the screen.
Here is my playground code - https://play.nativescript.org/?template=play-tsc&id=zRSpSr
You can use
DockLayout
to solve your problem, it helps you dock child items to any side of the screen. Docking<StackLayout>
containing buttons to bottom and<Image>
to top will do the trick for you.CSS :
EDIT: iOS SAFE AREA SUPPORT is probably causing the problem for you, take a look at the margins specified in NativeScript 5.0
You can read more about it, here.