You can use this code to add an ImageView to a button:
B4X:
Sub SetGraphic(Btn As Button, Graphic As Node)
Dim jo As JavaObject = Btn
jo.RunMethod("setGraphic", Array(Graphic))
End Sub
Dim iv As ImageView
iv.Initialize("")
iv.SetImage(fx.LoadImage(File.DirAssets, "EffectNone.png"))
SetGraphic(button1, iv)
You can use this code to add an ImageView to a button:
B4X:
Sub SetGraphic(Btn As Button, Graphic As Node)
Dim jo As JavaObject = Btn
jo.RunMethod("setGraphic", Array(Graphic))
End Sub
Dim iv As ImageView
iv.Initialize("")
iv.SetImage(fx.LoadImage(File.DirAssets, "EffectNone.png"))
SetGraphic(button1, iv)