예제 #1
0
        OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
        {
            PerscriptionViewHolder vh = holder as PerscriptionViewHolder;

            vh.form.SetImageResource(_PListing[position].formID);
            vh.take.SetImageResource(_PListing[position].takeID);
            ArrayAdapter <string> adapter = new ArrayAdapter <string>(context, Resource.Layout.support_simple_spinner_dropdown_item, _PListing[position].schedule);

            vh.schedule.Adapter = adapter;
            vh.title.Text       = _PListing[position].perscription;
            vh.start.Text       = _PListing[position].start;
            vh.end.Text         = _PListing[position].end;
        }
예제 #2
0
        OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            context = parent.Context;
            // inflate the view for the perscription
            View itemView = LayoutInflater.From(parent.Context).
                            Inflate(Resource.Layout.PerscriptionListingLayout, parent, false);

            // create a fiew holder to find and hold the views references and
            //Registe onclick with the holder
            PerscriptionViewHolder vh = new PerscriptionViewHolder(itemView, OnClick);

            return(vh);
        }