You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 14, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 14, 2026. It is now read-only.
This is only the case when used in a StackLayout and this has been true for vanilla nativescript as well. What I personally suggest most of the time is to use a GridLayout which has far less issues than a StackLayout (and it is more performant).
Throughout the docs we reference StackLayout quite often and the reason is that it's the easiest layout to understand, but not the best one... This is a double edge sword, because on one hand I'd like to keep the docs easy to understand, but on the other hand I want to suggest things that I'd actually use in production.
Anyways, for this case we can mention in a note, that when used in a StackLayout a height should be applied.
Reacted by Sharrod Hines and Iva Stefanova Koevska-Atanasova
@rigor789 I know you do not want to make the documentation seem more complex, but for me personally I feel that you providing what I would call "NativeScript best practices" within the docs would be helpful.
This would be great for new users reading through especially since they may think that the StackLayout is the best since it used so often throughout. I know it could seem like you are adding a bias to it, but I see no harm in finding out your recommendations on when and where to use different UI components and more.
Reacted by Iva Stefanova Koevska-Atanasova, Eduardo Alvarez, Van Dung and Denis Rudnei de Souza
Activity
rigor789 commentedon Apr 27, 2018
This is only the case when used in a StackLayout and this has been true for vanilla nativescript as well. What I personally suggest most of the time is to use a GridLayout which has far less issues than a StackLayout (and it is more performant).
Throughout the docs we reference StackLayout quite often and the reason is that it's the easiest layout to understand, but not the best one... This is a double edge sword, because on one hand I'd like to keep the docs easy to understand, but on the other hand I want to suggest things that I'd actually use in production.
Anyways, for this case we can mention in a note, that when used in a StackLayout a height should be applied.
hines-sharrod commentedon Apr 27, 2018
@rigor789 I know you do not want to make the documentation seem more complex, but for me personally I feel that you providing what I would call "NativeScript best practices" within the docs would be helpful.
This would be great for new users reading through especially since they may think that the StackLayout is the best since it used so often throughout. I know it could seem like you are adding a bias to it, but I see no harm in finding out your recommendations on when and where to use different UI components and more.