3

I made an app in LiveCode - calculator. I was doing it by these (https://livecode.com/lessons/calculator/) instructions and it is scaled to fit iPhone. I need it to fit different mobile phones that run Android (Samsung, GSmart, LG etc). I went through most of this site and also LiveCode forums and help (http://lessons.livecode.com/m/4071), there's nothing about Android phones, only iOS stuff. I also tried

on preOpenStack set the fullscreenmode of me to "exactFit" end preOpenStack

but I don't know if it's working (haven't saved it as standalone app, wanted to do this first).

Thank you for your answers.

U.Evans
  • 31
  • 3

1 Answers1

0

I have an Android tablet and a cheap LG phone running Android. On the tablet. I can use every mode, but on the phone one or more don't work. Perhaps the screen is too small. Perhaps you have run into the same problem. You could try different modes, such as letterbox, noBorder and showAll.

In the past, I have had situations where I had to let the engine draw the card before setting the fullscreenMode:

on openStack
  send "initializeStack" to me in 0 millisecs
  pass openStack
end openStack

on initializeStack
  set the fullscreenMode of this stack to "exactFit"
end initializeStack

I don't know if this is still useful with the latest 8.x release.

Another solution would be to set the rect of the stack to the screenRect and to add a script that adjusts the location of every object, e.g. if you have a field 1, you would have the following on your script:

on initializeStack
  set the rect of this stack to the screenRect
  put the rect of this cd into myRect
  add 4 to item 1 of myRect
  add 4 to item 2 of myRect
  subtract 4 from item 3 of myRect
  subtract 4 from item 4 of myRect
  set the rect of fld 1 to myRect
end initializeStack
Mark
  • 2,380
  • 11
  • 29
  • 49