示例#1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            string contentText = SettingsPage5ViewModel.SETTINGS_PAGE_5_CONTENT + " " + SettingsPage5ViewModel.SETTINGS_PAGE_5_LINK;

            HeaderLabel.SetAttributedText(SettingsPage5ViewModel.SETTINGS_PAGE_5_HEADER);
            HeaderLabel.AccessibilityTraits = UIAccessibilityTrait.Header;

            InitTextViewWithSpacing(ContentText, FontType.FontRegular, contentText, 1.28, 16, 22);

            /* Necessary to unify horizontal alignment due to bug in iOS
            ** https://stackoverflow.com/questions/746670/how-to-lose-margin-padding-in-uitextview
            */
            ContentText.ContentInset       = UIEdgeInsets.Zero;
            ContentText.TextContainerInset = UIEdgeInsets.Zero;
            ContentText.TextContainer.LineFragmentPadding = 0;
            ContentText.AccessibilityTraits = UIAccessibilityTrait.Link;
            ContentText.WeakDelegate        = new OpenTextViewUrlInWebviewDelegate(this);

            //ForegroundColor sets the color of the links. UnderlineStyle determins if the link is underlined, 0 without underline 1 with underline.
            ContentText.WeakLinkTextAttributes = new NSDictionary(UIStringAttributeKey.ForegroundColor, ColorHelper.LINK_COLOR, UIStringAttributeKey.UnderlineStyle, new NSNumber(1));

            InitLabelWithSpacing(BuildVersionLbl, FontType.FontRegular, SettingsPage5ViewModel.GetVersionInfo(), 1.14, 14, 16);
            BackButton.AccessibilityLabel = SettingsViewModel.BACK_BUTTON_ACCESSIBILITY_TEXT;

            ContentText.IsAccessibilityElement = true;
            ContentText.ScrollEnabled          = false;

            InitAccessibilityStatementButton();

            SetupStyling();
        }
示例#2
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            string contentText = SettingsPage5ViewModel.SETTINGS_PAGE_5_CONTENT + " " + SettingsPage5ViewModel.SETTINGS_PAGE_5_LINK;

            HeaderLabel.SetAttributedText(SettingsPage5ViewModel.SETTINGS_PAGE_5_HEADER);

            StyleUtil.InitTextViewWithSpacing(ContentText, FontType.FontRegular, contentText, 1.28, 16, 22);

            //ForegroundColor sets the color of the links. UnderlineStyle determins if the link is underlined, 0 without underline 1 with underline.
            ContentText.WeakLinkTextAttributes = new NSDictionary(UIStringAttributeKey.ForegroundColor, ColorHelper.TEXT_COLOR_ON_BACKGROUND, UIStringAttributeKey.UnderlineStyle, new NSNumber(1));

            StyleUtil.InitLabelWithSpacing(BuildVersionLbl, FontType.FontRegular, SettingsPage5ViewModel.GetVersionInfo(), 1.14, 14, 16);
            BackButton.AccessibilityLabel = SettingsViewModel.SETTINGS_CHILD_PAGE_ACCESSIBILITY_BACK_BUTTON;

            ContentText.AccessibilityIdentifier      = "contentTextIdentifier";
            ContentText.IsAccessibilityElement       = true;
            ContentText.AccessibilityAttributedLabel = AccessibilityUtils.RemovePoorlySpokenSymbols(contentText);

            SetupStyling();
        }