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

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

            Glide.With(_context).Load(_viewModel.Monkeys[position].Image.ToString()).CenterCrop().Override(300, 400).Into(vh.Image);
            vh.Name.Text     = _viewModel.Monkeys[position].Name;
            vh.Location.Text = _viewModel.Monkeys[position].Location;
        }