Exemple #1
0
        // Fill in the contents of the pdf card (invoked by the layout manager):
        public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
        {
            CardViewHolder vh = holder as CardViewHolder;

            // Set the ImageView and TextView in this ViewHolder's CardView
            // from this position in the pdf file:
            vh.Image.SetImageBitmap(PdfFile[position]);
        }
Exemple #2
0
        // Create a new pdf CardView (invoked by the layout manager):
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            // Inflate the CardView for the pdf:
            View itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.card_view, parent, false);

            // Create a ViewHolder to find and hold these view references
            CardViewHolder vh = new CardViewHolder(itemView);

            return(vh);
        }