예제 #1
0
        private void LoadDataPost()
        {
            try
            {
                if (CommentObject != null)
                {
                    var repliesCount = !string.IsNullOrEmpty(CommentObject.RepliesCount) ? CommentObject.RepliesCount : CommentObject.Replies ?? "";
                    ReplyCountTextView.Text      = repliesCount + " " + GetString(Resource.String.Lbl_Replies);
                    CommentLayout.LayoutResource = string.IsNullOrEmpty(CommentObject.CFile) ? Resource.Layout.Style_Comment : Resource.Layout.Style_Comment_Image;
                }

                CommentLayoutView = CommentLayout.Inflate();

                var holder = new CommentAdapterViewHolder(CommentLayoutView, MAdapter, new CommentClickListener(this, "Reply"), CommentObject)
                {
                    ReplyTextView = { Visibility = ViewStates.Gone }
                };

                //Load data same as comment adapter
                var commentAdapter = new CommentAdapter(this);
                commentAdapter.LoadCommentData(CommentObject, holder);

                StartApiService();
            }
            catch (Exception e)
            {
                Methods.DisplayReportResultTrack(e);
            }
        }
        private void LoadDataPost()
        {
            try
            {
                if (CommentObject != null)
                {
                    ReplyCountTextView.Text      = CommentObject.Replies + " " + GetString(Resource.String.Lbl_Replies);
                    CommentLayout.LayoutResource = string.IsNullOrEmpty(CommentObject.CFile) ? Resource.Layout.Style_Comment : Resource.Layout.Style_Comment_Image;
                }

                CommentLayoutView = CommentLayout.Inflate();

                var holder = new CommentAdapterViewHolder(CommentLayoutView, MAdapter, new CommentClickListener(this, "Reply"))
                {
                    ReplyTextView = { Visibility = ViewStates.Gone }
                };

                //Load data same as comment adapter
                var commentAdapter = new CommentAdapter(this);
                commentAdapter.LoadCommentData(CommentObject, holder);

                StartApiService();
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }