I am absolutely baffled by this one. If someone could provide some insight, please please do.
I am developing a Xamarin Android app. I have an image in my "drawable" folder. It happens to be called "typingleft0.png", in case you care. When I look at the Resource.designer.cs file, Visual Studio has correctly generated a resource ID and placed it in that file. Here is the line from Resource.designer.cs:
// aapt resource value: 0x7f02017e public const int typingleft0 = 2130837886;
When I type code, Visual Studio recognizes that the resource exists - it shows up in autocomplete when I type something like "Resource.Drawable.typ.......". You know what I mean.
But then, there is a certain point in my code where apparently the resource is like a ghost. At a point in my code, I have the string form of the Resource, and I need to get the integer resource ID, so I do so like so:
int resourceID = this.Resources.GetIdentifier("typingleft0", "drawable", this.PackageName);
The variable resourceID is 0. It's like the resource doesn't event exist. When I physically set the resourceID variable to be the same value as typingleft0 (in Resource.designer.cs), the image does not show up in the UI. It is just blank.
Any ideas what could be going on?