Android Question ProgressDialog not displaying

Declan

Well-Known Member
Licensed User
Longtime User
I am calling a sub with:
B4X:
Sub btnContactsList_Click
    ProgressDialogShow("Creating Contacts List")
    CallSubDelayed(Me,"GetContactList")
End Sub

In sub GetContactList I am creating a List of all the phone contacts and writting this into a SQLite table.
All is great, BUT the ProgressDialog is only displayed after the sub GetContactList is finished.
What am I doing incorrectly that the ProgressDialog is not display when btnContactsList is Clicked?
 

ronell

Well-Known Member
Licensed User
Longtime User
Try instead of showing progressdialog.. change the text of the button to " creating contact list", see if it will update the activity before generating the list
 
Upvote 0

Declan

Well-Known Member
Licensed User
Longtime User
Try instead of showing progressdialog.. change the text of the button to " creating contact list", see if it will update the activity before generating the list
Yes that works.
I do:
B4X:
Sub btnContactsList_Click
'    ProgressDialogShow("Creating Contacts List")
    btnContactsList.Text = "Creating Contacts List"
    CallSubDelayed(Me,"GetContactList")
End Sub
Then in last line of sub GetContactList I do:
B4X:
btnContactsBackup.Text = "Contacts List"
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…