fullscreenmode and rect of a substack on mobile device ?

J. Landman Gay jacque at hyperactivesw.com
Sun Aug 19 18:31:54 EDT 2018


Android does receive orientationChanged messages. I've been tinkering 
with Swami's test stack, and dynamic positioning (no fullscreenMode) 
works fine with some effort.

The footer isn't a widget, it's a group containing half a dozen 
controls, so they all need to be individually managed. You were right 
that they weren't in the correct position on Android.

Swami's real project has thousands of controls over many hundreds of 
unique cards. I'd hate to be the one to write all the positioning 
scripts for that. But for a single instance where he's having issues, 
turning off fullscreenMode for just that card is a feasible solution.

On 8/19/18 4:05 PM, Brian Milby via use-livecode wrote:
> You probably still want to set the rect for the footer to be sure it lands
> where you want it on different size devices.  That could be done in the
> preOpenCard handler (just put it where it needs to be for portrait)
> 
> on preOpenCard
>     local tWidth, tHeight, tFooterRect
>     put the width of this stack into tWidth
>     put the height of this stack into tHeight
>     if tWidth > tHeight then
>        put 0,tWidth-50,tHeight,tWidth into tFooterRect
>     else
>        put 0,tHeight-50,tWidth,tHeight into tFooterRect
>     end if
>     set the rect of widget "footer" of me to tFooterRect
>     resizeStack tWidth, tHeight
> end preOpenCard
> 
> If the Pixel does receive the orientationChanged messages, then you could
> use my first example.  That code does actually work on the iPhone, it is
> just not necessary to manage it by hand like that.
> 
> On Sun, Aug 19, 2018 at 2:40 PM, Sannyasin Brahmanathaswami via
> use-livecode <use-livecode at lists.runrev.com> wrote:
> 
>> @Brian Milby


-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list