Jonathan Pryor-2 wrote:
> 
> On Aug 17, 2011, at 11:51 AM, chobo2 wrote:
>> Ok lets try one more time. If not then I will upload it as a bug and
>> hopefully that will work
>> 
>> https://rapidshare.com/files/1081405648/MonoAndroidApplication2.zip
> 
> Yay, that works.
> 
> So the problem is that I was wrong before; you don't want to use the
> `package` line from obj/Debug/android/src/R.java`, you want to use the
> /manifest/@package attribute from obj/Debug/android/AndroidManifest.xml:
> 
>       <manifest
>               xmlns:android="http://schemas.android.com/apk/res/android";
>               android:versionCode="1"
>               android:versionName="1.0"
>               package="MonoAndroidApplication2.MonoAndroidApplication2">
> 
> Which results in:
> 
>       int id = Resources.GetIdentifier("chrysanthemum", "drawable",
> "MonoAndroidApplication2.MonoAndroidApplication2"); 
> 
> (Note the case changes in the package name.)
> 
> This results in the correct value of 2130837504 on my device, instead of
> the 0 that you were seeing.
> 
> Thanks,
>  - Jon
> 
> _______________________________________________
> Monodroid mailing list
> Monodroid@lists.ximian.com
> 
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
> 


Cool that seems to work.

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/How-to-use-Resources-GetIdentifier-tp4687726p4713265.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

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

Reply via email to