Code example for Resources

Methods: getString

0
    public class ListItem { 
        public final CharSequence text;
        public final int actionTag;
 
        public ListItem(Resources res, int textResourceId, int actionTag) {
            text = res.getString(textResourceId);
            this.actionTag = actionTag;
        } 
        public ListItem(Resources res, String textResource, int actionTag) {
            text = textResource;
            this.actionTag = actionTag;
        } 
 
    } 
 
	private void addListItem(Resources res, AppCatalogueFilters.Catalogue catalogue)
	{ 
		String grpTitle = catalogue.getTitle();
		if (grpTitle != null) {
			mItems.add(new ListItem(res, grpTitle, catalogue.getIndex()));
		}