Hi there
I have a universal sub inside a class that I want to use to generate icons as defined below. I am using 'Me' in the class to self reference it.
For BANanoMaterialIcon, Initialize(Me... expects a global variable, I have called it App.
If I put this code at module level and replace Me with App, everything works. Im sure Im missing something somewhere.
I have a universal sub inside a class that I want to use to generate icons as defined below. I am using 'Me' in the class to self reference it.
B4X:
Sub getMaterialIcon(sID As String, sIconName As String, iconPos As String, sIconTheme As String, sIconCircle As Boolean, bWave As Boolean, bCursor As Boolean, bPrefix As Boolean, bClose As Boolean) As String
'check if floating buttons and make icon a circle
If sIconName.Length > 0 Then
Dim icn As BANanoMaterialIcon
icn.Initialize(Me, sID & "icon",sIconName,sIconTheme)
icn.IconName = sIconName
icn.Alignment = iconPos
icn.AddCursor = bCursor
icn.Circle = sIconCircle
icn.WavesEffect = bWave
icn.Prefix = bPrefix
icn.Theme = sIconTheme
icn.Close = bClose
Return icn.ToString
Else
Return ""
End If
End Sub
For BANanoMaterialIcon, Initialize(Me... expects a global variable, I have called it App.
If I put this code at module level and replace Me with App, everything works. Im sure Im missing something somewhere.