Here is the situation: I have two projects. Let a LibraryProjectand a say MainProject. MainProjectrefers to LibraryProjectboth the library.
I have one action in LibraryProjectthat should detect if I have MainProjectdefined a specific output method, say, "logo.png" (think that the logo image should be determined by each "MainProject", and not by the library project.
How in one of the actions to LibraryProjectfind out if MainProjectthis image is in the folder res/drawable?
Obviously, I tried to find out if there is R.drawable.logo != 0(or its change), but, as you know, this line will not compile, since the image is not in the folder res/drawable LibraryProject.
I also tried getResources().getIdentifier("logo", "drawable", null) != 0, but this boolean expression always returns false, since it .getIdentifier()always returns zero.
Any idea?
source
share