Android Question Error using resource file

ernschd

Active Member
Licensed User
Longtime User
Hi,

I would like to use the Material Design Toolbar from the Corwin42 tutorial with the current version of B4A.
The toolbar should display a search icon. Unfortunately I get this error message when loading the resource:

android.content.res.Resources$NotFoundException: Resource ID #0x0

I load them with the XmlLayoutBuilder:
B4X:
bd = xml.GetDrawable("ic_search_white_24")
Activity.AddMenuItem3("Search", "Menu", bd.Bitmap, True)

I have tried several ways to include the resource:
  • stored once in the Object\res directory (read-only)
  • created an own directory and inserted it in B4A with the #AdditionalRes attribute

What else can I do?

Thank you.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…