// Create new views (invoked by the layout manager) public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { try { //Setup your layout here >> OnlineSearch_view View itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.OnlineSearch_view, parent, false); var vh = new OnlineSearch_AdapterViewHolder(itemView, OnClick, OnLongClick, ImageOnClick); return(vh); } catch (Exception e) { Console.WriteLine(e); return(null); } }
public void Initialize(OnlineSearch_AdapterViewHolder holder, GetSearchObject.User item) { try { ImageCacheLoader.LoadImage(item.Avatar, holder.ImageAvatar, false, true); string name = IMethods.Fun_String.DecodeString(item.Name); holder.Txt_Username.Text = IMethods.Fun_String.SubStringCutOf(name, 14); string lastSeen = Activity_Context.GetText(Resource.String.Lbl_Last_seen) + " "; var time = IMethods.ITime.TimeAgo(int.Parse(item.LastseenUnixTime)); holder.Txt_Lastseen.Text = lastSeen + time; } catch (Exception e) { Console.WriteLine(e); } }