I'm trying to capture an image loaded with multiple views loaded with SimpleMediaManager but I can't get all the images to display. I've tried adding a sleep but it doesn't work either.
B4X:
Private Sub Button1_Click
pnlSnapshot.Color = xui.Color_Cyan
If pnl1.NumberOfViews > 0 Then pnl1.RemoveAllViews
If pnl2.NumberOfViews > 0 Then pnl2.RemoveAllViews
If pnl3.NumberOfViews > 0 Then pnl3.RemoveAllViews
If pnl4.NumberOfViews > 0 Then pnl4.RemoveAllViews
LoadImages
Sleep(300)
pnlSnapshot.SetBitmap(pnlImages.Snapshot)
End Sub
Private Sub LoadImages
Dim ListPanels As List = Array As B4XView(pnl1, pnl2, pnl3, pnl4)
For Each pnl As B4XView In ListPanels
MediaManager.SetMediaFromFile(pnl, File.DirAssets, "img.png", "image/*", CreateMap(MediaManager.REQUEST_BACKGROUND: xui.Color_Transparent, MediaManager.REQUEST_CALLBACK: Me))
Wait For (pnl) SMM_MediaReady (Success As Boolean, Media As SMMedia)
Next
End Sub