Fred Montier Posted August 5, 2020 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 only in the pack Silver (Pack 04) at https://www.unigui.com.br/ 2 Quote
epos4u Posted August 6, 2020 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 ? Quote
Fred Montier Posted August 7, 2020 Author 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 Quote
Harry Rogers Posted August 7, 2020 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. Quote
JohanC Posted November 24, 2021 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 Quote
alfr Posted November 28, 2021 Posted November 28, 2021 Hi, the files is missing - can it be uploaded again? Quote
Summer4u Posted June 1, 2023 Posted June 1, 2023 Can anyone tell me how to do the Orientation Lock on Landscape for default on my app??? Please? Quote
Fred Montier Posted June 29, 2023 Author Posted June 29, 2023 All projects are for sale at https://unigui.com.br Soon, uniguiexpress.com will be back on-line. Quote
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.