Hi,
I have a spinner with a drop down list and a itemclick which activate a SQLtableread.
How do I code a progressbar to start when a spinner_itemclick is selected until the scrollview is shown?
Tks.
I have a spinner with a drop down list and a itemclick which activate a SQLtableread.
How do I code a progressbar to start when a spinner_itemclick is selected until the scrollview is shown?
Tks.
B4X:
Sub spinpage2_itemclick (position As Int, value As Object)
pb.BringToFront
pb.Visible = True
pb.Progress = 1
lblValue1_P2.Text = spinpage2.SelectedItem
SQLTableRead
End Sub
Sub SQLTableRead ' Reads the SQL data base
Dim i As Int
Dim Cursor1 As Cursor
Dim txt, wtxt As String
txt = "SELECT name FROM table WHERE name LIKE '%"&lblValue1_P2.Text&"%'"
Cursor1 = SQL1.ExecQuery(txt)
Dim Col(NumberOfColumns) As String
SetHeader(ColumnName)
NumberOfRows = 0
For i = 0 To Cursor1.RowCount - 1
Dim Col(NumberOfColumns) As String
Cursor1.Position = i
For j = 0 To NumberOfColumns - 1
Col(j) = Cursor1.GetString(ColumnName(j))
Next
AddRow(Col)
Next
Cursor1.Close
Activity.Title = DBFileName
pb.Progress = 100
End Sub