Fred Montier Posted August 5, 2020 Share Posted August 5, 2020 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. Project available at https://unigui.express 2 Link to comment Share on other sites More sharing options...
epos4u Posted August 6, 2020 Share Posted August 6, 2020 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 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 More sharing options...
Fred Montier Posted August 7, 2020 Author Share Posted August 7, 2020 (edited) 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 August 7, 2020 by Fred Montier typos Link to comment Share on other sites More sharing options...
Harry Rogers Posted August 7, 2020 Share Posted August 7, 2020 Thanks for this I've tried it on a Moto g7 power (Android 9) Using Chrome 84.04147.111 All appears to work as expected. Nice job. Link to comment Share on other sites More sharing options...
JohanC Posted November 24, 2021 Share Posted November 24, 2021 Morning sir, I need this, the link www.unigui.com.br-MobileLockByJS.rar is not found, Can you make it available again please? Thanks Link to comment Share on other sites More sharing options...
alfr Posted November 28, 2021 Share Posted November 28, 2021 Hi, the files is missing - can it be uploaded again? Link to comment Share on other sites More sharing options...
Summer4u Posted June 1, 2023 Share Posted June 1, 2023 Can anyone tell me how to do the Orientation Lock on Landscape for default on my app??? Please? Link to comment Share on other sites More sharing options...
Fred Montier Posted June 29, 2023 Author Share Posted June 29, 2023 All projects are for sale at https://unigui.com.br Soon, uniguiexpress.com will be back on-line. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now