Example #1
0
        public void Initialize(StoryAdapterViewHolder holder, Get_Stories_Object.Story Story)
        {
            try
            {
                var StorySplit     = Story.thumbnail.Split('/').Last();
                var getImage_Story = IMethods.MultiMedia.GetMediaFrom_Disk(IMethods.IPath.FolderDiskStory, StorySplit);
                if (getImage_Story != "File Dont Exists")
                {
                    if (holder.Image.Tag?.ToString() != "loaded")
                    {
                        ImageServiceLoader.Load_Image(holder.Image, "ImagePlacholder.jpg", getImage_Story, 1, true, 10);
                        holder.Image.Tag = "loaded";
                    }
                }
                else
                {
                    if (holder.Image.Tag?.ToString() != "loaded")
                    {
                        IMethods.MultiMedia.DownloadMediaTo_DiskAsync(IMethods.IPath.FolderDiskStory, Story.thumbnail);
                        ImageServiceLoader.Load_Image(holder.Image, "ImagePlacholder.jpg", Story.thumbnail, 1, true, 10);
                        holder.Image.Tag = "loaded";
                    }
                }

                holder.Circleindicator.BorderColor = Color.ParseColor(Settings.MainColor);

                string name = IMethods.Fun_String.DecodeString(IMethods.Fun_String.DecodeStringWithEnter(Story.user_data.name));
                holder.Name.Text = name;
            }
            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_Story_view
         var itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.Style_HStoryView, parent, false);
         var vh       = new StoryAdapterViewHolder(itemView, Click, LongClick);
         return(vh);
     }
     catch (Exception exception)
     {
         Console.WriteLine("EX:ALLEN >> " + exception);
         return(null);
     }
 }
Example #3
0
 // Create new views (invoked by the layout manager)
 public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
 {
     try
     {
         //Setup your layout here >> Style_Story_view
         var itemView = LayoutInflater.From(parent.Context)
                        .Inflate(Resource.Layout.Style_Story_view, parent, false);
         var vh = new StoryAdapterViewHolder(itemView, OnClick, OnLongClick);
         return(vh);
     }
     catch (Exception exception)
     {
         Crashes.TrackError(exception);
         return(null);
     }
 }