Пример #1
0
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            View itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.Item_Service_RelativeDiscount_Customer, parent, false);
            Customer_Service_RelativeDiscount_ViewModel_ViewHolder vh = new Customer_Service_RelativeDiscount_ViewModel_ViewHolder(itemView, OnClick);

            return(vh);
        }
Пример #2
0
        public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
        {
            Customer_Service_RelativeDiscount_ViewModel_ViewHolder vh = holder as Customer_Service_RelativeDiscount_ViewModel_ViewHolder;

            Picasso.Get().Load(mRelativeDiscount_List[position].Image).Into(vh.ServiceImg);
            vh.ServiceName.Text = mRelativeDiscount_List[position].NameService;
            if (mRelativeDiscount_List[position].price == null)
            {
                vh.ServicePrice.Text = "Giảm giá " + mRelativeDiscount_List[position].Discount.ToString() + "%";
            }
            else
            {
                vh.ServicePrice.Text = mRelativeDiscount_List[position].price.ToString();
            }
            vh.NumberOutletApply.Text = "Có " + mRelativeDiscount_List[position].TotalOutlets + "chi nhánh áp dụng";
        }