Exemplo n.º 1
0
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.DoOnlineTestFragmentRow, parent, false);
            DoOnlineTestViewHolder vh = new DoOnlineTestViewHolder(itemView, OnClick, mRecyclerView);

            return(vh);
        }
Exemplo n.º 2
0
        public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
        {
            DoOnlineTestViewHolder onlinetestViewHolder = holder as DoOnlineTestViewHolder;
            AllTestModelData       objmodel             = alltestlist[position];

            onlinetestViewHolder.title.Text     = objmodel.Title;
            onlinetestViewHolder.duration.Text  = objmodel.Duration + " Mins";
            onlinetestViewHolder.date.Text      = "Date " + objmodel.TestDate.Split("T")[0];
            onlinetestViewHolder.starttext.Text = objmodel.Text;
            onlinetestViewHolder.starttext.SetBackgroundResource(objmodel.background);
            Animation animation = AnimationUtils.LoadAnimation(ac, (position > lastPosition) ? Resource.Animation.slide_up1 : Resource.Animation.slide_down1);

            onlinetestViewHolder.ItemView.StartAnimation(animation);
            lastPosition = position;
        }