public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            NSAttributedStringDocumentAttributes documentAttributes = new NSAttributedStringDocumentAttributes
            {
                DocumentType = NSDocumentType.HTML, StringEncoding = NSStringEncoding.UTF8
            };
            NSError            error            = null;
            NSAttributedString attributedString =
                new NSAttributedString(NSData.FromString(ForceUpdateViewModel.FORCE_UPDATE_MESSAGE, NSStringEncoding.UTF8), documentAttributes, ref error);

            if (error != null)
            {
                LogUtils.LogMessage(Enums.LogSeverity.ERROR, error.LocalizedDescription);
            }

            //Ensuring text is resiezed correctly when font size is increased
            StyleUtil.InitLabekWithSpacingAndHTMLFormatting(
                TextLabel, StyleUtil.FontType.FontBold, attributedString, 1.28, 24, 30, UITextAlignment.Center);
            TextLabel.TextColor = ColorHelper.TEXT_COLOR_ON_BACKGROUND;

            StyleUtil.InitButtonStyling(AppStoreLinkButton, ForceUpdateViewModel.FORCE_UPDATE_BUTTON_APPSTORE_IOS);
            AppStoreLinkButton.AccessibilityTraits = UIAccessibilityTrait.Link;

            FhiLogo.AccessibilityLabel   = ForceUpdateViewModel.SMITTESPORING_FHI_LOGO_ACCESSIBILITY;
            TextLabel.AccessibilityLabel = AccessibilityUtils.RemovePoorlySpokenSymbolsString(ForceUpdateViewModel.FORCE_UPDATE_MESSAGE);
        }
예제 #2
0
 public override void ViewDidLoad()
 {
     base.ViewDidLoad();
     TitleLabel.Text = TitleText;
     BodyText.Text   = Content;
     StyleUtil.InitButtonStyling(OkBtn, OkBtnText);
 }
 void SetStyling()
 {
     StyleUtil.InitLabelWithSpacing(TitleLbl, StyleUtil.FontType.FontBold, QuestionnaireCountriesViewModel.COUNTRY_QUESTIONAIRE_HEADER_TEXT, 1.14, 32, 38);
     StyleUtil.InitLabelWithSpacing(SubtitleLbl, StyleUtil.FontType.FontRegular, QuestionnaireCountriesViewModel.COUNTRY_QUESTIONAIRE_INFORMATION_TEXT, 1.28, 20, 22);
     StyleUtil.InitLabelWithSpacing(ListExplainLbl, StyleUtil.FontType.FontRegular, QuestionnaireCountriesViewModel.COUNTRY_QUESTIONAIRE_FOOTER, 1.28, 16, 20);
     StyleUtil.InitButtonStyling(NextBtn, QuestionnaireCountriesViewModel.COUNTRY_QUESTIONAIRE_BUTTON_TEXT);
     SetButtonViewStyle();
 }
예제 #4
0
        void UpdateLayout()
        {
            SetPreviousButtonHidden(_currentPageIndex == 0);
            PageControl.CurrentPage = _currentPageIndex;
            PageControl.UpdateCurrentPageDisplay();

            StyleUtil.InitButtonStyling(NextBtn, _currentPageIndex == 4
                ? WelcomeViewModel.WELCOME_PAGE_BACKGROUND_LIMITATIONS_NEXT_BUTTON
                : WelcomeViewModel.NEXT_PAGE_BUTTON_TEXT);
        }
예제 #5
0
 public override void ViewDidLoad()
 {
     base.ViewDidLoad();
     StyleUtil.InitButtonStyling(StartButton, InitializerViewModel.LAUNCHER_PAGE_START_BTN);
     StyleUtil.InitLabel(ContinueInEnLbl, StyleUtil.FontType.FontSemiBold, InitializerViewModel.LAUNCHER_PAGE_CONTINUE_IN_ENG, 16, 24);
     ContinueInEnLbl.TextColor = ColorHelper.TEXT_COLOR_ON_BACKGROUND;
     StyleUtil.InitLabel(InitializerAppName, StyleUtil.FontType.FontBold, InitializerViewModel.LAUNCHER_PAGE_TITLE, 50, 50);
     InitializerAppName.TextColor = ColorHelper.TEXT_COLOR_ON_BACKGROUND;
     HeaderView.SizeToFit();
 }
