Android Question Progress dialog not working

George Anifantakis

Member
Licensed User
In the below sub progressdialog is not working.

The process from progressdialogshow to progressdialoghide takes about 3 seconds to complete. If i set a breakpoint after progress dialog is showing correctly.


Sub ChooseTaxLoad

ProgressDialogShow("Loading.. Please wait..")
cGen.InitTaxonomy(True)

For wii = 0 To Main.mTax.Size - 1
Dim chk As CheckBox
Dim cDescr As Label
Dim pTax As Panel
pTax.Initialize("")
pTax.Color = Colors.RGB(Main.wMain(0), Main.wMain(1), Main.wMain(2))
chk.Initialize("chk")
cGen.SetCBDrawable(chk,Colors.Black, 2Dip,Colors.black, Chr(10004),Colors.LightGray, 20Dip ,2dip)
cDescr.Initialize("cDescr")
cDescr.Gravity = Gravity.CENTER_VERTICAL
cDescr.TextColor = Colors.Black
Dim PrevChoice As String = cGen.IIF(Main.wini.ContainsKey("TaxChoice") = True Then Main.wini.get("TaxChoice") Else "")
cDescr.Text = Main.mTax.GetValueAt(wii)
pTax.AddView(chk, 0dip, 1dip, 50dip, height - 4dip)
pTax.AddView(cDescr, chk.Width - 10 , 1dip, 70%x, cGen.GetObjWitdhHei(cDescr,False) + 20)
clvChoice.Add(pTax, cDescr.height , wii)
Next
cpChooseCateg.Visible = True
cpChooseCateg.BringToFront
ProgressDialogHide

End Sub
 

NJDude

Expert
Licensed User
Add a DoEvents inside that For...Next loop.

One more thing, when posting code, please use the [code] ... [/code] tags.
 
Top