public CategoryListAdapter(Activity context, short categoryValue, string searchFilter, XDocument xmlDoc) //We need a context to inflate our row view from : base() { this.context = context; this.category = categoryValue; if (category == -1) { this.items = BusinessListings.getBusinessesThatMatchName(searchFilter, xmlDoc); } else if (category == (short)Categories.CategoriesTypes.Favorites) { string[] favList = searchFilter.Split(','); this.items = BusinessListings.getBusinessesByFavorites(favList, xmlDoc); } else { this.items = BusinessListings.getBusinessesByCategory(categoryValue, xmlDoc); } }