'Parameters: Text As String, 1 view
'Code in DesignerScript:{class}.SetTooltip("Tooltip", Button1)
Public Sub SetTooltip(DesignerArgs As DesignerArgs)
Dim p As Phone
If p.SdkVersion >= 26 Then
Dim Text As String = DesignerArgs.Arguments.Get(0)
Dim viewJO As JavaObject = DesignerArgs.GetViewFromArgs(1)
viewJO.RunMethod("setOnLongClickListener", Array As Object(Null)) 'remove any longClick listener
viewJO.RunMethod("setTooltip", Array As Object(Text))
End If
End Sub