コード例 #1
0
 public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
 {
     if (holder.GetType() == typeof(OutletItemFISHolder))
     {
         OutletItemFISHolder vh = (OutletItemFISHolder)holder;
         vh.BindItem(OutletItem);
     }
     else if (holder.GetType() == typeof(OutletItemTaskHolder))
     {
         OutletItemTaskHolder vh = (OutletItemTaskHolder)holder;
         vh.BindItem(OutletItemTask);
     }
     else if (holder.GetType() == typeof(OutletItemRemarkHolder))
     {
         OutletItemRemarkHolder vh = (OutletItemRemarkHolder)holder;
         vh.BindItem(OutletItemRCS);
     }
     else if (holder.GetType() == typeof(OutletItemSalesHolder))
     {
         OutletItemSalesHolder vh = (OutletItemSalesHolder)holder;
         vh.BindItem(OutletItemChartList);
     }
     else if (holder.GetType() == typeof(OutletItemSalesTableHolder))
     {
         OutletItemSalesTableHolder vh = (OutletItemSalesTableHolder)holder;
         vh.BindItem(OutletItemSalesOutlet, mLKWk);
     }
 }
コード例 #2
0
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            this.adapterParent = parent;

            if (viewType == VIEW_TYPE_VWOUTLET_LIST)
            {
                View view = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.outletitem_detail_fis_holder, parent, false);
                OutletItemFISHolder vh = new OutletItemFISHolder(view);
                return(vh);
            }
            else if (viewType == VIEW_TYPE_OUTLET_TASK)
            {
                View view = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.outletitem_detail_task_holder, parent, false);
                OutletItemTaskHolder vh = new OutletItemTaskHolder(view);
                return(vh);
            }
            else if (viewType == VIEW_TYPE_RCS_OUTLET)
            {
                View view = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.outletitem_detail_remark_holder, parent, false);
                OutletItemRemarkHolder vh = new OutletItemRemarkHolder(view, this);
                return(vh);
            }
            else if (viewType == VIEW_TYPE_VWSALES_OUTLET_CHART)
            {
                View view = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.outletitem_detail_sales_holder, parent, false);
                OutletItemSalesHolder vh = new OutletItemSalesHolder(view);
                return(vh);
            }
            else if (viewType == VIEW_TYPE_VWSALES_OUTLET)
            {
                View view = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.item_vwsaleste_table, parent, false);
                OutletItemSalesTableHolder vh = new OutletItemSalesTableHolder(view, this.adapterParent);
                return(vh);
            }

            return(null);
        }