Example #1
0
        private void InitViews()
        {
            BackgroundContent?.SetBackgroundColor(ColorConstants.BackroundContent);

            EventImage?.SetImageFromUrl(EventManager.Instance.GetDetails().ImagePathView);
            EventImage?.SetBackgroundColor(ColorConstants.TransparentColor, 5);

            EventImage.Swipe -= Image_Swipe;
            EventImage.Swipe += Image_Swipe;

            if (EventName != null)
            {
                EventName.Text = EventManager.Instance.GetDetails().Name;
                EventName.SetFont(FontsConstant.OpenSansRegular, FontsConstant.Size28);
                EventName.SetTextColor(ColorConstants.WhiteColor);
            }

            if (EventDescription != null)
            {
                EventDescription.Text = EventManager.Instance.GetDetails().Description;

                EventDescription.SetTextColor(ColorConstants.WhiteColor);
                EventDescription.SetFont(FontsConstant.OpenSansRegular);
            }

            if (TimeEvent != null)
            {
                TimeEvent.Text = EventManager.Instance.GetDetails().EventDateTime.ToString("dd") + " " + EventManager.Instance.GetDetails().EventDateTime.ToString("MMMM");
                HourEvent.SetFont(FontsConstant.OpenSansBold, FontsConstant.Size14);
                TimeEvent.SetTextColor(ColorConstants.WhiteColor);
            }

            SeparatorImage?.SetImageFromResource(DrawableConstants.SeparatorLineEvent);

            if (HourEvent != null)
            {
                HourEvent.Text = EventManager.Instance.GetDetails().EventDateTime.ToString("H:mm");
                HourEvent.SetFont(FontsConstant.OpenSansBold, FontsConstant.Size15);
                HourEvent.SetTextColor(ColorConstants.SelectorHome);
            }

            TimeEventBackground?.SetImageFromResource(DrawableConstants.EventDateBackgroundImage);
        }