Is it possible to change the orientation of gridlayout


how to fix the orientation as horizontal for grid layout ? is it possible to change the rows and column padding ? i use the layout ,

table is different in horizontal and vertical to fix it ?


Hey, could you sketch up how you imagine a flipped gridlayout would look like on a page? I am not sure I understand your needs correctly, since you can make the gridlayout as tall and as wide as you want, so long as the page allows it.


my need is ,want to set orientaiton only as landscape mode…now i have a page with a table created by using grid layout… my problem is when the screen is in portrait the table looks ugly…so to avoid that i need to set the orientation only in landscape mode …is any way ?
i try to add plugin,buy using this command,
tns plugin add nativescript-screen-orientation
but gives error


if your app is supposed to work in both landscape and portrait, then use Orientation qualifiers to create two layouts one for the landscape and one for the portrait, and your app will switch between those two layout based on the device orientation


Here is a working example, hope it works for you.

Nativescript support for RTL / LTR layouts?

how to use orientation qualifiers…where to deifine and use it ?


you simply create multiple files<file-name>[.<qualifier>]*.<extension>
However, I just learned that qualifiers are not available for angular, you can up vote this github issue


i am using html with angular…so i not understand the code…


Here you go for angular version of same example.


Not only that, the qualifiers are considered only before page loads. If the orientation changes after the page is rendered, it won’t reflect. So I wold prefer to handle orientation listeners to position elements.

If you just wan to update css based on orientation / platform, you may want this.


Thanks @manojdcoder I went through the play ground you shared and I really liked the idea, so maybe utilize the same idea using dynamic components. However, for now I’m building an app for tablet and I’m only targeting landscape, However, I want to enable Right-to-Left where the side drawer goes on the right, labels and their text fields flipped , and text alignment change…etc

So what do you think is the best approach to handle this scenario? (I wish they had RTL qualifiers as it will really make life easier)