Wish ActivityWidth and ActivityHeight for Designerscripts

corwin42

Expert
Licensed User
Longtime User
The ActivitySize keyword in designer scripts is great so I can make my design dependent of the screen size.

I'm missing ActivityHeight and ActivityWidth keywords. Background is that I want to check if the device is in portrait or landscape mode in a designer script that is loaded by a panel. Because it is loaded by a panel I can't use 100%x and 100%y values. I need the values of the activity.

Any usable workaround for this? I don't see one other than using two variants for the scripts but this produces much duplicated code.

Would be nice if ActivityHeight and ActivityWidth keywords could be added to designer scripts.
 

corwin42

Expert
Licensed User
Longtime User
Have your tried:
B4X:
If 100%x > 100%y Then ...
This does not work because I load the layout for a panel. The panel width is always bigger than the height regardless of screen orientation. But I want to have some content items bigger in portrait.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…