예제 #6
0
 private void SetStyling()
 {
     TitleLabel.SetAttributedText(QuestionnaireViewModel.REGISTER_QUESTIONAIRE_RECEIPT_HEADER);
     TitleLabel.AccessibilityLabel = QuestionnaireViewModel.REGISTER_QUESTIONAIRE_ACCESSIBILITY_RECEIPT_HEADER;
     ContentLabelOne.SetAttributedText(QuestionnaireViewModel.REGISTER_QUESTIONAIRE_RECEIPT_TEXT);
     ContentLabelTwo.SetAttributedText(QuestionnaireViewModel.REGISTER_QUESTIONAIRE_RECEIPT_DESCRIPTION);
     BoxTitleLabel.SetAttributedText(QuestionnaireViewModel.REGISTER_QUESTIONAIRE_RECEIPT_INNER_HEADER, StyleUtil.FontType.FontBold);
     StyleUtil.InitLabelWithSpacing(BoxContentLabelTwo, StyleUtil.FontType.FontRegular, QuestionnaireViewModel.REGISTER_QUESTIONAIRE_RECEIPT_INNER_READ_MORE, 1.28, 12, 16);
     StyleUtil.InitButtonStyling(ToStartPageBtn, QuestionnaireViewModel.REGISTER_QUESTIONAIRE_RECEIPT_DISMISS);
 }
 void SetStyling()
 {
     DeleteBtnWidthConstraint.Active = false;
     StyleUtil.InitButtonStyling(DeleteConsentBtn, ConsentViewModel.WITHDRAW_CONSENT_BUTTON_TEXT);
     PageTitle.SetAttributedText(ConsentViewModel.WELCOME_PAGE_CONSENT_TITLE);
     BottomStackView.Layer.MasksToBounds = false;
     BottomStackView.Layer.ShadowColor   = UIColor.Gray.CGColor;
     BottomStackView.Layer.ShadowOffset  = new CGSize(0f, 10f);
     BottomStackView.Layer.ShadowOpacity = 1;
     BottomStackView.Layer.ShadowRadius  = 9;
 }
 private void SetStyling()
 {
     CloseButton.TintColor = ColorHelper.PRIMARY_COLOR;
     TitleLabel.SetAttributedText(QuestionnaireViewModel.REGISTER_QUESTIONAIRE_RECEIPT_HEADER);
     ContentLabelOne.SetAttributedText(QuestionnaireViewModel.REGISTER_QUESTIONAIRE_RECEIPT_TEXT);
     ContentLabelTwo.SetAttributedText(QuestionnaireViewModel.REGISTER_QUESTIONAIRE_RECEIPT_DESCRIPTION);
     BoxTitleLabel.SetAttributedText(QuestionnaireViewModel.REGISTER_QUESTIONAIRE_RECEIPT_INNER_HEADER,
                                     StyleUtil.FontType.FontBold);
     StyleUtil.InitLabelWithSpacing(BoxContentLabelTwo, StyleUtil.FontType.FontRegular,
                                    QuestionnaireViewModel.REGISTER_QUESTIONAIRE_RECEIPT_INNER_READ_MORE, 1.28, 12, 16);
     StyleUtil.InitButtonStyling(ToStartPageBtn, QuestionnaireViewModel.REGISTER_QUESTIONAIRE_RECEIPT_DISMISS);
 }
        public void SetupStyling()
        {
            HeaderLabel.TextColor              = ColorHelper.TEXT_COLOR_ON_BACKGROUND;
            DescriptionLabel.TextColor         = ColorHelper.TEXT_COLOR_ON_BACKGROUND;
            LookUp_Header.TextColor            = ColorHelper.TEXT_COLOR_ON_BACKGROUND;
            LookUp_Text.TextColor              = ColorHelper.TEXT_COLOR_ON_BACKGROUND;
            Notification_Header.TextColor      = ColorHelper.TEXT_COLOR_ON_BACKGROUND;
            Notification_Text.TextColor        = ColorHelper.TEXT_COLOR_ON_BACKGROUND;
            Consent_BeAware_Text.TextColor     = ColorHelper.TEXT_COLOR_ON_BACKGROUND;
            Consent_Explanation_Text.TextColor = ColorHelper.TEXT_COLOR_ON_BACKGROUND;

            StyleUtil.InitButtonStyling(LogInWithIDPortenBtn, InformationAndConsentViewModel.INFORMATION_CONSENT_ID_PORTEN_BUTTON_TEXT);
        }
        private void SetupStyling()
        {
            HeaderLabel.TextColor                    = ColorHelper.TEXT_COLOR_ON_BACKGROUND;
            BodyText1.TextColor                      = ColorHelper.TEXT_COLOR_ON_BACKGROUND;
            ShareHeader.TextColor                    = ColorHelper.TEXT_COLOR_ON_BACKGROUND;
            BodyText2.TextColor                      = ColorHelper.TEXT_COLOR_ON_BACKGROUND;
            ConsentEU_Explanation.TextColor          = ColorHelper.TEXT_COLOR_ON_BACKGROUND;
            Consent_onlyNorway_Explanation.TextColor = ColorHelper.TEXT_COLOR_ON_BACKGROUND;
            ConsentText.TextColor                    = ColorHelper.TEXT_COLOR_ON_BACKGROUND;

            StyleUtil.InitButtonStyling(NextButtonWithEUConsent, EU_CONSENT_NEXT_EU_CONSENT_BUTTON_TEXT);
            StyleUtil.InitButtonStyling(NextButtonOnlyNorwayConsent, EU_CONSENT_NEXT_ONLY_NORWAY_CONSENT_BUTTON_TEXT);
        }
        private void StyleStartButton()
        {
            StartButton.SemanticContentAttribute = UISemanticContentAttribute.ForceRightToLeft;
            StartButton.ContentEdgeInsets        = new UIEdgeInsets(0, 0, 0, 20);
            StartButton.TitleEdgeInsets          = new UIEdgeInsets(0, -6, 0, 6);
            StartButton.ImageEdgeInsets          = new UIEdgeInsets(0, 6, 0, -6);
            StyleUtil.InitButtonStyling(StartButton, InitializerViewModel.LAUNCHER_PAGE_START_BTN);

            if (OnboardingStatusHelper.Status == OnboardingStatus.CountriesOnboardingCompleted)
            {
                StartButton.Hidden = true;
            }
        }
        void SetStyling()
        {
            DateContainer.Layer.CornerRadius = 8;
            DateContainer.BackgroundColor    = UIColor.Clear;
            DateContainer.Layer.BorderWidth  = 1;
            DateContainer.Layer.BorderColor  = ColorHelper.TEXT_COLOR_ON_BACKGROUND.CGColor;

            DatePicker.Superview.Layer.CornerRadius = 6;
            DatePicker.PreferredDatePickerStyle     = UIDatePickerStyle.Wheels;
            DatePicker.MinimumDate = (NSDate)DateTime.SpecifyKind(_viewModel.MinimumDate, DateTimeKind.Utc);
            DatePicker.MaximumDate = (NSDate)DateTime.SpecifyKind(_viewModel.MaximumDate, DateTimeKind.Utc);

            StyleUtil.InitButtonStyling(NextBtn, QuestionnaireViewModel.REGISTER_QUESTIONAIRE_NEXT);
            NextBtn.SetTitle(QuestionnaireViewModel.REGISTER_QUESTIONAIRE_NEXT, UIControlState.Normal);
        }
        private void SetupStyling()
        {
            ErrorTitleLabel.Font      = StyleUtil.Font(StyleUtil.FontType.FontBold, 32, 36);
            ErrorTitleLabel.Text      = ErrorTitle;
            ErrorTitleLabel.TextColor = ColorHelper.TEXT_COLOR_ON_BACKGROUND;

            ErrorTitleLabel.AccessibilityTraits = UIAccessibilityTrait.Header;

            NSAttributedStringDocumentAttributes documentAttributes = new NSAttributedStringDocumentAttributes
            {
                DocumentType   = NSDocumentType.HTML,
                StringEncoding = NSStringEncoding.UTF8
            };
            NSError            error            = null;
            NSAttributedString attributedString = new NSAttributedString(
                NSData.FromString(ErrorMessage, NSStringEncoding.UTF8),
                documentAttributes,
                ref error);

            if (error != null)
            {
                Debug.Print(error.LocalizedDescription);
            }
            ErrorMessageLabel.AttributedText = attributedString;
            ErrorMessageLabel.Font           = StyleUtil.Font(StyleUtil.FontType.FontRegular, 20, 24);
            ErrorMessageLabel.Editable       = false;
            ErrorMessageLabel.Selectable     = true;
            ErrorMessageLabel.TextColor      = ColorHelper.TEXT_COLOR_ON_BACKGROUND;

            StyleUtil.InitButtonStyling(OkButton, ErrorViewModel.REGISTER_ERROR_DISMISS);

            BackButton.AccessibilityLabel = ErrorViewModel.REGISTER_ERROR_ACCESSIBILITY_CLOSE_BUTTON_TEXT;
            BackButton.TintColor          = ColorHelper.PRIMARY_COLOR;

            ErrorTitleLabel.IsAccessibilityElement   = ErrorTitle != "";
            ErrorMessageLabel.IsAccessibilityElement = ErrorMessage != "";

            if (ErrorTitleLabel.IsAccessibilityElement && ErrorTitle == ErrorViewModel.REGISTER_ERROR_TOOMANYTRIES_HEADER)
            {
                ErrorTitleLabel.AccessibilityLabel = ErrorViewModel.REGISTER_ERROR_ACCESSIBILITY_TOOMANYTRIES_HEADER;
            }

            if (ErrorMessageLabel.IsAccessibilityElement && ErrorMessage == ErrorViewModel.REGISTER_ERROR_TOOMANYTRIES_DESCRIPTION)
            {
                ErrorMessageLabel.AccessibilityLabel = ErrorViewModel.REGISTER_ERROR_ACCESSIBILITY_TOOMANYTRIES_DESCRIPTION;
            }
        }
