I use the following function in my JAVA Library:
I have a layout in res/layout - layout.main.xml
So I compile my library and load in B4A
In B4A I type:
But I recieve in logs the following:
android.content.res.Resources$NotFoundException: Resource ID #0x0
Why ?
Thanks
B4X:
public void setContentView(BA pBA, String LayoutName){
pBA.activity.setContentView(BA.applicationContext.getResources().getIdentifier(LayoutName, "layout", BA.packageName));
}
I have a layout in res/layout - layout.main.xml
So I compile my library and load in B4A
In B4A I type:
B4X:
Test.setContentView("layout.main.xml")
But I recieve in logs the following:
android.content.res.Resources$NotFoundException: Resource ID #0x0
Why ?
Thanks