Artifacts on screen from closed stacks on Android

J. Landman Gay jacque at hyperactivesw.com
Sun Jan 28 16:23:54 EST 2018


On 1/28/18 2:04 PM, Sannyasin Brahmanathaswami via use-livecode wrote:
> Entire image map of Stack B is not fully rendered.. even get some bizarre tiles or squares with odd colors or image data from Stack A, and only one area of Stack B is rendered like some weird inlay or overlay on top of the pixel map of Stack A.
> 
> Again, all stacks have their stack and window set to destroy and are explicitly closed after Stack B is opened. You must have a stack open and visible on Mobile or the app will crash, so that's why we leave Stack A open and only close it*after*  Stack B is opened.
> 
> I have no recipe for this, and so HQ is at a loss.

This issue has been around a very long time, and the simplest way to 
reproduce it is to open the stack on any device that has a different 
screen ratio than the one set during development. For example, in your 
app which was set to accomodate iPhone 6 Plus, I see the problem when I 
open the app on a Nexus 7 tablet.

To save processing time and power, LC only redraws the area inside the 
card rectangle. It does not redraw any part of objects that lie outside 
that area. We really do need a "redraw card" command, but for now you 
can force a redraw by either hiding and then showing the offending 
object, or by resetting it. Since your object is an image, you can reset 
it with: set the imagdata of img x to the imagedata of img x. Or, if 
it's a referenced image, just set its filepath again.

I have a header group in another app that extends far beyond the width 
of the original card in order to accomodate any screen ratio. For this, 
I hide the header group on closecard and re-show it on preOpenCard for 
those cards that use the header.

We shouldn't need to do this, but I understand why LC doesn't deal with 
areas that lie outside the card boundaries. Maybe we need a property 
that instructs LC whether or not to redraw everything regardless of 
object positioning.

I suppose another way to avoid the problem would be to just make every 
stack square and let fullscreenMode noBorder clip the edges.

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




More information about the use-livecode mailing list