Unrelated - but I see you seem to be using the Dialogs library. I suggest you switch to Dialogs2 and ensure you are using the async calls to show dialogs.
Note the separate download for an updated Dialogs2 class that fixes a bug in the original. I wrote the original Dialogs library many moons ago and it has suffered with age owing to the changes made to Android and B4A over the years despite the administrations of several other people. Although...