public void Initialize(LikedUsers_AdapterViewHolder holder, Get_Post_Data_Object.PostLikedUsers users) { try { var AvatarSplit = users.Avatar.Split('/').Last(); var getImage_Avatar = IMethods.MultiMedia.GetMediaFrom_Disk(IMethods.IPath.FolderDiskImage, AvatarSplit); if (getImage_Avatar != "File Dont Exists") { if (holder.Image.Tag?.ToString() != "loaded") { ImageServiceLoader.Load_Image(holder.Image, "no_profile_image.png", getImage_Avatar, 1); holder.Image.Tag = "loaded"; } } else { if (holder.Image.Tag?.ToString() != "loaded") { IMethods.MultiMedia.DownloadMediaTo_DiskAsync(IMethods.IPath.FolderDiskImage, users.Avatar); ImageServiceLoader.Load_Image(holder.Image, "no_profile_image.png", users.Avatar, 1); holder.Image.Tag = "loaded"; } } var CoverSplit = users.Cover.Split('/').Last(); var getImage_Cover = IMethods.MultiMedia.GetMediaFrom_Disk(IMethods.IPath.FolderDiskImage, CoverSplit); if (getImage_Cover == "File Dont Exists") { IMethods.MultiMedia.DownloadMediaTo_DiskAsync(IMethods.IPath.FolderDiskImage, users.Cover); } string name = IMethods.Fun_String.DecodeString(IMethods.Fun_String.DecodeStringWithEnter(users.Name)); holder.Name.Text = IMethods.Fun_String.SubStringCutOf(name, 25); var dataabout = IMethods.Fun_String.StringNullRemover(users.About); if (dataabout != "Empty") { var about = IMethods.Fun_String.DecodeString(IMethods.Fun_String.DecodeStringWithEnter(dataabout)); holder.About.Text = IMethods.Fun_String.SubStringCutOf(about, 40); } else { var about = Activity_Context.GetText(Resource.String.Lbl_DefaultAbout) + " " + Settings.Application_Name; holder.About.Text = IMethods.Fun_String.SubStringCutOf(about, 40); } } catch (Exception e) { Crashes.TrackError(e); } }
// Create new views (invoked by the layout manager) public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { try { //Setup your layout here >> Style_HContact_view var itemView = LayoutInflater.From(parent.Context) .Inflate(Resource.Layout.Style_HContact_view, parent, false); var vh = new LikedUsers_AdapterViewHolder(itemView, OnClick, OnLongClick); return(vh); } catch (Exception exception) { Crashes.TrackError(exception); return(null); } }