예제 #14
0
        public void SetupStyling()
        {
            StyleUtil.InitButtonStyling(NextBtn, WelcomeViewModel.NEXT_PAGE_BUTTON_TEXT);
            StyleUtil.InitButtonSecondaryStyling(PreviousBtn, WelcomeViewModel.PREVIOUS_PAGE_BUTTON_TEXT);
            SetPreviousButtonHidden(true);

            PageControl.UserInteractionEnabled        = false;
            PageControl.PageIndicatorTintColor        = UIColor.White;
            PageControl.CurrentPageIndicatorTintColor = "#32345C".ToUIColor();
            PageControl.IsAccessibilityElement        = false;

            NextBtn.BackgroundColor = "#32345C".ToUIColor();
            NextBtn.SetTitleColor("#E1EAED".ToUIColor(), UIControlState.Normal);

            PreviousBtn.SetTitleColor("#32345C".ToUIColor(), UIControlState.Normal);
            PreviousBtn.Layer.BorderColor = "#32345C".ToUIColor().CGColor;
        }
예제 #15
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            _viewModel = new InformationAndConsentViewModel(OnAuthSuccess, OnAuthError);
            _viewModel.Init();
            CloseBtn.AccessibilityLabel = InformationAndConsentViewModel.CLOSE_BUTTON_ACCESSIBILITY_LABEL;
            HeaderLabel.SetAttributedText(InformationAndConsentViewModel.INFORMATION_CONSENT_HEADER_TEXT);
            DescriptionLabel.SetAttributedText(InformationAndConsentViewModel.INFOCONSENT_DESCRIPTION);
            LookUp_Header.SetAttributedText(InformationAndConsentViewModel.INFOCONSENT_LOOKUP_HEADER, StyleUtil.FontType.FontBold);
            LookUp_Text.SetAttributedText(InformationAndConsentViewModel.INFOCONSENT_LOOKUP_TEXT);
            Notification_Header.SetAttributedText(InformationAndConsentViewModel.INFOCONSENT_NOTIFICATION_HEADER, StyleUtil.FontType.FontBold);
            Notification_Text.SetAttributedText(InformationAndConsentViewModel.INFOCONSENT_NOTIFICATION_TEXT);
            Consent_BeAware_Text.SetAttributedText(InformationAndConsentViewModel.INFOCONSENT_CONSENT_BEAWARE_TEXT, StyleUtil.FontType.FontBold);
            Consent_Explanation_Text.SetAttributedText(InformationAndConsentViewModel.INFOCONSENT_CONSENT_EXPLANATION_TEXT);

            StyleUtil.InitButtonStyling(LogInWithIDPortenBtn, InformationAndConsentViewModel.INFORMATION_CONSENT_ID_PORTEN_BUTTON_TEXT);

            SetupStyling();
        }
