iOS Question Toolbar button Initialize Bitmap

Emme Developer

Well-Known Member
Licensed User
Longtime User
Hi everybody, i'm trying to put 4 buttons with custom icon on toolbar buttons, but i got a very big icon. There is a way to stretch bitmap according to button size, or simply load bitmap with a specific size?

This is the code:
B4X:
    Dim l As List
    l.Initialize
    Dim b As BarButton
    b.InitializeBitmap(LoadBitmap(File.DirAssets,"ios_menu_1_on.png"),"0")

    b.Enabled = True
    l.Add(b)
'  
    Dim b As BarButton
    b.InitializeSystem(b.ITEM_UNDO,"0")
    b.Enabled = True
    b.TintColor = Colors.Red
    l.Add(b)
  
    mpa.ToolbarButtons = l

upload_2017-7-3_13-4-50.png

Thanks for help!
 
Top