ControlImage.setImage flickering even when cached
#1
I am creating a Window object, and displaying it using doModal. Inside the window there is a ControlImage which fill the whole window. I listen for the actions and whenever I receive ACTION_MOVE_(UP/LEFT/DOWN/RIGHT) action, I change the image using setImage. The images are fetched from a remote server, and I have enabled caching. The problem is that even after the images being cached, you can frequently see flickering, or the black screen behind the image while changing the image. I am sure the images are cached, and I believe having it any other way will not improve the loading anymore.

Is this a load issue? or is it only a problem of the UI not detecting the change and refreshing? Can this be improved?
Most importantly, can I at least force the ControlImage to retain its image until the next image is completely loaded from the remote source and then show it, instead of showing the black background while fetching it?
Reply
#2
Well, seeing that there is no explanation for this flickering or delay of rendering, I had to hack through it. I placed two ControlImage controls over each other. Then I set them both to the same image, and save the URL. Once I decide to switch the image, I set the one below to the same old URL (no change), and I switch to the new one only in the upper one. After I set them both, one with the saved URL and the other with a new URL, I save the new URL to be used in future image changes. All this will cause the upper one to turn transparent while loading the image, showing the one below it (which is the same old image). This will give the illusion of the image not changing while it is loading the newer image. Once the newer image is loaded, it will appear over the one behind. It works perfectly, but this is not the solution I've hoped for.
Reply

Logout Mark Read Team Forum Stats Members Help
ControlImage.setImage flickering even when cached0