"Responsive" Browser Widget

Sannyasin Brahmanathaswami brahma at hindu.org
Mon Jul 4 15:59:04 EDT 2016


on Mobile if you open Safari (iOS) or Chrome (Android)  and turn your phone sideways, the screen responds automatically by displaying/re-rendering the browser page at the new landscape width.  If you turn your phone back to "upright" it switches back to portrait.

my current methods to try to re-size the stack and browser widget run time are failing. We have a ticket in to HQ on this since February and the bug is confirmed…

http://quality.livecode.com/show_bug.cgi?id=16965

yet to be fixed.   In the meantime this is a blocker… has anyone found another method to get this done?

Perhaps we need to create the browser widget to the new orientation/size, set the URL, *after* the stack is resized to the new rect, create the browser widget and  then delete it again before switching orientations. If you have this working already please so share an example stack.

use case is that our app will have modules (independent stacks) where some cards require the landscape orientation, others the portrait orientation, some will want to have portrait browser widget, others for movies or HTML 5 games will want to be in landscape orientation, and this, ideally, can be done in all in one stack with some magic… there is no problem with runtime re-orientation geometry for native LC controls… switching e.g. 414w X 736H to 736w x 414h (and thereby forcing the user to turn their phone) works… only the browser widget is mis-behaving.

I haven't even tried to query mobileOrientation() yet… and "flip" the browser widget… we know it would fail and for we can live with a behavior that forces the user to stay in one orientation.

So perhaps someone has a better architecture/method where it actually works?

Thanks!

BR



More information about the use-livecode mailing list