Android Question needs a simple example of using the progress bar

Valeriy Lakhtin

Member
Licensed User
Help me find a simple example for dumes. I want to use a progress bar in Activity. I have a procedure that creates Activity and progress bar inside Activity. In this Activity is a button, that runs another outside procedure that run a loop, that makes long data processing. How I can changing the setting progress bar in Activity, from my loop in outside procedure?
 

Valeriy Lakhtin

Member
Licensed User
I found the solution, for me needs to use DoEvents in the cycle. Then Activity ( or Form for VBA), will be updated and Progress Bar too. I am ashamed that I am 20 years old I program in the VBA but only now understand why need DoEvents :)
 
Upvote 0

techknight

Well-Known Member
Licensed User
Longtime User
Tight loops are never a good thing anyway. I have learned with B4A, and android in general you really need to return back to the OS idle state, and use a timer or event to re-trigger your routines/advance progress bar.
 
Upvote 0
Top