Android Question B4XPages Scroll Maps Google Very slow

XorAndOr

Active Member
Licensed User
Longtime User
Hi to all
In my app that makes use of google maps
in a page I need to insert a Msgbox2Async
for the user that informs if he wants
to return to the menu page.
B4X:
'Return to MainPage
Private Sub Button1_Click
    Dim sf As Object = xui.Msgbox2Async("Return to MainPage?", "MapsGoogle", "Yes", "", "No", Null)   
    Wait For (sf) Msgbox_Result (Result As Int)
    If Result = xui.DialogResponse_Positive Then
        B4XPages.ShowPage("MainPage")
    End If
End Sub

But when I press (Yes) on the msgbox,
for return on the main page, and next return
on the page maps, the scroll of the map is very slow
and I don't understand what the problem is.
If you want to test the attached example
please enter your apy key in the manifest.
B4A 11.0 - Mode Release - Android SDK update
Thanks for your help
 

Attachments

  • Project.zip
    17.3 KB · Views: 208

roumei

Active Member
Licensed User
I don't know why but it works if you add a Sleep(100) before calling B4XPages.ShowPage("MainPage"):
B4X:
Private Sub Button1_Click
    Dim sf As Object = xui.Msgbox2Async("Return to MainPage?", "MapsGoogle", "Yes", "", "No", Null)   
    Wait For (sf) Msgbox_Result (Result As Int)
    If Result = xui.DialogResponse_Positive Then
        Sleep(100)
        B4XPages.ShowPage("MainPage")
    End If
End Sub
 
Upvote 0
Top