public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { if (viewType == Resource.Layout.Loading) { View Loading = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.Loading, parent, false); Loading view = new Loading(Loading) { }; return(view); } else { View mLinkomanijaListView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.LinkomanijosList, parent, false); TextView name = mLinkomanijaListView.FindViewById <TextView>(Resource.Id.name); TextView subtext = mLinkomanijaListView.FindViewById <TextView>(Resource.Id.subname); TextView date = mLinkomanijaListView.FindViewById <TextView>(Resource.Id.date); TextView size = mLinkomanijaListView.FindViewById <TextView>(Resource.Id.size); TextView downloaded = mLinkomanijaListView.FindViewById <TextView>(Resource.Id.downloaded); TextView seeder = mLinkomanijaListView.FindViewById <TextView>(Resource.Id.seeders); LinkomanijaData view = new LinkomanijaData(mLinkomanijaListView) { mName = name, msubtext = subtext, mdate = date, msize = size, mdownloaded = downloaded, mseeder = seeder }; return(view); } }
public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position) { if (holder is Loading) { ; } else { LinkomanijaData myHolder = holder as LinkomanijaData; myHolder.mName.Text = List[position].name; myHolder.msubtext.Text = List[position].subtext; myHolder.mdate.Text = List[position].date; myHolder.msize.Text = List[position].size; myHolder.mdownloaded.Text = List[position].downloaded; myHolder.mseeder.Text = List[position].seeder; } }