Пример #1
0
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            if (viewType == VIEW_TYPE_VWTE)
            {
                View view = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.fragment_dashboard_item_vwte_holder, parent, false);
                DashboardItemvwTEHolder vh = new DashboardItemvwTEHolder(view);
                return(vh);
            }
            else if (viewType == VIEW_TYPE_RCSTE)
            {
                View view = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.fragment_dashboard_item_rcste_holder, parent, false);
                DashboardItemRCSTEHolder vh = new DashboardItemRCSTEHolder(view, this, this.dashboardFragment);
                return(vh);
            }
            else if (viewType == VIEW_TYPE_VWSALESTECHART)
            {
                View view = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.fragment_dashboard_item_vwsalestechart_holder, parent, false);
                DashboardItemvwSalesTEChartHolder vh = new DashboardItemvwSalesTEChartHolder(view);
                return(vh);
            }
            else if (viewType == VIEW_TYPE_VWSALESTE)
            {
                View view = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.item_vwsaleste_table, parent, false);
                DashboardItemvwSalesTEHolder vh = new DashboardItemvwSalesTEHolder(view, parent);
                return(vh);
            }

            return(null);
        }
Пример #2
0
 public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
 {
     if (holder.GetType() == typeof(DashboardItemvwTEHolder))
     {
         DashboardItemvwTEHolder vh = (DashboardItemvwTEHolder)holder;
         vh.BindItem(mVwTE);
     }
     else if (holder.GetType() == typeof(DashboardItemRCSTEHolder))
     {
         DashboardItemRCSTEHolder vh = (DashboardItemRCSTEHolder)holder;
         vh.BindItem(mRCSTE);
     }
     else if (holder.GetType() == typeof(DashboardItemvwSalesTEChartHolder))
     {
         DashboardItemvwSalesTEChartHolder vh = (DashboardItemvwSalesTEChartHolder)holder;
         vh.BindItem(mVwSalesTEChart);
     }
     else if (holder.GetType() == typeof(DashboardItemvwSalesTEHolder))
     {
         DashboardItemvwSalesTEHolder vh = (DashboardItemvwSalesTEHolder)holder;
         vh.BindItem(mVwSalesTE, mLKWk);
     }
 }