Android Question B4XPages how to know if the device orientation is in portrait or landscape

imbault

Well-Known Member
Licensed User
Longtime User
HI,

In a B4XPages project, I need to know if the device orientation is in portrait or landscape

Thank you

Patrick
 

imbault

Well-Known Member
Licensed User
Longtime User
Thank you @klaus , but I agree with @Alessandro71 :
I just want to get the information : how the user hold his device : horizontally (landscape) or vertically (portrait)

Thanks
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
Thank you @klaus , but I agree with @Alessandro71 :
I just want to get the information : how the user hold his device : horizontally (landscape) or vertically (portrait)

Thanks
Alessandro meant something different, that with the B4XPages you are the one who establishes the orientation of the APP and therefore you know it a priori.

Instead, you need an event that informs you when the user rotates the device.

When I have woken up for good, after enjoying a good coffee, maybe I'll try to answer you; I'm afraid I know the answer only for B4A-Android and maybe you want to develop for iOS too (I'm not sure, since B4XPages is still worth using even if you don't intend to do the latter).
 
Upvote 0
Top