public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position) { // TODO bind the results to the model RestaurantItemViewHolder restaurantitemViewHolder = holder as RestaurantItemViewHolder; restaurantitemViewHolder.DisplayRestaurantList(_restaurantitemModel[position]); }
public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { // Inflate the CardView for the chef list layout: View itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.item_restaurant_list_layout, parent, false); // register viewholder clicks RestaurantItemViewHolder restaurantitemViewHolder = new RestaurantItemViewHolder(itemView, OnClick); return(restaurantitemViewHolder); }