Jump to content

uniGUI DOES Mobile Browser Orientation Lock


Recommended Posts

This example demonstrates how to lock the position of the Mobile Browser so that there is no change in the rotation of the screen. Very simple in FMX but a little inaccurate in the browser and completely unreliable using CSS.

Once you set the lock in Portrait, turning the smartphone to landscape does not realign. This is very useful if you want to keep a fixed formatting in your APP (as in TikTok, but here in the browser).

You have to run to see the effect.

 

Mobile-LockByJS.jpg

Project available at https://unigui.express

  • Like 2
Link to comment
Share on other sites

17 hours ago, Fred Montier said:

This example demonstrates how to lock the position of the Mobile Browser so that there is no change in the rotation of the screen. Very simple in FMX but a little inaccurate in the browser and completely unreliable using CSS.

Once you set the lock in Portrait, turning the smartphone to landscape does not realign. This is very useful if you want to keep a fixed formatting in your APP (as in TikTok, but here in the browser).

You have to run to see the effect.

www.unigui.com.br-MobileLockByJS.rar

Mobile-LockByJS.jpg

Hi, this is great, anyway it can be done on startup without clicking on the button to activate ?

 

Link to comment
Share on other sites

Yes, of course. That's why I placed the function in a button for you to pick up how to use.
I haven't found nothing in Ext.JS or in uniGUI about this subject. Buts this is a standard method  using JS in the latest browser version. Not tested in Iphone Safari.
I do appreciate any feed back about it. I have just Samsung and Xiomi smatphones.

Edited by Fred Montier
typos
Link to comment
Share on other sites

  • 1 year later...
  • 2 months later...
  • 4 weeks later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...