fullscreenmode and rect of a substack on mobile device ?

J. Landman Gay jacque at hyperactivesw.com
Thu Aug 23 17:21:42 EDT 2018


On 8/23/18 12:59 AM, Ludovic THEBAULT via use-livecode wrote:
> 
>> Le 22 août 2018 à 22:24, J. Landman Gay via use-livecode <use-livecode at lists.runrev.com> a écrit :
>>
>> On 8/22/18 3:13 PM, J. Landman Gay via use-livecode wrote:
>>> But the stack should still fill the screen and it doesn't.
>>
>> This will resize the stack the same way as your "adapt" handler does, so you can eliminate that entirely:
>>
>> on preopenstack
>>   mobileSetAllowedOrientations("portrait")
>>   iphoneUseDeviceResolution true,true
>>   set the fullscreenmode of stack "ipad" to "exactFit"
>> end preopenstack
> 
> Many thanks for finding that this command !
> Sadly, it’s only for iOS.
> 
> But your previous script must used on android.

The strange thing about your stack is that it doesn't fill the screen on 
an iPad no matter what I try. I turned off FSM entirely, and did this on 
preopenstack:

on preopenstack
   mobileSetAllowedOrientations("portrait")
   set the rect of this stack to the screenrect
end preopenstack

Even that doesn't work. The stack simply won't resize, there are still 
blank areas around all four edges. I next removed the line that sets the 
rect, and allowed LC to resize it by default with the same results.

I decided to try it on Android. PreOpenStack is this:

on preopenstack
   mobileSetAllowedOrientations("portrait")
   set the fullscreenmode of stack "ipad" to "noborder"
end preopenstack

This works perfectly, the entire screen is filled as expected, the "get 
rect" button reports accurate information, and no size adaptation is 
necessary. All objects were placed correctly on screen without distortion.

I then tried it in the iPhone 6 Plus simulator. That worked perfectly 
too. Only the iPad failed. Thinking it might be related to actual size, 
I resized the stack to 640x960 (the screenrect reported on iPad with 
iPhoneUseDeviceResolution true) but that didn't work either.

It would be useful for someone with a real iPad to try a test. If it 
doesn't work there then I think the LC team should look.

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





More information about the use-livecode mailing list