I seem to have my app stuck repeatedly entering acsfMap_Draw in the following (where acsfmap is an Accelerated Surface):
I'm setting acsfMap.Enabled to False or True elsewhere (e.g. in Activity_Create or Activity_Resume). acsfMap is initialized & view added in Activity_Create.
Could the cause be due to not using CallSubDelayed rather than using the Msgbox command above? I've been trying to find an example of this without success. i did not understand the posts about CallSubDelayed in the Dev Forum. Could anyone point me to an explanation and/or an example of it?
B4X:
Sub acsfMap_Draw (AC As AS_Canvas)
Dim xc, yc, x1, y1, x2, y2, x3, y3 As Int
Msgbox("ScreenX="&MapPoint.ScreenX&",ScreenY="&MapPoint.ScreenY, "acsf_Draw")
If Not(acsfMap.Enabled) Then
Msgbox("Not drawing "&"acsfMap.Enabled="&acsfMap.Enabled, "acsfMap_Draw")
Return
End If
I'm setting acsfMap.Enabled to False or True elsewhere (e.g. in Activity_Create or Activity_Resume). acsfMap is initialized & view added in Activity_Create.
Could the cause be due to not using CallSubDelayed rather than using the Msgbox command above? I've been trying to find an example of this without success. i did not understand the posts about CallSubDelayed in the Dev Forum. Could anyone point me to an explanation and/or an example of it?