Exemple #1
0
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            View view = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.restaurant_index_recycler, parent, false);
            RestaurantViewHolder vh = new RestaurantViewHolder(view, OnClick);

            return(vh);
        }
Exemple #2
0
        public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
        {
            RestaurantViewHolder vh = holder as RestaurantViewHolder;

            vh.Restaurant   = Restaurants[position];
            vh.Name.Text    = vh.Restaurant.Name;
            vh.Address.Text = vh.Restaurant.AddressStreet + ", " + vh.Restaurant.AddressTown + ", " + vh.Restaurant.AddressCounty + ", " + vh.Restaurant.AddressPostalCode;
        }