I hope you can help me, I already researched my case but didn\'t found a good answer. I want to compare the content of a variable with the names of all existing resources (i
Sorry, I know you were looking for a Java solution, but I did not find any solution for the C# and Xamarin issue in StackOverflow, so I will leave my solution for Android here if you don't mind.
I found a well written class ReflectionUtils in GitHub, just used it and made this method to call.
private List GetAllStrings()
{
IEnumerable fields = ReflectionUtils.GetAllFields(typeof(Resource.String));
List list = new List();
using (var enumerator = fields.GetEnumerator())
{
try
{
while (enumerator.MoveNext())
{
list.Add(enumerator.Current.Name);
}
} catch (Exception e)
{
// Handle exception.
}
}
return list;
}