B4A Library ProgressWheel v0.22

Discussion in 'Additional libraries, classes and official updates' started by DonManfred, Jan 31, 2015.

  1. DonManfred

    DonManfred Expert Licensed User

    • pgWheel
      • onClick (value As Object)
      • AddToParent (Parent As ViewGroup, left As Int, top As Int, width As Int, height As Int)
      • DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)
      • Initialize (EventName As String)
      • bringToFront
      • buildDrawingCache
      • buildDrawingCache2 (autoscale As Boolean)
      • clearAnimation
      • computeScroll
      • incrementProgress
        Increment the progress by 1 (of 360)
      • isSpinning As Boolean
      • spin
        Puts the view on spin mode
      • stopSpinning
        Turn off spin mode
      • BarColor As Int
      • BarLength As Int
      • BarWidth As Int
      • CircleColor As Int
      • CircleRadius As Int
      • Clickable As Boolean [write only]
      • ContourColor As Int
      • ContourSize As Float
      • DelayMillis As Int
      • Enabled As Boolean [write only]
      • FadingEdgeLength As Int [write only]
      • Focusable As Boolean [write only]
      • FocusableInTouchMode As Boolean [write only]
      • Id As Int [write only]
      • Left As Int
      • MinimumHeight As Int [write only]
      • MinimumWidth As Int [write only]
      • PaddingBottom As Int
      • PaddingLeft As Int
      • PaddingRight As Int
      • PaddingTop As Int
      • Progress As Int [write only]
        Set the progress to a specific value
      • RimColor As Int
      • RimShader As Shader [write only]
      • RimWidth As Int
      • SpinSpeed As Int
      • Tag As Object [write only]
      • Text As String [write only]
      • TextColor As Int
      • TextSize As Int
      • Top As Int

    Sub Globals
    'These global variables will be redeclared each time the activity is created.
        'These variables can only be accessed from this module.
        Dim pg1, pg2 As pgWheel
    End Sub
    Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
        pg1.CircleRadius = 
        pg1.RimWidth = 
        pg1.SpinSpeed = 

        pg2.CircleRadius = 
        pg2.RimWidth = 
        pg2.SpinSpeed = 
        pg2.BarColor = 
        pg2.ContourSize = 
        pg2.RimColor = 
        pg2.CircleColor = 
        pg2.Text = 
    "Hallo World"
    End Sub


    Attached Files:

    Last edited: Feb 1, 2015
  2. Douglas Farias

    Douglas Farias Expert Licensed User

    Works on old android versions? what minimal?
  3. DonManfred

    DonManfred Expert Licensed User

    Probably yes
    i dont know. Just try it :)
    Johan Schoeman and Peter Simpson like this.
  4. DonManfred

    DonManfred Expert Licensed User

    Updated ProgressWheel to v0.20

    - Added support for Designer.
    Peter Simpson and wineos like this.
  5. Peter Simpson

    Peter Simpson Expert Licensed User

    I'll have to use this library one day :) cheers...
  6. Michael Höpner

    Michael Höpner Member Licensed User

    Hi DonManfred
    my question: How can i make the wheel to diappear?
    There is no "sendtoback" or how can i >distroy< the wheel?
    When it will be able Please answer
  7. DonManfred

    DonManfred Expert Licensed User

    in v0.22 you can set the visibility.
    Lib is uploaded to Post #1

    Sub btnhide_Click
        If pg2.Visible Then
            pg2.Visible = 
            pg2.Visible = 
    End If
    End Sub
    thedesolatesoul likes this.
  8. Michael Höpner

    Michael Höpner Member Licensed User

    Hello DonManfred
    Thank you for your promt reply.
    Peter Simpson likes this.
  9. bluedude

    bluedude Well-Known Member Licensed User


    Could you make the inner circle like a clickable button that has a pressed effect? I want to use this as a round button that starts to spin when clicked and stops when the process is finished.

  10. DonManfred

    DonManfred Expert Licensed User

    There is no inner or outer object. It is ONE object. I can make the hole button clickable though.
  11. bluedude

    bluedude Well-Known Member Licensed User

    Clickable would be cool but it would need to have pressed states etc. I just solved it by adding a normal button with big rounded corners (half size of width and height).

    Can you add height and width properties to the object so that I can resize my normal button precisely inside the progress wheel?

    The end result is pretty good. Did not test transparancy yet on a photo background.

    The middle white button is clickable and has borders etc. I will use the combined solution for scanning nearby objects (iBeacons etc.) When the button is clicked it will start spinning until all results are found.

    Attached Files:

  12. Alberto Michelis

    Alberto Michelis Active Member Licensed User

    I need it for Subs long jobs
    I initialize like:

    ww.CircleRadius = 80
    ww.RimWidth = 10
    ww.SpinSpeed = 4

    But when I want to use
    in a sub I get a java error Null pointer exception

    whats wrong?

    Another problem is, when I am , by ex, refreshing a customlistview it stops spinnig and then it is of no use ata all.

  13. Taha

    Taha Member Licensed User

    What is computeScroll?
    onClick (value As Object) - what value is generated?
  14. sultan87

    sultan87 Active Member Licensed User

    how to put the text on several lines ?
    best regards
  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