I have developed an Android library project that contains all the common code and resources need to 2 other projects. The problem is that in a class of common library I need to load a different resource if it is used on project A or project B, respectively.
If I type R.string.myId it doesn't find the resource because it isn't on CommonLib, but it is defined on projects A and B.
How I can resolve this problem? What is the right way to obtain a kind of 'polymorphism' on this type of projects? Maybe I put in common library a code such as
if (ctx.getPackageName().equals("packageName A")
else if (ctx.getPackageName().equals("packageName B"))
Thanks in advance.