Stack resize in Android/IOS
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Stack resize in Android/IOS
In the real world in a mobile environment - what is going to cause the need to resize a stack?
- the app first being opened on the device
- change in device orientation
- what else?
Background - I'm coming to the conclusion that I've implemented massive over-kill in my resize stack handling. I'm effectively running a resize operation every time that a card is opened or re-opened. This must be slowing down screen re-draw times on my app. I'm now thinking that I'd be OK, in my portrait only app, to only resize a card the very first time that that card is opened on device X. Is this correct, or can users drag a window on an Android or IOS app? I've never dragged a window for any app on any of my mobile devices, but maybe I am just a Luddite and the cool kids are dragging app windows all of the time.
Thanks in advance
Kim
- the app first being opened on the device
- change in device orientation
- what else?
Background - I'm coming to the conclusion that I've implemented massive over-kill in my resize stack handling. I'm effectively running a resize operation every time that a card is opened or re-opened. This must be slowing down screen re-draw times on my app. I'm now thinking that I'd be OK, in my portrait only app, to only resize a card the very first time that that card is opened on device X. Is this correct, or can users drag a window on an Android or IOS app? I've never dragged a window for any app on any of my mobile devices, but maybe I am just a Luddite and the cool kids are dragging app windows all of the time.
Thanks in advance
Kim
Re: Stack resize in Android/IOS
Why are you resizing when you can use fullscreenmode?
Re: Stack resize in Android/IOS
Any app is fullscreen, you can't resize the app.
Unfortunately the geometry manager still doesn't work on mobile, so you need to reposition all items on the card via code in the Preopencard message.
If you app is just graphic or with few text, you can avoid to reposition all items; just use the FullScreenmode property.
Click on the underlined link to see more.
Unfortunately the geometry manager still doesn't work on mobile, so you need to reposition all items on the card via code in the Preopencard message.
If you app is just graphic or with few text, you can avoid to reposition all items; just use the FullScreenmode property.
Click on the underlined link to see more.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
Re: Stack resize in Android/IOS
I know this is an old thread, but I've discovered why the geometry manager wasn't working on mobile. (Well, I only actually verified on iOS, but am guessing it is the same for Android). I've attached a test stack that I built on my system.
The Add... button will add the revCommonLibrary script to back (which is contained in the Common button)
If you touch grow/shrink right after launch, nothing is repositioned/scaled.
After you add the backscript, then the objects will adjust.
The email functionality changes when using the common library, so a button is included so you can see the difference.
The only function that you really need is:
(Note that you will need to include correctly sized screen shots on iOS for the "fullscreen" to work correctly. I'm not sure about Android.)
The Grow/Shrink buttons will take the stack from iPhone 4 size to full screen and back.The Add... button will add the revCommonLibrary script to back (which is contained in the Common button)
If you touch grow/shrink right after launch, nothing is repositioned/scaled.
After you add the backscript, then the objects will adjust.
The email functionality changes when using the common library, so a button is included so you can see the difference.
The only function that you really need is:
Code: Select all
function revTargetStack pWhich
- Attachments
-
- GeoTest.livecode.zip
- Geometry Test Stack
- (15.87 KiB) Downloaded 197 times
Brian Milby
Script Tracker https://github.com/bwmilby/scriptTracker
Script Tracker https://github.com/bwmilby/scriptTracker
Re: Stack resize in Android/IOS
I guess the "in-call status bar" (or "Personal Hotspot"/"Location") on iOS would also affect the size of the stack. I'm right now trying to figure out how to detect when the status bar is active, so I can resize the stack (move up the nav bar), but yet I haven't managed it...
Regards,
Tom
Re: Stack resize in Android/IOS
Sorry for the delay. I haven't been on the forums for several months. Thanks for your comments / advice.
I've ended up writing my more recent android apps so that they only position graphical elements when the app first starts - and I haven't spotted any problems with this approach. It seems that in 2015 and 2016 I had completely mis-understood the need to resize. Hopefully this case of pilot error is now sorted.
Regards
Kim
I've ended up writing my more recent android apps so that they only position graphical elements when the app first starts - and I haven't spotted any problems with this approach. It seems that in 2015 and 2016 I had completely mis-understood the need to resize. Hopefully this case of pilot error is now sorted.
Regards
Kim