Android Question How to make animated progress bar ?

IslamQabel

Active Member
Licensed User
Longtime User
It is the first time to use progress bar, my case is calculating percentage for example: x1= (X/250)*100...x1 will take values from 0 to 100 ....How to transfer value of x1 into progress of the progress bar ?

i want simple code that i can understand it good

thanks
 

IslamQabel

Active Member
Licensed User
Longtime User
Hi....
Sleep(time) is not recognized

error message :
Error description: Undeclared variable 'sleep' is used before it was assigned any value.
Occurred on line: 54
Sleep(Time)
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
Requires B4A 7+. You probably use an old version
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
Search the forum, there are many libraries for ProgtessBar.
 
Upvote 0

IslamQabel

Active Member
Licensed User
Longtime User
progressbar1.progress ............does not work

if i write it as = x ................error
if i leave it alone also error ??
in site documentation...it sets or gets the progress value
 
Upvote 0

Jeffrey Cameron

Well-Known Member
Licensed User
Longtime User
The default progress bar will only render the "system default" appearance for the progress bar. If you want something more complex you will need to make your own control/view.

For an example of how to do something such as that, see this thread: LED bar VU meter
 
Upvote 0

IslamQabel

Active Member
Licensed User
Longtime User
there some commands in default libaray, like
SetBackgroundImage (Bitmap As android.graphics.Bitmap) As BitmapDrawable
SetColorAnimated (Duration As Int, FromColor As Int, ToColor As Int)

are these commands not working?
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
there some commands in default libaray, like
SetBackgroundImage (Bitmap As android.graphics.Bitmap) As BitmapDrawable
SetColorAnimated (Duration As Int, FromColor As Int, ToColor As Int)

are these commands not working?
you probably did not understand o_O, you have a version too old and many keyword do not exist.
Sleep Animated etc ...

You should buy a newer version (now 8.30+) to use the potential of B4A


If you want to use an older version of older libraries with few functions ;)
Use the bold as you did :p
 
Upvote 0

IslamQabel

Active Member
Licensed User
Longtime User
i understand that i am using an old version, but i am just trying to build a quick solution with my very limited old version but soon i will buy the newest one

But i will ask if the new version will deal with my old codes or will cause some conflict as happens before with version V5 when i was compiling codes written by V4.3 and some error messages displayed.....so that issue make me hesitating if i upgrade to the V 8.3 , i am afraid that new version displays errors

anyway thanks for help
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
i understand that i am using an old version, but i am just trying to build a quick solution with my very limited old version but soon i will buy the newest one

But i will ask if the new version will deal with my old codes or will cause some conflict as happens before with version V5 when i was compiling codes written by V4.3 and some error messages displayed.....so that issue make me hesitating if i upgrade to the V 8.3 , i am afraid that new version displays errors

anyway thanks for help
With the new version you can use the latest examples and then you can update your code and get assistance.

Anyway if you use the native ProgressBar, even if less powerful, but it also works in the dated versions of B4A.
If you need an advanced ProgressBar then you must necessarily use a more recent version.
 
Upvote 0

moster67

Expert
Licensed User
Longtime User
Here is a thread about changing color of the standard progress bar which probably should work with older versions of B4A too.
Anyway, you really should upgrade.
 
Upvote 0

RB Smissaert

Well-Known Member
Licensed User
Longtime User
i understand that i am using an old version, but i am just trying to build a quick solution with my very limited old version but soon i will buy the newest one

But i will ask if the new version will deal with my old codes or will cause some conflict as happens before with version V5 when i was compiling codes written by V4.3 and some error messages displayed.....so that issue make me hesitating if i upgrade to the V 8.3 , i am afraid that new version displays errors

anyway thanks for help

You could always make a very simple progressbar with a label and filling it up with for example the | character in the loop.

RBS
 
Upvote 0
Top