Android Question How to make animated progress bar ?

Discussion in 'Android Questions' started by IslamQabel, Jun 10, 2018.

  1. IslamQabel

    IslamQabel Active Member Licensed 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
     
  2. Star-Dust

    Star-Dust Expert Licensed User

  3. IslamQabel

    IslamQabel Active Member Licensed 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)
     
  4. Star-Dust

    Star-Dust Expert Licensed User

    Requires B4A 7+. You probably use an old version
     
  5. IslamQabel

    IslamQabel Active Member Licensed User

    yes......V4.3
     
  6. IslamQabel

    IslamQabel Active Member Licensed User

    i just want simple progress bar........iust empty tube filled with green
    can i use progress bar type ?
     
  7. Star-Dust

    Star-Dust Expert Licensed User

    Search the forum, there are many libraries for ProgtessBar.
     
  8. IslamQabel

    IslamQabel Active Member Licensed User

    like what? i used the default progress bar but without success
     
  9. Star-Dust

    Star-Dust Expert Licensed User

  10. IslamQabel

    IslamQabel Active Member Licensed User

    searched it before but no success but anyway i will try again
    thanks a lot
     
  11. IslamQabel

    IslamQabel Active Member Licensed 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
     
  12. IslamQabel

    IslamQabel Active Member Licensed User

    i want just simple example or tutorial to be familiar with the library
     
  13. IslamQabel

    IslamQabel Active Member Licensed User

    how to change the color and insert an image instead of the default tube background?
     
  14. Jeffrey Cameron

    Jeffrey Cameron Active Member Licensed 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
     
  15. IslamQabel

    IslamQabel Active Member Licensed 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?
     
  16. Star-Dust

    Star-Dust Expert Licensed User

    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
     
  17. IslamQabel

    IslamQabel Active Member Licensed 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
     
  18. Star-Dust

    Star-Dust Expert Licensed User

    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.
     
  19. moster67

    moster67 Expert Licensed 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.
     
  20. RB Smissaert

    RB Smissaert Active Member Licensed User

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

    RBS
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice