Android Question Change Value CircularProgressBar In CustomListView

I have One CustomListView With 10 Items
And For All Item I Uses CircularProgressBar (Add In Designer)
How Can Change Value CircularProgressBar In CustomListView When Click Item CustomListView?

B4X:
Sub Button_Click
    Dim Index As Int = Clv_Main.GetItemFromView(Sender)
    Dim Pnl As Panel = Clv_Main.GetPanel(Index)
    Dim Pr_Circel As ? = Pnl.GetView(0)
End Sub
 

mangojack

Well-Known Member
Licensed User
Longtime User
Dim Pr_Circel As CircularProgressBar = Pnl.GetVie(0).Tag

Unlike other custom views ... the CircularProgressBar class does not set the views mbase to a Tag variable.

Quoting @Erel ... "That specific custom view was indeed created before the convention of setting the base tag property."


For this to work , make the following changes to the Views class module.

B4X:
Sub Class_Globals
    Private mEventName As String 'ignore
    Private mCallBack As Object 'ignore
    Public Tag As Object   '<<<

Public Sub DesignerCreateView (Base As Object, Lbl As Label, Props As Map)
    mBase = Base
    Tag = mBase.Tag : mBase.Tag = Me   '<<<

Cheers
 
Upvote 1
Unlike other custom views ... the CircularProgressBar class does not set the views mbase to a Tag variable.

Quoting @Erel ... "That specific custom view was indeed created before the convention of setting the base tag property."


For this to work , make the following changes to the Views class module.

B4X:
Sub Class_Globals
    Private mEventName As String 'ignore
    Private mCallBack As Object 'ignore
    Public Tag As Object   '<<<

Public Sub DesignerCreateView (Base As Object, Lbl As Label, Props As Map)
    mBase = Base
    Tag = mBase.Tag : mBase.Tag = Me   '<<<

Cheers
[SOLVED] Thank You mangojack And jahswant
 
Upvote 0
Top