예제 #16
0
        private void InitButtons()
        {
            StyleUtil.InitButtonStyling(BokmalButton, LanguageSelectionViewModel.LANGUAGE_SELECTION_NB);
            StyleUtil.InitButtonStyling(NynorskButton, LanguageSelectionViewModel.LANGUAGE_SELECTION_NN);
            StyleUtil.InitButtonStyling(EnglishButton, LanguageSelectionViewModel.LANGUAGE_SELECTION_EN);
            StyleUtil.InitButtonStyling(ArabicButton, LanguageSelectionViewModel.LANGUAGE_SELECTION_AR);
            StyleUtil.InitButtonStyling(LithuanianButton, LanguageSelectionViewModel.LANGUAGE_SELECTION_LT);
            StyleUtil.InitButtonStyling(PolishButton, LanguageSelectionViewModel.LANGUAGE_SELECTION_PL);
            StyleUtil.InitButtonStyling(SomaliButton, LanguageSelectionViewModel.LANGUAGE_SELECTION_SO);
            StyleUtil.InitButtonStyling(TigrinyaButton, LanguageSelectionViewModel.LANGUAGE_SELECTION_TI);
            StyleUtil.InitButtonStyling(UrduButton, LanguageSelectionViewModel.LANGUAGE_SELECTION_UR);

            StyleUtil.InitLanguageSelectionButtonStyling(BokmalButton);
            StyleUtil.InitLanguageSelectionButtonStyling(NynorskButton);
            StyleUtil.InitLanguageSelectionButtonStyling(EnglishButton);
            StyleUtil.InitLanguageSelectionButtonStyling(ArabicButton);
            StyleUtil.InitLanguageSelectionButtonStyling(LithuanianButton);
            StyleUtil.InitLanguageSelectionButtonStyling(PolishButton);
            StyleUtil.InitLanguageSelectionButtonStyling(SomaliButton);
            StyleUtil.InitLanguageSelectionButtonStyling(TigrinyaButton);
            StyleUtil.InitLanguageSelectionButtonStyling(UrduButton);
        }
