I display an image with the following code. (reduced for clarity)
When assigning the Bitmap the image immediately displays. This code has been in use for years and years and has never been an issue.
I am now testing a device with Android 5.1.1. When running the compiled code (or in debug mode but not single stepping) after assigning the Bitmap it takes 9 seconds before it shows. But if I single step it displays immediately.
I've tried adding
after assigning the Bitmap but it doesn't have an effect.
If I add a 1 millisecond timer at the end of the PlayImage Sub and add a breakpoint in the timer Tick event then it shows immediately. If I remove the breakpoint it takes 9 seconds.
Any ideas what is causing this? Alternatively is there a way to force the draw of the image immediately?
B4X:
Sub Globals
Dim libImage As ImageView
End Sub
Sub PlayImage
libImage.Bitmap = LoadBitmap(...)
End Sub
When assigning the Bitmap the image immediately displays. This code has been in use for years and years and has never been an issue.
I am now testing a device with Android 5.1.1. When running the compiled code (or in debug mode but not single stepping) after assigning the Bitmap it takes 9 seconds before it shows. But if I single step it displays immediately.
I've tried adding
B4X:
libImage.Invalidate
Sleep(0)
If I add a 1 millisecond timer at the end of the PlayImage Sub and add a breakpoint in the timer Tick event then it shows immediately. If I remove the breakpoint it takes 9 seconds.
Any ideas what is causing this? Alternatively is there a way to force the draw of the image immediately?