Had a challenge getting the ProgressDialogShow2 to show. Read some posts about DoEvents. I get the warning "DoEvents is depricated. Use Sleep(0)".
Sleep(0) alone did not work for me.
DoEvents alone did not work for me.
Using BOTH does work. I guess its no big deal ...
Sleep(0) alone did not work for me.
DoEvents alone did not work for me.
Using BOTH does work. I guess its no big deal ...
B4X:
Sub DisplayOneCategory(inID As Int)
ProgressDialogShow2("Loading Products...",False)
Sleep(0)
DoEvents
Dim qList As List
SQLText = "SELECT iditem, mname, moos, mthc, mcbd FROM items WHERE idcategory = " & inID & _
" AND mhide = 0 ORDER BY items.msort"
qList = DBUtils.ExecuteMemoryTable(Starter.SQL1,SQLText,Null,0)
For j = 0 To qList.Size - 1
Dim iRecord() As String = qList.Get(j)
Dim rHeight As Int
If Main.isTablet Then
If Main.fLandscape Then
rHeight = 180dip
Else
rHeight = 295dip
End If
Else
rHeight = 145dip
End If
Dim cli As Panel = CreateItemListItem(iRecord(0),iRecord(1),iRecord(3),iRecord(4), iRecord(2), 100%x, rHeight)
clvProducts.Add(cli,iRecord(0))
Next
ProgressDialogHide
End Sub