예제 #17
0
        private void SetupStyling()
        {
            ErrorTitleLabel.Font      = StyleUtil.Font(StyleUtil.FontType.FontBold, 32, 36);
            ErrorTitleLabel.Text      = ErrorTitle;
            ErrorTitleLabel.TextColor = ColorHelper.TEXT_COLOR_ON_BACKGROUND;

            // Ensure the linespacing is set correctly to the UITextView ErrorMessageLabel.
            var AttributedErrorMessage             = new NSMutableAttributedString(ErrorMessage);
            NSMutableParagraphStyle paragraphStyle = new NSMutableParagraphStyle();

            paragraphStyle.LineSpacing = 0;
            AttributedErrorMessage.AddAttribute(UIStringAttributeKey.ParagraphStyle, paragraphStyle, new NSRange(0, ErrorMessage.Length));

            ErrorMessageLabel.AttributedText = AttributedErrorMessage;
            ErrorMessageLabel.Font           = StyleUtil.Font(StyleUtil.FontType.FontRegular, 20, 24);
            ErrorMessageLabel.Editable       = false;
            ErrorMessageLabel.Selectable     = true;
            ErrorMessageLabel.TextColor      = ColorHelper.TEXT_COLOR_ON_BACKGROUND;

            StyleUtil.InitButtonStyling(OkButton, ErrorViewModel.REGISTER_ERROR_DISMISS);

            BackButton.AccessibilityLabel = ErrorViewModel.REGISTER_ERROR_ACCESSIBILITY_CLOSE_BUTTON_TEXT;
            BackButton.TintColor          = ColorHelper.PRIMARY_COLOR;

            ErrorTitleLabel.IsAccessibilityElement   = ErrorTitle == "" ? false : true;
            ErrorMessageLabel.IsAccessibilityElement = ErrorMessage == "" ? false : true;

            if (ErrorTitleLabel.IsAccessibilityElement == true && ErrorTitle == ErrorViewModel.REGISTER_ERROR_TOOMANYTRIES_HEADER)
            {
                ErrorTitleLabel.AccessibilityLabel = ErrorViewModel.REGISTER_ERROR_ACCESSIBILITY_TOOMANYTRIES_HEADER;
            }

            if (ErrorMessageLabel.IsAccessibilityElement == true && ErrorMessage == ErrorViewModel.REGISTER_ERROR_TOOMANYTRIES_DESCRIPTION)
            {
                ErrorMessageLabel.AccessibilityLabel = ErrorViewModel.REGISTER_ERROR_ACCESSIBILITY_TOOMANYTRIES_DESCRIPTION;
            }
        }
예제 #18
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            NSAttributedStringDocumentAttributes documentAttributes = new NSAttributedStringDocumentAttributes
            {
                DocumentType = NSDocumentType.HTML, StringEncoding = NSStringEncoding.UTF8
            };
            NSError            error            = null;
            NSAttributedString attributedString =
                new NSAttributedString(NSData.FromString(ForceUpdateViewModel.FORCE_UPDATE_MESSAGE, NSStringEncoding.UTF8), documentAttributes, ref error);

            if (error != null)
            {
                LogUtils.LogMessage(Enums.LogSeverity.ERROR, error.LocalizedDescription);
            }

            //Ensuring text is resiezed correctly when font size is increased
            StyleUtil.InitLabekWithSpacingAndHTMLFormatting(
                TextLabel, StyleUtil.FontType.FontBold, attributedString, 1.28, 24, 30, UITextAlignment.Center);
            TextLabel.TextColor = UIColor.White;

            StyleUtil.InitButtonStyling(AppStoreLinkButton, ForceUpdateViewModel.FORCE_UPDATE_BUTTON_APPSTORE_IOS);
        }