Access main project resource strings from different project

BearinoBearino USMember
edited October 2016 in Xamarin.Android

I have a MainProject and a BusinessLayerProject. I have a method that takes a list of data items and provides each with a display name from [Resource.String].
e.g.

switch (item.Name)
{
case itemName1:
displayName = GetString(Resource.String.itemName1Display);
break;

Currently the method is in a fragment in MainProject, I want to move it out and make it reuseable. I'm not sure how to do this. One thought is that I need to reference my MainProject to access MainProject.Context, but this would make a circular dependency.

Is there any other option? Should I be recreating the strings I need in the second project / put them in the right place in the first place?

Sign In or Register to comment.