示例#1
0
        public override void Show()
        {
            ListViewCategory.SetAdapter(ComponentAdapterRecyclerFactory.CreateAdapter((inflater, parent) =>
                                                                                      new ServicesFeedbackListCellViewHolder(inflater,
                                                                                                                             parent,
                                                                                                                             (ModelView as FeedbackWindowViewModel).CellModel2)));

            ListViewEmoji.SetAdapter(ComponentAdapterRecyclerFactory.CreateAdapter((inflater, parent) =>
                                                                                   new EmojiFeedbackListCellViewHolder(inflater,
                                                                                                                       parent, (ModelView as FeedbackWindowViewModel).CellModel1)));
            base.Show();
        }
        public override void UpdateData()
        {
            MainWindowView?.SetBackgroundColor(ColorConstants.WhiteColor, 8);

            CellModel2 = new FeedbackListCategoryCell(this);

            BackgroundView?.SetBackgroundColor(ColorConstants.TransparentColor);

            if (SubmitText != null)
            {
                SubmitText.SetTextColor(ColorConstants.WhiteColor);
                SubmitText.Text = "Submit Feedback".ToUpperInvariant();
                SubmitText.SetFont(FontsConstant.OpenSansBold, FontsConstant.Size14);
                SubmitText.SetBackgroundColor(ColorConstants.SelectorHome);
                SubmitText.Click -= Submit_Click;
                SubmitText.Click += Submit_Click;
                SubmitText.SetSelectedColor(ColorConstants.WhiteColor);
            }

            if (TitleText != null)
            {
                TitleText.Text = RFeedback.GiveUsFedbackText;
                TitleText.SetTextColor(ColorConstants.FeedbackTitle);
                TitleText.SetFont(FontsConstant.OpenSansBold, FontsConstant.Size24);
            }

            if (CloseImage != null)
            {
                CloseImage?.SetImageFromResource(DrawableConstants.FeedbackCloseIcon);
                CloseImage.Click -= BackgroundView_Click;
                CloseImage.Click += BackgroundView_Click;
            }

            //ListViewCategory?.UpdateDataSource(FeedbackManager.Instance.GetCategoryItem());
            //ListViewCategory?.Orientation(OrientationListView.Horizontal);

            ListViewEmoji?.UpdateDataSource(FeedbackManager.Instance.GetItem());
            ListViewEmoji?.Orientation(OrientationListView.Horizontal);
        }