How to use standard menu icons?

Inman

Well-Known Member
Licensed User
Longtime User
I have a menu in my application and currently I am using separate PNG files for each icon. I read that it is possible to use the inbuilt standard Android menu icons without including any extra assets. There is a discussion regarding this at the URL below, explaining how to achieve this in Java.

How to select standard Android menu icons? - Stack Overflow

I was wondering if this is possible in B4A.
 

devjet

Member
Licensed User
Longtime User
I have added this but it throws a exception as follows. Where could the problem be any idea?

Thanks !


Compiling code. Error
Error compiling program.
Error description: Too many parameters.
Occurred on line: 40
Activity.AddMenuItem ("Add Configuration", "AddConfig" ,bd.Bitmap )
Word: bd


 
Upvote 0

klaus

Expert
Licensed User
Longtime User
You must use:
B4X:
Activity.AddMenuItem[COLOR=red]2[/COLOR]("Add Configuration", "AddConfig" ,bd.Bitmap )
and not
B4X:
Activity.AddMenuItem ("Add Configuration", "AddConfig" ,bd.Bitmap )
This one is without an icon and needs only two parameters.

Best regards.
 
Upvote 0

volvomann

Active Member
Licensed User
Longtime User
Hallo i use the code above her but i cant see anny icon at my menu can any say me how to use icon files at menu
 
Upvote 0

volvomann

Active Member
Licensed User
Longtime User
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…