Sub Class_Globals
...
Private mTextColor As Int = xui.Color_Black 'nuova variabile aggiunta
Public mLabel As B4XView 'nuova variabile aggiunta
End Sub
...
Public Sub DesignerCreateView (Base As Object, lbl As Label, Props As Map)
...
mLabel = lblTemplate ' nuova riga
mTextColor = mLabel.TextColor ' nuova riga
End Sub
' Call Refresh once new property of mLabel is set
'Usage example:
'<code>
'glbAnimatedCounter1.mLabel.TextColor = xui.Color_Green
'glbAnimatedCounter1.mLabel.Font = fx.CreateFont("System", 25, False, False)
'glbAnimatedCounter1.Refresh</code>
Public Sub Refresh ' nuova sub aggiunta da richiamare una volta impostati i valori di mLabel
Dim bmp As B4XBitmap = CreateBitmap(mLabel)
For i = 0 To lstImageViews.Size - 1
Dim iv As B4XView = lstImageViews.Get(i)
iv.SetBitmap(bmp)
Next
End Sub