Android Question [Solved] Open app loading message

rscheel

Well-Known Member
Licensed User
Longtime User
Hello I have the following query, I can do as a message when the application loading and allow time to download the data and it can display correctly.

As I attached in the photo.

Screenshot_2015-12-10-07-57-24.png
 

rscheel

Well-Known Member
Licensed User
Longtime User
If I realized it existed, but by placing the process it is so fast that not shown.

I wish I could stop the call to sub that lists data for time synchronized.

I did the following does not work.
B4X:
ProgressDialogShow("Loading..")
Dim count As Long
For i = 1 To 1000
  count = count + 1
Next

If count == 1000 Then
  Lista 'Call the Sub Listview
End If

ProgressDialogHide
 
Upvote 0

lemonisdead

Well-Known Member
Licensed User
Longtime User
it is so fast that not shown
You'd better use a Timer started when your list starts to be filled and stopped when its time is over. In its Tick even, you would call the ProgressDialog.
Using a loop like you've tried is very dangerous and not accurate (the speed will be not the same between two devices).
 
Upvote 0

rscheel

Well-Known Member
Licensed User
Longtime User
At the end achieve solve, thanks for the help.

I leave the solution.

B4X:
Sub Process_Globals
    Dim Tim As Timer
    Dim Tim2 As Timer
    Dim Cort As Int = 0
End Sub

Sub Activity_Create(FirstTime As Boolean)
    If Cort <> 1 Then
        Tim.Initialize("Tim", 1000)
        Tim.Enabled = True
    End If   
End Sub

Sub Tim_Tick
    ProgressDialogShow2("Cargando...", False)   
    Tim.Enabled = False
    Cort = 1
    Tim2.Initialize("Tim2", 3000)
    Tim2.Enabled = True
End Sub

Sub Tim2_Tick
    Lista_Opciones
    ProgressDialogHide
    Tim2.Enabled = False
End Sub

Sub Lista_Opciones
      Code.... Listview
End Sub

I hope someone can help him, he had no knowledge of this topic before, so search the forum, and thanks to the answers to my question achieved resolve the issue.
 
Upvote 0
Top