public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { View itemView; RecyclerView.ViewHolder vh = null; switch (viewType) { case 0: itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.LeagueNameWithFlag, parent, false); vh = new LeagueHeaderViewHolder(itemView); break; case 1: itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.Card, parent, false); vh = new LeagueContentViewHolder(itemView, OnClickId, this); break; default: break; } return(vh); }
public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { View itemView; RecyclerView.ViewHolder vh = null; switch (viewType) { case 0: itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.CenterHeader, parent, false); itemView.FindViewById <TextView>(Resource.Id.headerName).TextSize = 30; vh = new HeaderViewHolder(itemView); break; case 1: itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.LeagueNameWithFlag, parent, false); vh = new LeagueHeaderViewHolder(itemView); break; case 2: itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.ActualTile, parent, false); vh = new LiveMatchViewHolder(itemView, OnClickObject, this); break; case 3: itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.CenterHeader, parent, false); vh = new HeaderViewHolder(itemView); break; default: break; } return(vh); }