I have a image called(my_image.png) in my Drawable-mdpi folder.
my android application interacts with a webservice. It might send back "my_image". My android application should load up this image.
I am using Monodroid and I tried this
int abc = Resources.GetIdentifier("my_image","drawable",null);
Yet the result is always "0"
. When it should be(from the resource file)
// aapt resource value: 0x7f020000
public const int my_image = 2130837504;
Looking around and the android way seems to be similar
int i = this.getResources().getIdentifier("txt_asecondtext", "strings", this.getPackageName());
I tried passing in the package name instead of null
but that did nothing.