Ejemplo n.º 1
0
        private void SetRecyclerViewAdapters()
        {
            try
            {
                MAdapter = new ReplyCommentAdapter(this, MainRecyclerView, CommentId);

                if (CommentObject != null)
                {
                    CommentLayout.LayoutResource = string.IsNullOrEmpty(CommentObject.CFile) ? Resource.Layout.Style_Comment : Resource.Layout.Style_Comment_Image;
                }
                CommentLayoutView = CommentLayout.Inflate();

                var holder = new CommentAdapterViewHolder(CommentLayoutView, "Light")
                {
                    ReplyTextView = { Visibility = ViewStates.Gone }
                };

                //Load data same as comment adapter
                CommentActivity.GetInstance()?.CommentsAdapter?.LoadCommentData(CommentObject, holder);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Ejemplo n.º 2
0
        public static void SetReactionPack(CommentAdapterViewHolder holder, string React)
        {
            try
            {
                var MReactionPack = XReactions.GetReactions();

                var data = MReactionPack?.FirstOrDefault(a => a.GetReactText() == React);
                if (data != null)
                {
                    holder.LikeTextView.Text = data.GetReactText();
                    holder.LikeTextView.SetTextColor(Color.ParseColor(data.GetReactTextColor()));
                }
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
            }
        }
        public static void SetReactionPack(CommentAdapterViewHolder holder, string react)
        {
            try
            {
                var mReactionPack = XReactions.GetReactions();

                var data = mReactionPack?.FirstOrDefault(a => a.GetReactText() == react);
                if (data != null)
                {
                    holder.LikeTextView.Text = data.GetReactText();
                    holder.LikeTextView.SetTextColor(Color.ParseColor(data.GetReactTextColor()));
                }
            }
            catch (Exception exception)
            {
                Methods.DisplayReportResultTrack(exception);
            }
        }
Ejemplo n.º 4
0
 private void DestroyBasic()
 {
     try
     {
         Instance           = null !;
         MAdapter           = null !;
         MRecycler          = null !;
         CommentLayout      = null !;
         CommentLayoutView  = null !;
         ReplyCountTextView = null !;
         ImgBack            = null !;
         ImgSent            = null !;
         ImgGallery         = null !;
         CommentObject      = null !;
         ReplyCommentObject = null !;
         CommentId          = null !;
         PathImage          = null !;
     }
     catch (Exception e)
     {
         Methods.DisplayReportResultTrack(e);
     }
 }