Android Question [SOLUTION] help to add click event to CircularProgressBar class?

giggetto71

Active Member
Licensed User
Longtime User
Hi,
I am using this circular progress bar class provided with the below link


I have already made a couple of simple modifications to the class parameters, but now I would need to add the click event ideally both to the inner text (mLbl in the class) and on the circular progressbar itself.

I am sure there is an easy way but I never modified a b4x class to add an event. Any guidance?
thanks
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Add a transparent panel above the view, in DesignerCreateView. This will allow you to handle the touch events.

B4X:
Private Sub Pnl_Touch (Action As Int, X As Float, Y As Float)
    If SomeCondition Then
        If xui.SubExists(mCallBack, mEventName & "_ClickInside", 0) Then '0 = number of parameters - this is needed for B4i
            CallSubDelayed(mCallBack, mEventName & "_ClickInside")
        End If
    End If
End Sub
 
Last edited:
Upvote 0

Sagenut

Expert
Licensed User
Longtime User
Shouldn't this line
B4X:
CallSubDelayed(mCallBack, "mEventName" & "_ClickInside")
being like this?
B4X:
CallSubDelayed(mCallBack, mEventName & "_ClickInside")
 
Upvote 0
Top