Hi

I need to find the id by name then use that int value to set a image.

I found this method that seems to be what I need(it says I should not use
this method if possible but not sure what other method I could use then).

 int result =  Resources.GetIdentifier("my_image, "drawable",null);

I was not sure what to put for package so that might be why result is always
coming back as zero.

I have this image in "Drawable-mdpi" but I would think "drawable" would
work.

here is the number from the Resource.Designer

                        // aapt resource value: 0x7f020022
                        public const int my_image = 2130837538;



--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/How-to-use-Resources-GetIdentifier-tp4687726p4687726.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to