Skip to content

Instantly share code, notes, and snippets.

@ecgreb
Created February 3, 2017 15:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ecgreb/9d1cb18e17d7c7a28bf912387b6316da to your computer and use it in GitHub Desktop.
Save ecgreb/9d1cb18e17d7c7a28bf912387b6316da to your computer and use it in GitHub Desktop.
public class ResourceManager {
private Resources resources;
public ResourceManager(Resources resources) {
this.resources = resources;
}
public String getTitle(boolean success) {
if (success) {
return resources.getString(R.string.success_title);
} else {
return resources.getString(R.string.error_title);
}
}
public String getDescription(boolean success) {
if (success) {
return resources.getString(R.string.success_description);
} else {
return resources.getString(R.string.error_description);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment