Bocchi Posted June 21, 2017 Share Posted June 21, 2017 Is it possibile to detect screen orientation in a UniGui application running on smartphone? Thanks. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 21, 2017 Share Posted June 21, 2017 Hi, Do you mean a desktop UniGUI app ?! Best regards, Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 21, 2017 Share Posted June 21, 2017 If yes, can you try this approach ?!: MainForm -> Script: window.addEventListener('orientationchange', function(event){ switch(window.orientation){ case -90: case 90: // landscape alert("landscape"); break; default: // portrait alert("portrait"); } }) Quote Link to comment Share on other sites More sharing options...
devya Posted June 22, 2017 Share Posted June 22, 2017 How about for mobile ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 22, 2017 Share Posted June 22, 2017 Hi, How about for mobile ? MainmForm -> ClientEvents -> ExtEvents -> window.orientationchange fn: function window.orientationchange(eOpts) { } Best regards, Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 22, 2017 Share Posted June 22, 2017 How about for mobile ? Which edition and build are you using ?! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.