コード例 #1
0
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            View row = LayoutInflater.From(context).Inflate(Resource.Layout.detalleRow, parent, false);

            ListViewDetalleSolicitudAdapterViewHolder holder = new ListViewDetalleSolicitudAdapterViewHolder(row);

            holder.NombreArticulo     = row.FindViewById <TextView>(Resource.Id.nombreArticuloSolicitado);
            holder.CantidadSolicitada = row.FindViewById <TextView>(Resource.Id.cantidadSolicitada);
            return(holder);
        }
コード例 #2
0
        public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
        {
            ListViewDetalleSolicitudAdapterViewHolder myHolder = holder as ListViewDetalleSolicitudAdapterViewHolder;

            myHolder.NombreArticulo.Text     = cotizacion[position].Articulo.Descripcion;
            myHolder.CantidadSolicitada.Text = cotizacion[position].Cantidad.ToString();
            myHolder.mMainView.Click        += mMainView_Click;
            //if (!myHolder.BtnBorrar.HasOnClickListeners) {
            //    myHolder.BtnBorrar.Click+=delegate {
            //        SolicitudArticulo.RemoveAt(position);
            //        NotifyDataSetChanged();
            //    };
            //}
        }