private void Init() { _questionnaireViewModel = new QuestionnaireViewModel(); TextView questionnaireTitle = FindViewById <TextView>(Resource.Id.questionnaire_title); questionnaireTitle.Text = REGISTER_QUESTIONAIRE_HEADER; questionnaireTitle.ContentDescription = REGISTER_QUESTIONAIRE_HEADER; questionnaireTitle.SetAccessibilityDelegate(AccessibilityUtils.GetHeadingAccessibilityDelegate()); TextView questionnaireSubtitle = FindViewById <TextView>(Resource.Id.questionnaire_subtitle); ISpanned questionnaireSubtitleTextFormatted = HtmlCompat.FromHtml(REGISTER_QUESTIONAIRE_SYMPTOMONSET_TEXT, HtmlCompat.FromHtmlModeLegacy); questionnaireSubtitle.TextFormatted = questionnaireSubtitleTextFormatted; questionnaireSubtitle.ContentDescriptionFormatted = questionnaireSubtitleTextFormatted; _questionnaireButton = FindViewById <Button>(Resource.Id.questionnaire_button); _questionnaireButton.Text = REGISTER_QUESTIONAIRE_NEXT; _questionnaireButton.ContentDescription = REGISTER_QUESTIONAIRE_NEXT; _questionnaireButton.Click += OnNextButtonClick; _infoButton = FindViewById <ImageButton>(Resource.Id.questionnaire_info_button); _infoButton.ContentDescription = REGISTER_QUESTIONAIRE_ACCESSIBILITY_DATE_INFO_BUTTON; _infoButton.Click += OnInfoButtonPressed; _closeButton = FindViewById <Button>(Resource.Id.close_cross_btn); _closeButton.ContentDescription = SettingsViewModel.SETTINGS_ITEM_ACCESSIBILITY_CLOSE_BUTTON; _closeButton.Click += new SingleClick((o, ev) => ShowAreYouSureToExitDialog()).Run; LogUtils.LogMessage(LogSeverity.INFO, "The user is seeing the Questionnaire page"); PrepareRadioButtons(); }
void InitLayout() { //Buttons _closeButton = FindViewById <ViewGroup>(Resource.Id.close_cross_btn); _idPortenButton = FindViewById <Button>(Resource.Id.information_consent_idporten_button); //TextViews _header = FindViewById <TextView>(Resource.Id.information_consent_header_textView); _contentText = FindViewById <TextView>(Resource.Id.information_consent_content_textView); _subtitleText = FindViewById <TextView>(Resource.Id.information_consent_subtitle_textView); _bodyOneText = FindViewById <TextView>(Resource.Id.information_consent_body_one_textView); _bodyTwoText = FindViewById <TextView>(Resource.Id.information_consent_body_two_textView); _contentTwoText = FindViewById <TextView>(Resource.Id.information_consent_content_two_textView); //Text initialization _idPortenButton.Text = InformationAndConsentViewModel.INFORMATION_CONSENT_ID_PORTEN_BUTTON_TEXT; _header.Text = InformationAndConsentViewModel.INFORMATION_CONSENT_HEADER_TEXT; _contentText.TextFormatted = HtmlCompat.FromHtml($"{InformationAndConsentViewModel.INFOCONSENT_DESCRIPTION}", HtmlCompat.FromHtmlModeLegacy); _subtitleText.Text = InformationAndConsentViewModel.INFOCONSENT_TITLE; _bodyOneText.Text = InformationAndConsentViewModel.INFOCONSENT_BODY_ONE; _bodyTwoText.Text = InformationAndConsentViewModel.INFOCONSENT_BODY_TWO; _contentTwoText.Text = InformationAndConsentViewModel.INFOCONSENT_DESCRIPTION_ONE; ////Accessibility _closeButton.ContentDescription = InformationAndConsentViewModel.CLOSE_BUTTON_ACCESSIBILITY_LABEL; //Button click events _closeButton.Click += new SingleClick((sender, e) => Finish(), 500).Run; _idPortenButton.Click += new SingleClick(LogInWithIDPortenButton_Click, 500).Run; //Progress bar _progressBar = FindViewById <ProgressBar>(Resource.Id.information_consent_progress_bar); }
public static ISpanned ToHtmlSpanned(this string source) { if (string.IsNullOrEmpty(source)) { return(new SpannableString(string.Empty)); } if (Build.VERSION.SdkInt < BuildVersionCodes.N) { // FromHtmlOptions are ignored on devices with API less than 24 // so excessive break lines has to be cleared out. source = Regex.Replace(source, "<p><br></p>", "<p></p>"); source = Regex.Replace(source, "</p><p>", "<br>"); } // Depending on the version of Android API there is no support for // list HTML markup or there is partial incomplete support. // To override partial support of HTML lists we have to replace ul, // ol and li tags with our custom. This will trigger use of custom // TagHandler. // https://medium.com/swlh/making-nested-lists-with-android-spannables-in-kotlin-4ad00052912c var formattedSource = FormatHtml(source); var fromHtmlOptions = FromHtmlOptions.ModeCompact; return(HtmlCompat.FromHtml(formattedSource, (int)fromHtmlOptions, null, new TagHandler())); }
void Init() { ImageButton backButton = FindViewById <ImageButton>(Resource.Id.arrow_back_about); backButton.ContentDescription = ViewModels.SettingsViewModel.BACK_BUTTON_ACCESSIBILITY_TEXT; TextView titleField = FindViewById <TextView>(Resource.Id.settings_about_title); TextView textField = FindViewById <TextView>(Resource.Id.settings_about_text); TextView hiddenLink = FindViewById <TextView>(Resource.Id.settings_about_link); FindViewById <TextView>(Resource.Id.settings_about_version_info_textview).Text = ViewModels.SettingsPage5ViewModel.GetVersionInfo(); titleField.Text = SettingsPage5ViewModel.SETTINGS_PAGE_5_HEADER; titleField.SetAccessibilityDelegate(AccessibilityUtils.GetHeadingAccessibilityDelegate()); textField.Text = SettingsPage5ViewModel.SETTINGS_PAGE_5_CONTENT + $"\n {SettingsPage5ViewModel.SETTINGS_PAGE_5_LINK}"; textField.TextAlignment = TextAlignment.ViewStart; backButton.Click += new SingleClick((sender, args) => Finish()).Run; hiddenLink.Text = SettingsPage5ViewModel.SETTINGS_PAGE_5_LINK; LinkUtil.LinkifyTextView(hiddenLink); TextView accessibilityStatementLink = FindViewById <TextView>(Resource.Id.accessibility_statement_btn); accessibilityStatementLink.TextFormatted = HtmlCompat.FromHtml($"<a href=\"{SettingsPage5ViewModel.SETTINGS_PAGE_5_ACCESSIBILITY_STATEMENT_BUTTON_URL}\">{SettingsPage5ViewModel.SETTINGS_PAGE_5_ACCESSIBILITY_STATEMENT_BUTTON_TEXT}</a>", HtmlCompat.FromHtmlModeLegacy); accessibilityStatementLink.MovementMethod = new Android.Text.Method.LinkMovementMethod(); View rootView = Window.DecorView.RootView; rootView.LayoutDirection = LayoutUtils.GetLayoutDirection(); backButton.SetBackgroundResource(LayoutUtils.GetBackArrow()); }
private void SetText(object sender, string textBlock) { AndroidApplication.Logger.Debug(() => $"HelpActivity:SetText"); RunOnUiThread(() => { HelpText.TextFormatted = HtmlCompat.FromHtml(textBlock, HtmlCompat.FromHtmlModeLegacy); }); }
private void SetBulletText(int resourceId, string textContent) { LinearLayout bullet = FindViewById <LinearLayout>(resourceId); CheckBox bulletCheckBox = bullet.FindViewById <CheckBox>(Resource.Id.bulletText); if (bulletCheckBox != null) { bulletCheckBox.TextFormatted = HtmlCompat.FromHtml(textContent, HtmlCompat.FromHtmlModeLegacy); } }
private void SetupSubTextWithLink(TextView textView, string formattedText) { ISpanned formattedDescription = HtmlCompat.FromHtml(formattedText, HtmlCompat.FromHtmlModeLegacy); textView.TextFormatted = formattedDescription; textView.ContentDescriptionFormatted = formattedDescription; textView.MovementMethod = LinkMovementMethod.Instance; Color linkColor = new Color(ContextCompat.GetColor(this, Resource.Color.linkColor)); textView.SetLinkTextColor(linkColor); }
void Init() { ImageButton backButton = FindViewById <ImageButton>(Resource.Id.arrow_back); backButton.ContentDescription = SettingsViewModel.BACK_BUTTON_ACCESSIBILITY_TEXT; TextView titleField = FindViewById <TextView>(Resource.Id.settings_how_it_works_title); TextView intro = FindViewById <TextView>(Resource.Id.settings_how_it_works_intro); TextView heading1 = FindViewById <TextView>(Resource.Id.settings_how_it_works_heading1); TextView paragraph1textView1 = FindViewById <TextView>(Resource.Id.settings_how_it_works_paragraph1textView1); TextView paragraph1textView2 = FindViewById <TextView>(Resource.Id.settings_how_it_works_paragraph1textView2); TextView heading2 = FindViewById <TextView>(Resource.Id.settings_how_it_works_heading2); TextView paragraph2textView1 = FindViewById <TextView>(Resource.Id.settings_how_it_works_paragraph2textView1); TextView paragraph2textView2 = FindViewById <TextView>(Resource.Id.settings_how_it_works_paragraph2textView2); TextView paragraph2textView3 = FindViewById <TextView>(Resource.Id.settings_how_it_works_paragraph2textView3); TextView paragraph2textView4 = FindViewById <TextView>(Resource.Id.settings_how_it_works_paragraph2textView4); TextView heading3 = FindViewById <TextView>(Resource.Id.settings_how_it_works_heading3); TextView paragraph3textView1 = FindViewById <TextView>(Resource.Id.settings_how_it_works_paragraph3textView1); TextView heading4 = FindViewById <TextView>(Resource.Id.settings_how_it_works_heading4); TextView paragraph4textView1 = FindViewById <TextView>(Resource.Id.settings_how_it_works_paragraph4textView1); TextView paragraph4textView2 = FindViewById <TextView>(Resource.Id.settings_how_it_works_paragraph4textView2); TextView paragraph4textView3 = FindViewById <TextView>(Resource.Id.settings_how_it_works_paragraph4textView3); titleField.Text = SettingsPage2ViewModel.SETTINGS_PAGE_2_HEADER; intro.Text = SettingsPage2ViewModel.SETTINGS_PAGE_2_CONTENT_TEXT_INTRO; heading1.Text = SettingsPage2ViewModel.SETTINGS_PAGE_2_CONTENT_TEXT_PARAGRAPH_1_TITLE; paragraph1textView1.Text = SettingsPage2ViewModel.SETTINGS_PAGE_2_CONTENT_TEXT_PARAGRAPH_1_CONTENT; paragraph1textView2.Text = SettingsPage2ViewModel.SETTINGS_PAGE_2_CONTENT_TEXT_PARAGRAPH_1_CONTENT2; heading2.Text = SettingsPage2ViewModel.SETTINGS_PAGE_2_CONTENT_TEXT_PARAGRAPH_2_TITLE; paragraph2textView1.Text = SettingsPage2ViewModel.SETTINGS_PAGE_2_CONTENT_TEXT_PARAGRAPH_2_CONTENT; paragraph2textView2.Text = SettingsPage2ViewModel.SETTINGS_PAGE_2_CONTENT_TEXT_PARAGRAPH_2_CONTENT2; paragraph2textView3.Text = SettingsPage2ViewModel.SETTINGS_PAGE_2_CONTENT_TEXT_PARAGRAPH_2_CONTENT3; paragraph2textView4.Text = SettingsPage2ViewModel.SETTINGS_PAGE_2_CONTENT_TEXT_PARAGRAPH_2_CONTENT4; heading3.Text = SettingsPage2ViewModel.SETTINGS_PAGE_2_CONTENT_TEXT_PARAGRAPH_3_TITLE; paragraph3textView1.Text = SettingsPage2ViewModel.SETTINGS_PAGE_2_CONTENT_TEXT_PARAGRAPH_3_CONTENT; heading4.Text = SettingsPage2ViewModel.SETTINGS_PAGE_2_CONTENT_TEXT_PARAGRAPH_4_TITLE; paragraph4textView1.Text = SettingsPage2ViewModel.SETTINGS_PAGE_2_CONTENT_TEXT_PARAGRAPH_4_CONTENT; paragraph4textView2.Text = SettingsPage2ViewModel.SETTINGS_PAGE_2_CONTENT_TEXT_PARAGRAPH_4_CONTENT2; paragraph4textView3.TextFormatted = HtmlCompat.FromHtml(SettingsPage2ViewModel.SETTINGS_PAGE_2_CONTENT_TEXT_PARAGRAPH_4_CONTENT3, HtmlCompat.FromHtmlModeLegacy); titleField.SetAccessibilityDelegate(AccessibilityUtils.GetHeadingAccessibilityDelegate()); LinkUtil.LinkifyTextView(paragraph4textView3); FormatLink(paragraph4textView3); backButton.Click += new SingleClick((sender, args) => Finish()).Run; View rootView = Window.DecorView.RootView; rootView.LayoutDirection = LayoutUtils.GetLayoutDirection(); backButton.SetBackgroundResource(LayoutUtils.GetBackArrow()); }
protected override void OnElementChanged(ElementChangedEventArgs <Label> e) { base.OnElementChanged(e); var view = (HtmlText)Element; if (view == null) { return; } Control.SetText(HtmlCompat.FromHtml(view.Text, HtmlCompat.FromHtmlModeCompact), TextView.BufferType.Spannable); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.force_update); FindViewById <TextView>(Resource.Id.force_update_label).TextFormatted = HtmlCompat.FromHtml(ForceUpdateViewModel.FORCE_UPDATE_MESSAGE, HtmlCompat.FromHtmlModeLegacy); Button updateButton = FindViewById <Button>(Resource.Id.force_update_button); updateButton.Text = ForceUpdateViewModel.FORCE_UPDATE_BUTTON_GOOGLE_ANDROID; updateButton.ContentDescription = ForceUpdateViewModel.FORCE_UPDATE_BUTTON_GOOGLE_ANDROID; updateButton.Click += new StressUtils.SingleClick(GoToGooglePlay).Run; }
void Init() { Bundle textFieldsBundle = Intent.Extras; string titleText = textFieldsBundle.GetString("title"); string descriptionText = textFieldsBundle.GetString("description"); string buttonText = textFieldsBundle.GetString("button"); TextView subtitleTextView = FindViewById <TextView>(Resource.Id.error_subtitle); if (textFieldsBundle.ContainsKey("subtitle")) { string subtitleText = textFieldsBundle.GetString("subtitle"); subtitleTextView.Text = subtitleText; subtitleTextView.ContentDescription = subtitleText; subtitleTextView.Visibility = ViewStates.Visible; } else { subtitleTextView.Visibility = ViewStates.Gone; } TextView errorTitle = FindViewById <TextView>(Resource.Id.error_title); errorTitle.Text = titleText; errorTitle.ContentDescription = titleText; errorTitle.SetAccessibilityDelegate(AccessibilityUtils.GetHeadingAccessibilityDelegate()); TextView errorDescription = FindViewById <TextView>(Resource.Id.error_description); ISpanned formattedDescription = HtmlCompat.FromHtml(descriptionText, HtmlCompat.FromHtmlModeLegacy); errorDescription.TextFormatted = formattedDescription; errorDescription.ContentDescriptionFormatted = formattedDescription; errorDescription.MovementMethod = Android.Text.Method.LinkMovementMethod.Instance; ViewGroup close = FindViewById <ViewGroup>(Resource.Id.close_cross_btn); close.Click += new SingleClick((o, ev) => { NavigationHelper.GoToResultPageAndClearTop(this); }).Run; close.ContentDescription = SettingsViewModel.SETTINGS_ITEM_ACCESSIBILITY_CLOSE_BUTTON; Button button = FindViewById <Button>(Resource.Id.error_button); button.Text = buttonText; button.ContentDescription = buttonText; button.Click += new SingleClick((o, ev) => { NavigationHelper.GoToResultPageAndClearTop(this); }).Run; this.Title = textFieldsBundle.GetString("title"); }
void InitLayout() { View rootView = Window.DecorView.RootView; rootView.LayoutDirection = LayoutUtils.GetLayoutDirection(); //Buttons _closeButton = FindViewById <ViewGroup>(Resource.Id.close_cross_btn); _idPortenButton = FindViewById <Button>(Resource.Id.information_consent_idporten_button); //TextViews _header = FindViewById <TextView>(Resource.Id.information_consent_header_textView); _consentDescriptionText = FindViewById <TextView>(Resource.Id.information_consent_contentDescription_textView); _lookupHeader = FindViewById <TextView>(Resource.Id.information_consent_lookup_header_textview); _lookupText = FindViewById <TextView>(Resource.Id.information_consent_lookup_text_textview); _notificationHeader = FindViewById <TextView>(Resource.Id.information_consent_notification_header_textview); _notificationText = FindViewById <TextView>(Resource.Id.information_consent_notification_text_textview); _beAwareText = FindViewById <TextView>(Resource.Id.information_consent_beAware_text_textview); _consentExplanationText = FindViewById <TextView>(Resource.Id.information_consent_explanation_text_textview); //Text initialization _idPortenButton.Text = InformationAndConsentViewModel.INFORMATION_CONSENT_ID_PORTEN_BUTTON_TEXT; _header.Text = InformationAndConsentViewModel.INFORMATION_CONSENT_HEADER_TEXT; _consentDescriptionText.TextFormatted = HtmlCompat.FromHtml($"{InformationAndConsentViewModel.INFOCONSENT_DESCRIPTION}", HtmlCompat.FromHtmlModeLegacy); _lookupHeader.Text = InformationAndConsentViewModel.INFOCONSENT_LOOKUP_HEADER; _lookupText.Text = InformationAndConsentViewModel.INFOCONSENT_LOOKUP_TEXT; _notificationHeader.Text = InformationAndConsentViewModel.INFOCONSENT_NOTIFICATION_HEADER; _notificationText.Text = InformationAndConsentViewModel.INFOCONSENT_NOTIFICATION_TEXT; _beAwareText.Text = InformationAndConsentViewModel.INFOCONSENT_CONSENT_BEAWARE_TEXT; _consentExplanationText.Text = InformationAndConsentViewModel.INFOCONSENT_CONSENT_EXPLANATION_TEXT; _lookupHeader.TextAlignment = TextAlignment.ViewStart; _notificationHeader.TextAlignment = TextAlignment.ViewStart; ////Accessibility _closeButton.ContentDescription = InformationAndConsentViewModel.CLOSE_BUTTON_ACCESSIBILITY_LABEL; _header.SetAccessibilityDelegate(AccessibilityUtils.GetHeadingAccessibilityDelegate()); _lookupHeader.SetAccessibilityDelegate(AccessibilityUtils.GetHeadingAccessibilityDelegate()); _notificationHeader.SetAccessibilityDelegate(AccessibilityUtils.GetHeadingAccessibilityDelegate()); //Button click events _closeButton.Click += new SingleClick((sender, e) => Finish(), 500).Run; _idPortenButton.Click += new SingleClick(LogInWithIDPortenButton_Click, 500).Run; //Progress bar _progressBar = FindViewById <ProgressBar>(Resource.Id.information_consent_progress_bar); }
void Init() { ImageButton backButton = FindViewById <ImageButton>(Resource.Id.arrow_back); backButton.ContentDescription = SettingsViewModel.SETTINGS_CHILD_PAGE_ACCESSIBILITY_BACK_BUTTON; TextView textField = FindViewById <TextView>(Resource.Id.settings_how_it_works_text); TextView titleField = FindViewById <TextView>(Resource.Id.settings_how_it_works_title); titleField.Text = SettingsPage2ViewModel.SETTINGS_PAGE_2_HEADER; textField.TextFormatted = HtmlCompat.FromHtml(SettingsPage2ViewModel.SETTINGS_PAGE_2_CONTENT, HtmlCompat.FromHtmlModeLegacy); LinkUtil.LinkifyTextView(textField); FormatLink(textField); backButton.Click += new SingleClick((sender, args) => Finish()).Run; }
void Init() { View rootView = Window.DecorView.RootView; rootView.LayoutDirection = LayoutUtils.GetLayoutDirection(); ImageButton backButton = FindViewById <ImageButton>(Resource.Id.arrow_back_help); backButton.ContentDescription = ViewModels.SettingsViewModel.BACK_BUTTON_ACCESSIBILITY_TEXT; TextView textField = FindViewById <TextView>(Resource.Id.settings_help_text); TextView titleField = FindViewById <TextView>(Resource.Id.settings_help_title); titleField.Text = HEADER; titleField.SetAccessibilityDelegate(AccessibilityUtils.GetHeadingAccessibilityDelegate()); textField.TextAlignment = TextAlignment.ViewStart; textField.TextFormatted = HtmlCompat.FromHtml($"{CONTENT_TEXT_BEFORE_SUPPORT_LINK} <a href=\"{SUPPORT_LINK}\">{SUPPORT_LINK_SHOWN_TEXT}</a><br><br>" /* Note: * This functionality is not planned for release 1.0. Kept for future use. * //$"{EMAIL_TEXT} <a href=\"mailto:{EMAIL}\">{EMAIL}</a> {PHONE_NUM_Text} <a href=\"tel:{PHONE_NUM}\">{PHONE_NUM}</a>.<br><br>" + * //$"{PHONE_OPEN_TEXT}<br><br>" + * //$"{PHONE_OPEN_MON_THU}<br>" + * //$"{PHONE_OPEN_FRE}<br><br>" + * //$"{PHONE_OPEN_SAT_SUN_HOLY}" */ , HtmlCompat.FromHtmlModeLegacy); textField.ContentDescriptionFormatted = HtmlCompat.FromHtml($"{CONTENT_TEXT_BEFORE_SUPPORT_LINK} <a href=\"https://{SUPPORT_LINK}\">{SUPPORT_LINK_SHOWN_TEXT}</a><br><br>" /* Note: * This functionality is not planned for release 1.0. Kept for future use. * //$"{EMAIL_TEXT} <a href=\"mailto:{EMAIL}\">{EMAIL}</a> {PHONE_NUM_Text} <a href=\"tel:{PHONE_NUM}\">{PHONE_NUM_ACCESSIBILITY}</a>.<br><br>" + * //$"{PHONE_OPEN_TEXT}<br><br>" + * //$"{PHONE_OPEN_MON_THU_ACCESSIBILITY}<br>" + * //$"{PHONE_OPEN_FRE_ACCESSIBILITY}<br><br>" + * //$"{PHONE_OPEN_SAT_SUN_HOLY}" */ , HtmlCompat.FromHtmlModeLegacy); textField.MovementMethod = LinkMovementMethod.Instance; backButton.Click += new SingleClick((sender, args) => Finish()).Run; backButton.SetBackgroundResource(LayoutUtils.GetBackArrow()); }
void Init() { Button backButton = FindViewById <Button>(Resource.Id.arrow_back_help); backButton.ContentDescription = ViewModels.SettingsViewModel.SETTINGS_CHILD_PAGE_ACCESSIBILITY_BACK_BUTTON; TextView textField = FindViewById <TextView>(Resource.Id.settings_help_text); TextView titleField = FindViewById <TextView>(Resource.Id.settings_help_title); TextView hiddenLink = FindViewById <TextView>(Resource.Id.settings_help_link); titleField.Text = HEADER; textField.TextFormatted = HtmlCompat.FromHtml($"{CONTENT_TEXT_BEFORE_SUPPORT_LINK} <a href=\"https://{SUPPORT_LINK}\">{SUPPORT_LINK_SHOWN_TEXT}</a><br><br>" /* Note: * This functionality is not planned for release 1.0. Kept for future use. * //$"{EMAIL_TEXT} <a href=\"mailto:{EMAIL}\">{EMAIL}</a> {PHONE_NUM_Text} <a href=\"tel:{PHONE_NUM}\">{PHONE_NUM}</a>.<br><br>" + * //$"{PHONE_OPEN_TEXT}<br><br>" + * //$"{PHONE_OPEN_MON_THU}<br>" + * //$"{PHONE_OPEN_FRE}<br><br>" + * //$"{PHONE_OPEN_SAT_SUN_HOLY}" */ , HtmlCompat.FromHtmlModeLegacy); textField.ContentDescriptionFormatted = HtmlCompat.FromHtml($"{CONTENT_TEXT_BEFORE_SUPPORT_LINK} <a href=\"https://{SUPPORT_LINK}\">{SUPPORT_LINK_SHOWN_TEXT}</a><br><br>" /* Note: * This functionality is not planned for release 1.0. Kept for future use. * //$"{EMAIL_TEXT} <a href=\"mailto:{EMAIL}\">{EMAIL}</a> {PHONE_NUM_Text} <a href=\"tel:{PHONE_NUM}\">{PHONE_NUM_ACCESSIBILITY}</a>.<br><br>" + * //$"{PHONE_OPEN_TEXT}<br><br>" + * //$"{PHONE_OPEN_MON_THU_ACCESSIBILITY}<br>" + * //$"{PHONE_OPEN_FRE_ACCESSIBILITY}<br><br>" + * //$"{PHONE_OPEN_SAT_SUN_HOLY}" */ , HtmlCompat.FromHtmlModeLegacy); textField.MovementMethod = LinkMovementMethod.Instance; backButton.Click += new SingleClick((sender, args) => Finish()).Run; hiddenLink.Text = SUPPORT_LINK; hiddenLink.ContentDescription = SUPPORT_LINK_SHOWN_TEXT; LinkUtil.LinkifyTextView(hiddenLink); }
private void ShowAboutText() { var devDetailsText = FindViewById <AppCompatTextView>(Resource.Id.developer_details_text); devDetailsText.Text = $"Version: {GetAppVersion()}\n" + "Developer: Ahmar Aftab\n" + "Email: [email protected]\n" + "Github URL: https://github.com/ahmar20/com.aa.tvshows"; var feedbackDetailsText = FindViewById <AppCompatTextView>(Resource.Id.feedback_details_text); feedbackDetailsText.Text = $"If you have any issues with the app or would like to ask for a feature, please head to {HtmlCompat.FromHtml("<a href='https://github.com/ahmar20/com.aa.tvshows/issues'>Issues</a>", HtmlCompat.FromHtmlModeLegacy)} on the project page and create an issue.\n\n" + $"This app uses following Open Source libraries:\n" + $"1. {HtmlCompat.FromHtml("<a href='https://github.com/xamarin/AndroidX'> Xamarin AndroidX </a>", HtmlCompat.FromHtmlModeLegacy)}\n" + $"2. {HtmlCompat.FromHtml("<a href='https://github.com/zzzprojects/html-agility-pack'> Html Agility Pack </a>", HtmlCompat.FromHtmlModeLegacy)}\n" + $"3. {HtmlCompat.FromHtml("<a href='https://github.com/sebastienros/jint'> Javascript Interpreter for .NET </a>", HtmlCompat.FromHtmlModeLegacy)}\n" + $"4. {HtmlCompat.FromHtml("<a href='https://github.com/JamesNK/Newtonsoft.Json'> Newtonsoft Json </a>", HtmlCompat.FromHtmlModeLegacy)}\n" + $"5. {HtmlCompat.FromHtml("<a href='https://github.com/mattleibow/square-bindings'> Square Picasso </a>", HtmlCompat.FromHtmlModeLegacy)}\n" + $"6. {HtmlCompat.FromHtml("<a href='https://github.com/dotnet/roslyn'> .NET Roslyn </a>", HtmlCompat.FromHtmlModeLegacy)}"; }
void Init() { Button backButton = FindViewById <Button>(Resource.Id.arrow_back); backButton.ContentDescription = SettingsViewModel.SETTINGS_CHILD_PAGE_ACCESSIBILITY_BACK_BUTTON; TextView textField = FindViewById <TextView>(Resource.Id.settings_how_it_works_text); TextView titleField = FindViewById <TextView>(Resource.Id.settings_how_it_works_title); TextView linkField = FindViewById <TextView>(Resource.Id.settings_how_it_works_link); titleField.Text = SettingsPage2ViewModel.SETTINGS_PAGE_2_HEADER; textField.TextFormatted = HtmlCompat.FromHtml(SettingsPage2ViewModel.SETTINGS_PAGE_2_CONTENT, HtmlCompat.FromHtmlModeLegacy); string linkString = $"<a href=\"{SettingsPage2ViewModel.SETTINGS_PAGE_2_CONTENT_TEXT_PARAGRAPH_4_LINK}\">{SettingsPage2ViewModel.SETTINGS_PAGE_2_CONTENT_TEXT_PARAGRAPH_4_LINK_TEXT}</a>"; linkField.TextFormatted = HtmlCompat.FromHtml(linkString, HtmlCompat.FromHtmlModeLegacy); FormatLink(linkField); linkField.SetOnClickListener(new OnClickListener(this, SettingsPage2ViewModel.SETTINGS_PAGE_2_CONTENT_TEXT_PARAGRAPH_4_LINK)); backButton.Click += new SingleClick((sender, args) => Finish()).Run; }
private void Init() { // Generate and set correlation id for current authentication flow UpdateCorrelationId(LogUtils.GenerateCorrelationId()); _questionnaireViewModel = new QuestionnaireViewModel(); TextView questionnaireTitle = FindViewById <TextView>(Resource.Id.questionnaire_title); questionnaireTitle.Text = REGISTER_QUESTIONAIRE_HEADER; questionnaireTitle.ContentDescription = REGISTER_QUESTIONAIRE_HEADER; questionnaireTitle.SetAccessibilityDelegate(AccessibilityUtils.GetHeadingAccessibilityDelegate()); TextView questionnaireSubtitle = FindViewById <TextView>(Resource.Id.questionnaire_subtitle); ISpanned questionnaireSubtitleTextFormatted = HtmlCompat.FromHtml(REGISTER_QUESTIONAIRE_SYMPTOMONSET_TEXT, HtmlCompat.FromHtmlModeLegacy); questionnaireSubtitle.TextFormatted = questionnaireSubtitleTextFormatted; questionnaireSubtitle.ContentDescriptionFormatted = questionnaireSubtitleTextFormatted; _questionnaireButton = FindViewById <Button>(Resource.Id.questionnaire_button); _questionnaireButton.Text = REGISTER_QUESTIONAIRE_NEXT; _questionnaireButton.ContentDescription = REGISTER_QUESTIONAIRE_NEXT; _questionnaireButton.Click += OnNextButtonClick; _infoButton = FindViewById <ImageButton>(Resource.Id.questionnaire_info_button); _infoButton.ContentDescription = REGISTER_QUESTIONAIRE_ACCESSIBILITY_DATE_INFO_BUTTON; _infoButton.Click += OnInfoButtonPressed; _closeButton = FindViewById <Button>(Resource.Id.close_cross_btn); _closeButton.ContentDescription = SettingsViewModel.SETTINGS_ITEM_ACCESSIBILITY_CLOSE_BUTTON; _closeButton.Click += new SingleClick((o, ev) => ShowAreYouSureToExitDialog()).Run; PrepareRadioButtons(); View rootView = Window.DecorView.RootView; rootView.LayoutDirection = LayoutUtils.GetLayoutDirection(); }
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.Inflate(Resource.Layout.consent_settings_page_body, container, false); //get all consent paragraph layouts RelativeLayout RelativeLayout1 = view.FindViewById <RelativeLayout>(Resource.Id.consent_paragraph_frivillig_brug); RelativeLayout RelativeLayout2 = view.FindViewById <RelativeLayout>(Resource.Id.consent_paragraph_sadan_fungerer_appen); RelativeLayout RelativeLayout3 = view.FindViewById <RelativeLayout>(Resource.Id.consent_paragraph_hvad_registreres); RelativeLayout RelativeLayout4 = view.FindViewById <RelativeLayout>(Resource.Id.consent_paragraph_hvordan_accepterer); RelativeLayout RelativeLayout5 = view.FindViewById <RelativeLayout>(Resource.Id.consent_paragraph_ret); RelativeLayout RelativeLayout6 = view.FindViewById <RelativeLayout>(Resource.Id.consent_paragraph_kontaktregistringer); RelativeLayout RelativeLayout7 = view.FindViewById <RelativeLayout>(Resource.Id.consent_paragraph_mere); RelativeLayout RelativeLayout8 = view.FindViewById <RelativeLayout>(Resource.Id.consent_paragraph_behandlingen); RelativeLayout RelativeLayout9 = view.FindViewById <RelativeLayout>(Resource.Id.consent_paragraph_aendringer); TextView consentOneTitle = RelativeLayout1.FindViewById <TextView>(Resource.Id.consent_page_title); TextView consentTwoTitle = RelativeLayout2.FindViewById <TextView>(Resource.Id.consent_page_title); TextView consentThreeTitle = RelativeLayout3.FindViewById <TextView>(Resource.Id.consent_page_title); TextView consentFourTitle = RelativeLayout4.FindViewById <TextView>(Resource.Id.consent_page_title); TextView consentFiveTitle = RelativeLayout5.FindViewById <TextView>(Resource.Id.consent_page_title); TextView consentSixTitle = RelativeLayout6.FindViewById <TextView>(Resource.Id.consent_page_title); TextView consentSevenTitle = RelativeLayout7.FindViewById <TextView>(Resource.Id.consent_page_title); TextView consentEightTitle = RelativeLayout8.FindViewById <TextView>(Resource.Id.consent_page_title); TextView consentNineTitle = RelativeLayout9.FindViewById <TextView>(Resource.Id.consent_page_title); consentOneTitle.Text = ConsentViewModel.CONSENT_ONE_TITLE; consentTwoTitle.Text = ConsentViewModel.CONSENT_TWO_TITLE; consentThreeTitle.Text = ConsentViewModel.CONSENT_THREE_TITLE; consentFourTitle.Text = ConsentViewModel.CONSENT_FOUR_TITLE; consentFiveTitle.Text = ConsentViewModel.CONSENT_FIVE_TITLE; consentSixTitle.Text = ConsentViewModel.CONSENT_SIX_TITLE; consentSevenTitle.Text = ConsentViewModel.CONSENT_SEVEN_TITLE; consentEightTitle.Text = ConsentViewModel.CONSENT_EIGHT_TITLE; consentNineTitle.Text = ConsentViewModel.CONSENT_NINE_TITLE; consentOneTitle.ContentDescription = ConsentViewModel.CONSENT_ONE_TITLE.ToLower(); consentTwoTitle.ContentDescription = ConsentViewModel.CONSENT_TWO_TITLE.ToLower(); consentThreeTitle.ContentDescription = ConsentViewModel.CONSENT_THREE_TITLE.ToLower(); consentFourTitle.ContentDescription = ConsentViewModel.CONSENT_FOUR_TITLE.ToLower(); consentFiveTitle.ContentDescription = ConsentViewModel.CONSENT_FIVE_TITLE.ToLower(); consentSixTitle.ContentDescription = ConsentViewModel.CONSENT_SIX_TITLE.ToLower(); consentSevenTitle.ContentDescription = ConsentViewModel.CONSENT_SEVEN_TITLE.ToLower(); consentEightTitle.ContentDescription = ConsentViewModel.CONSENT_EIGHT_TITLE.ToLower(); consentNineTitle.ContentDescription = ConsentViewModel.CONSENT_NINE_TITLE.ToLower(); RelativeLayout1.FindViewById <TextView>(Resource.Id.consent_page_text).TextFormatted = HtmlCompat.FromHtml(ConsentViewModel.CONSENT_ONE_PARAGRAPH, HtmlCompat.FromHtmlModeLegacy); RelativeLayout2.FindViewById <TextView>(Resource.Id.consent_page_text).TextFormatted = HtmlCompat.FromHtml(ConsentViewModel.CONSENT_TWO_PARAGRAPH, HtmlCompat.FromHtmlModeLegacy); RelativeLayout3.FindViewById <TextView>(Resource.Id.consent_page_text).TextFormatted = HtmlCompat.FromHtml(ConsentViewModel.CONSENT_THREE_PARAGRAPH, HtmlCompat.FromHtmlModeLegacy); RelativeLayout4.FindViewById <TextView>(Resource.Id.consent_page_text).TextFormatted = HtmlCompat.FromHtml(ConsentViewModel.CONSENT_FOUR_PARAGRAPH, HtmlCompat.FromHtmlModeLegacy); RelativeLayout5.FindViewById <TextView>(Resource.Id.consent_page_text).TextFormatted = HtmlCompat.FromHtml(ConsentViewModel.CONSENT_FIVE_PARAGRAPH, HtmlCompat.FromHtmlModeLegacy); RelativeLayout6.FindViewById <TextView>(Resource.Id.consent_page_text).TextFormatted = HtmlCompat.FromHtml(ConsentViewModel.CONSENT_SIX_PARAGRAPH, HtmlCompat.FromHtmlModeLegacy); RelativeLayout7.FindViewById <TextView>(Resource.Id.consent_page_text).TextFormatted = HtmlCompat.FromHtml(ConsentViewModel.CONSENT_SEVEN_PARAGRAPH, HtmlCompat.FromHtmlModeLegacy); RelativeLayout8.FindViewById <TextView>(Resource.Id.consent_page_text).TextFormatted = HtmlCompat.FromHtml(ConsentViewModel.CONSENT_EIGHT_PARAGRAPH, HtmlCompat.FromHtmlModeLegacy); RelativeLayout9.FindViewById <TextView>(Resource.Id.consent_page_text).TextFormatted = HtmlCompat.FromHtml(ConsentViewModel.CONSENT_NINE_PARAGRAPH, HtmlCompat.FromHtmlModeLegacy); Button policyLinkBtn = view.FindViewById <Button>(Resource.Id.consent_paragraph_policy_btn); policyLinkBtn.Text = ConsentViewModel.CONSENT_SEVEN_BUTTON_TEXT; policyLinkBtn.Click += PolicyLinkBtn_Click; return(view); }
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.Inflate(Resource.Layout.consent_settings_page_body, container, false); RelativeLayout RelativeLayout4 = view.FindViewById <RelativeLayout>(Resource.Id.consent_paragraph_hvordan_accepterer); TextView contactInformation = RelativeLayout4.FindViewById <TextView>(Resource.Id.consent_page_text); contactInformation.TextAlignment = TextAlignment.ViewStart; contactInformation.TextFormatted = HtmlCompat.FromHtml(ConsentViewModel.CONSENT_FOUR_PARAGRAPH, HtmlCompat.FromHtmlModeLegacy); Linkify.AddLinks(contactInformation, MatchOptions.EmailAddresses | MatchOptions.PhoneNumbers); //ABOUT _aboutHeader = view.FindViewById <TextView>(Resource.Id.consent1_about_header); _aboutHeader.Text = ConsentViewModel.CONSENT_ONE_TITLE; _aboutText1 = view.FindViewById <TextView>(Resource.Id.consent1_about_text_section1); _aboutText1.Text = ConsentViewModel.CONSENT_ONE_PARAGRAPH_SECTION_ONE; _aboutText2 = view.FindViewById <TextView>(Resource.Id.consent1_about_text_section2); _aboutText2.Text = ConsentViewModel.CONSENT_ONE_PARAGRAPH_SECTION_TWO; //HOW IT WORKS _howitworksHeader = view.FindViewById <TextView>(Resource.Id.consent1_howitworks_header); _howitworksHeader.Text = ConsentViewModel.CONSENT_TWO_TITLE; _howitworksText1 = view.FindViewById <TextView>(Resource.Id.consent1_howitworks_text_section1); _howitworksText1.Text = ConsentViewModel.CONSENT_TWO_PARAGRAPH_SECTION_ONE; _howitworksText2 = view.FindViewById <TextView>(Resource.Id.consent1_howitworks_text_section2); _howitworksText2.Text = ConsentViewModel.CONSENT_TWO_PARAGRAPH_SECTION_TWO; _howitworksText3 = view.FindViewById <TextView>(Resource.Id.consent1_howitworks_text_section3); _howitworksText3.Text = ConsentViewModel.CONSENT_TWO_PARAGRAPH_SECTION_THREE; //SAMTYKKE _samtykkeText1 = view.FindViewById <TextView>(Resource.Id.consent1_samtykke_text_section1); _samtykkeText1.Text = ConsentViewModel.CONSENT_THREE_PARAGRAPH_SECTION_ONE; _samtykkeText2 = view.FindViewById <TextView>(Resource.Id.consent1_samtykke_text_section2); _samtykkeText2.Text = ConsentViewModel.CONSENT_THREE_PARAGRAPH_SECTION_TWO; //BEHANDLING AF PERSONOPLYSNINGWER _processingofpersonaldataText1 = view.FindViewById <TextView>(Resource.Id.consent1_processingofpersonaldata_text_section1); _processingofpersonaldataText1.Text = ConsentViewModel.CONSENT_FIVE_PARAGRAPH_SECTION_ONE; _processingofpersonaldataText2 = view.FindViewById <TextView>(Resource.Id.consent1_processingofpersonaldata_text_section2); _processingofpersonaldataText2.Text = ConsentViewModel.CONSENT_FIVE_PARAGRAPH_SECTION_TWO; Linkify.AddLinks(_processingofpersonaldataText2, MatchOptions.EmailAddresses); _processingofpersonaldataText3 = view.FindViewById <TextView>(Resource.Id.consent1_processingofpersonaldata_text_section3); _processingofpersonaldataText3.Text = ConsentViewModel.CONSENT_FIVE_PARAGRAPH_SECTION_THREE; //PERSONVERNERKLÆRINGEN LINK _policyLinkText = view.FindViewById <TextView>(Resource.Id.consent_paragraph_policy_link); _policyLinkText.TextFormatted = HtmlCompat.FromHtml($"<a href=\"{ConsentViewModel.CONSENT_SEVEN_LINK_URL}\">{ConsentViewModel.CONSENT_SEVEN_LINK_TEXT}</a>", HtmlCompat.FromHtmlModeLegacy); _policyLinkText.MovementMethod = new Android.Text.Method.LinkMovementMethod(); //SAMTYKKE, BOTTOM _samtykkebottomHeader = view.FindViewById <TextView>(Resource.Id.consent1_samtykkebottom_header); _samtykkebottomHeader.Text = ConsentViewModel.CONSENT_SIX_TITLE; _samtykkebottomText = view.FindViewById <TextView>(Resource.Id.consent1_samtykkebottom_text); _samtykkebottomText.Text = ConsentViewModel.CONSENT_SIX_PARAGRAPH; // CONTENT DESCRIPTIONS OF HEADER _aboutHeader.ContentDescription = ConsentViewModel.CONSENT_ONE_TITLE.ToLower(); _howitworksHeader.ContentDescription = ConsentViewModel.CONSENT_TWO_TITLE.ToLower(); _samtykkebottomHeader.ContentDescription = ConsentViewModel.CONSENT_SIX_TITLE.ToLower(); _aboutHeader.SetAccessibilityDelegate(AccessibilityUtils.GetHeadingAccessibilityDelegate()); _howitworksHeader.SetAccessibilityDelegate(AccessibilityUtils.GetHeadingAccessibilityDelegate()); _samtykkebottomHeader.SetAccessibilityDelegate(AccessibilityUtils.GetHeadingAccessibilityDelegate()); return(view); }
private void Init() { ImageButton backButton = FindViewById <ImageButton>(Resource.Id.arrow_back_general); backButton.ContentDescription = BACK_BUTTON_ACCESSIBILITY_TEXT; TextView titleField = FindViewById <TextView>(Resource.Id.settings_general_title); TextView explanationOne = FindViewById <TextView>(Resource.Id.settings_general_explanation); TextView explanationTwo = FindViewById <TextView>(Resource.Id.settings_general_explanation_two); TextView mobileDataHeader = FindViewById <TextView>(Resource.Id.settings_general_mobile_data_header); TextView mobileDataDesc = FindViewById <TextView>(Resource.Id.settings_general_mobile_data_desc); TextView languageHeader = FindViewById <TextView>(Resource.Id.settings_general_select_lang_header); TextView languageDesc = FindViewById <TextView>(Resource.Id.settings_general_select_lang_desc_one); TextView languageLink = FindViewById <TextView>(Resource.Id.settings_general_link); TextView linkLayout = FindViewById <TextView>(Resource.Id.settings_general_link); titleField.Text = SETTINGS_GENERAL_TITLE; explanationOne.Text = SETTINGS_GENERAL_EXPLANATION_ONE; explanationTwo.Text = SETTINGS_GENERAL_EXPLANATION_TWO; mobileDataHeader.Text = SETTINGS_GENERAL_MOBILE_DATA_HEADER; mobileDataDesc.Text = SETTINGS_GENERAL_MOBILE_DATA_DESC; languageHeader.Text = SETTINGS_GENERAL_CHOOSE_LANGUAGE_HEADER; languageDesc.Text = SETTINGS_GENERAL_RESTART_REQUIRED_TEXT; languageLink.TextAlignment = TextAlignment.ViewStart; languageLink.ContentDescription = SETTINGS_GENERAL_ACCESSIBILITY_MORE_INFO_BUTTON_TEXT; titleField.SetAccessibilityDelegate(AccessibilityUtils.GetHeadingAccessibilityDelegate()); mobileDataHeader.SetAccessibilityDelegate(AccessibilityUtils.GetHeadingAccessibilityDelegate()); languageHeader.SetAccessibilityDelegate(AccessibilityUtils.GetHeadingAccessibilityDelegate()); languageLink.TextFormatted = HtmlCompat.FromHtml($"<a href=\"{SETTINGS_GENERAL_MORE_INFO_LINK}\">{SETTINGS_GENERAL_MORE_INFO_BUTTON_TEXT}</a>", HtmlCompat.FromHtmlModeLegacy); languageLink.MovementMethod = new Android.Text.Method.LinkMovementMethod(); RadioGroup radioGroup = FindViewById <RadioGroup>(Resource.Id.settings_general_select_lang_radio_group); RadioButton englishRadioButton = FindViewById <RadioButton>(Resource.Id.settings_general_english); RadioButton bokmalRadioButton = FindViewById <RadioButton>(Resource.Id.settings_general_bokmal); RadioButton nynorskRadioButton = FindViewById <RadioButton>(Resource.Id.settings_general_nynorsk); RadioButton polishRadioButton = FindViewById <RadioButton>(Resource.Id.settings_general_polish); RadioButton somaliRadioButton = FindViewById <RadioButton>(Resource.Id.settings_general_somali); RadioButton tigrinyaRadioButton = FindViewById <RadioButton>(Resource.Id.settings_general_tigrinya); RadioButton arabicRadioButton = FindViewById <RadioButton>(Resource.Id.settings_general_arabic); RadioButton urduRadioButton = FindViewById <RadioButton>(Resource.Id.settings_general_urdu); RadioButton lithuanianRadioButton = FindViewById <RadioButton>(Resource.Id.settings_general_lithuanian); englishRadioButton.Text = SETTINGS_GENERAL_EN; bokmalRadioButton.Text = SETTINGS_GENERAL_NB; nynorskRadioButton.Text = SETTINGS_GENERAL_NN; polishRadioButton.Text = SETTINGS_GENERAL_PL; somaliRadioButton.Text = SETTINGS_GENERAL_SO; tigrinyaRadioButton.Text = SETTINGS_GENERAL_TI; arabicRadioButton.Text = SETTINGS_GENERAL_AR; urduRadioButton.Text = SETTINGS_GENERAL_UR; lithuanianRadioButton.Text = SETTINGS_GENERAL_LT; string appLanguage = LocalesService.GetLanguage(); switch (appLanguage) { case "en": englishRadioButton.Checked = true; break; case "nn": nynorskRadioButton.Checked = true; break; case "pl": polishRadioButton.Checked = true; break; case "so": somaliRadioButton.Checked = true; break; case "ti": tigrinyaRadioButton.Checked = true; break; case "ar": arabicRadioButton.Checked = true; break; case "ur": urduRadioButton.Checked = true; break; case "lt": lithuanianRadioButton.Checked = true; break; default: bokmalRadioButton.Checked = true; break; } radioGroup.SetOnCheckedChangeListener(new OnCheckedChangeListener(this)); SwitchCompat switchButton = FindViewById <SwitchCompat>(Resource.Id.settings_general_switch); switchButton.Checked = _viewModel.GetStoredCheckedState(); switchButton.CheckedChange += OnCheckedChange; backButton.Click += new StressUtils.SingleClick((sender, args) => Finish()).Run; // Layout direction logic View rootView = Window.DecorView.RootView; rootView.LayoutDirection = LayoutUtils.GetLayoutDirection(); backButton.SetBackgroundResource(LayoutUtils.GetBackArrow()); languageLink.SetCompoundDrawablesRelativeWithIntrinsicBounds(null, null, ContextCompat.GetDrawable(this, LayoutUtils.GetForwardArrow()), null); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.welcome_page_five); LinearLayout headerLayout = FindViewById <LinearLayout>(Resource.Id.consent_header); TextView header = headerLayout.FindViewById <TextView>(Resource.Id.welcome_page_five_title); header.Text = ConsentViewModel.WELCOME_PAGE_CONSENT_TITLE; Button previousButton = FindViewById <Button>(Resource.Id.welcome_page_five_prev_button); previousButton.Click += new SingleClick(PreviousButtonPressed, 500).Run; previousButton.Text = WelcomeViewModel.PREVIOUS_PAGE_BUTTON_TEXT; Button nextButton = FindViewById <Button>(Resource.Id.welcome_page_five_button_next); nextButton.Click += new SingleClick(NextButtonPressed, 500).Run; nextButton.Text = WelcomeViewModel.NEXT_PAGE_BUTTON_TEXT; _switchCustom = FindViewById <SwitchCompat>(Resource.Id.welcome_page_five_switch); _switchCustom.CheckedChange += OnCheckedChange; _switchCustom.ContentDescription = ConsentViewModel.SWITCH_ACCESSIBILITY_CONSENT_SWITCH_DESCRIPTOR; _consentWarning = FindViewById <LinearLayout>(Resource.Id.welcome_page_five_consent_warning); SetConsentWarningShown(false); _consentWarningTextView = FindViewById <TextView>(Resource.Id.welcome_page_five_consent_warning_text); _consentWarningTextView.Text = ConsentViewModel.CONSENT_REQUIRED; TextView consentTextView = FindViewById <TextView>(Resource.Id.welcome_page_five_switch_text); consentTextView.Text = ConsentViewModel.GIVE_CONSENT_TEXT; consentTextView.LabelFor = _switchCustom.Id; RelativeLayout RelativeLayout1 = FindViewById <RelativeLayout>(Resource.Id.consent_paragraph_frivillig_brug); RelativeLayout RelativeLayout2 = FindViewById <RelativeLayout>(Resource.Id.consent_paragraph_sadan_fungerer_appen); RelativeLayout RelativeLayout3 = FindViewById <RelativeLayout>(Resource.Id.consent_paragraph_hvad_registreres); RelativeLayout RelativeLayout4 = FindViewById <RelativeLayout>(Resource.Id.consent_paragraph_hvordan_accepterer); RelativeLayout RelativeLayout5 = FindViewById <RelativeLayout>(Resource.Id.consent_paragraph_ret); RelativeLayout RelativeLayout6 = FindViewById <RelativeLayout>(Resource.Id.consent_paragraph_kontaktregistringer); RelativeLayout RelativeLayout7 = FindViewById <RelativeLayout>(Resource.Id.consent_paragraph_mere); RelativeLayout RelativeLayout8 = FindViewById <RelativeLayout>(Resource.Id.consent_paragraph_behandlingen); RelativeLayout RelativeLayout9 = FindViewById <RelativeLayout>(Resource.Id.consent_paragraph_aendringer); TextView consentOneTitle = RelativeLayout1.FindViewById <TextView>(Resource.Id.consent_page_title); TextView consentTwoTitle = RelativeLayout2.FindViewById <TextView>(Resource.Id.consent_page_title); TextView consentThreeTitle = RelativeLayout3.FindViewById <TextView>(Resource.Id.consent_page_title); TextView consentFourTitle = RelativeLayout4.FindViewById <TextView>(Resource.Id.consent_page_title); TextView consentFiveTitle = RelativeLayout5.FindViewById <TextView>(Resource.Id.consent_page_title); TextView consentSixTitle = RelativeLayout6.FindViewById <TextView>(Resource.Id.consent_page_title); TextView consentSevenTitle = RelativeLayout7.FindViewById <TextView>(Resource.Id.consent_page_title); TextView consentEightTitle = RelativeLayout8.FindViewById <TextView>(Resource.Id.consent_page_title); TextView consentNineTitle = RelativeLayout9.FindViewById <TextView>(Resource.Id.consent_page_title); consentOneTitle.Text = ConsentViewModel.CONSENT_ONE_TITLE; consentTwoTitle.Text = ConsentViewModel.CONSENT_TWO_TITLE; consentThreeTitle.Text = ConsentViewModel.CONSENT_THREE_TITLE; consentFourTitle.Text = ConsentViewModel.CONSENT_FOUR_TITLE; consentFiveTitle.Text = ConsentViewModel.CONSENT_FIVE_TITLE; consentSixTitle.Text = ConsentViewModel.CONSENT_SIX_TITLE; consentSevenTitle.Text = ConsentViewModel.CONSENT_SEVEN_TITLE; consentEightTitle.Text = ConsentViewModel.CONSENT_EIGHT_TITLE; consentNineTitle.Text = ConsentViewModel.CONSENT_NINE_TITLE; consentOneTitle.ContentDescription = ConsentViewModel.CONSENT_ONE_TITLE.ToLower(); consentTwoTitle.ContentDescription = ConsentViewModel.CONSENT_TWO_TITLE.ToLower(); consentThreeTitle.ContentDescription = ConsentViewModel.CONSENT_THREE_TITLE.ToLower(); consentFourTitle.ContentDescription = ConsentViewModel.CONSENT_FOUR_TITLE.ToLower(); consentFiveTitle.ContentDescription = ConsentViewModel.CONSENT_FIVE_TITLE.ToLower(); consentSixTitle.ContentDescription = ConsentViewModel.CONSENT_SIX_TITLE.ToLower(); consentSevenTitle.ContentDescription = ConsentViewModel.CONSENT_SEVEN_TITLE.ToLower(); consentEightTitle.ContentDescription = ConsentViewModel.CONSENT_EIGHT_TITLE.ToLower(); consentNineTitle.ContentDescription = ConsentViewModel.CONSENT_NINE_TITLE.ToLower(); RelativeLayout1.FindViewById <TextView>(Resource.Id.consent_page_text).TextFormatted = HtmlCompat.FromHtml(ConsentViewModel.CONSENT_ONE_PARAGRAPH, HtmlCompat.FromHtmlModeLegacy); RelativeLayout2.FindViewById <TextView>(Resource.Id.consent_page_text).TextFormatted = HtmlCompat.FromHtml(ConsentViewModel.CONSENT_TWO_PARAGRAPH, HtmlCompat.FromHtmlModeLegacy); RelativeLayout3.FindViewById <TextView>(Resource.Id.consent_page_text).TextFormatted = HtmlCompat.FromHtml(ConsentViewModel.CONSENT_THREE_PARAGRAPH, HtmlCompat.FromHtmlModeLegacy); RelativeLayout4.FindViewById <TextView>(Resource.Id.consent_page_text).TextFormatted = HtmlCompat.FromHtml(ConsentViewModel.CONSENT_FOUR_PARAGRAPH, HtmlCompat.FromHtmlModeLegacy); RelativeLayout5.FindViewById <TextView>(Resource.Id.consent_page_text).TextFormatted = HtmlCompat.FromHtml(ConsentViewModel.CONSENT_FIVE_PARAGRAPH, HtmlCompat.FromHtmlModeLegacy); RelativeLayout6.FindViewById <TextView>(Resource.Id.consent_page_text).TextFormatted = HtmlCompat.FromHtml(ConsentViewModel.CONSENT_SIX_PARAGRAPH, HtmlCompat.FromHtmlModeLegacy); RelativeLayout7.FindViewById <TextView>(Resource.Id.consent_page_text).TextFormatted = HtmlCompat.FromHtml(ConsentViewModel.CONSENT_SEVEN_PARAGRAPH, HtmlCompat.FromHtmlModeLegacy); RelativeLayout8.FindViewById <TextView>(Resource.Id.consent_page_text).TextFormatted = HtmlCompat.FromHtml(ConsentViewModel.CONSENT_EIGHT_PARAGRAPH, HtmlCompat.FromHtmlModeLegacy); RelativeLayout9.FindViewById <TextView>(Resource.Id.consent_page_text).TextFormatted = HtmlCompat.FromHtml(ConsentViewModel.CONSENT_NINE_PARAGRAPH, HtmlCompat.FromHtmlModeLegacy); Button policyLinkBtn = FindViewById <Button>(Resource.Id.consent_paragraph_policy_btn); policyLinkBtn.Text = ConsentViewModel.CONSENT_SEVEN_BUTTON_TEXT; policyLinkBtn.Click += PolicyLinkBtn_Click; }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.welcome_page_five); LinearLayout headerLayout = FindViewById <LinearLayout>(Resource.Id.consent_header); TextView header = headerLayout.FindViewById <TextView>(Resource.Id.welcome_page_five_title); header.Text = ConsentViewModel.WELCOME_PAGE_CONSENT_TITLE; Button previousButton = FindViewById <Button>(Resource.Id.welcome_page_five_prev_button); previousButton.Click += new SingleClick(PreviousButtonPressed, 500).Run; previousButton.Text = WelcomeViewModel.PREVIOUS_PAGE_BUTTON_TEXT; Button nextButton = FindViewById <Button>(Resource.Id.welcome_page_five_button_next); nextButton.Click += new SingleClick(NextButtonPressed, 500).Run; nextButton.Text = WelcomeViewModel.NEXT_PAGE_BUTTON_TEXT; _switchCustom = FindViewById <SwitchCompat>(Resource.Id.welcome_page_five_switch); _switchCustom.CheckedChange += OnCheckedChange; _switchCustom.ContentDescription = ConsentViewModel.SWITCH_ACCESSIBILITY_CONSENT_SWITCH_DESCRIPTOR; _consentWarning = FindViewById <LinearLayout>(Resource.Id.welcome_page_five_consent_warning); SetConsentWarningShown(false); _consentWarningTextView = FindViewById <TextView>(Resource.Id.welcome_page_five_consent_warning_text); _consentWarningTextView.Text = ConsentViewModel.CONSENT_REQUIRED; TextView consentTextView = FindViewById <TextView>(Resource.Id.welcome_page_five_switch_text); consentTextView.Text = ConsentViewModel.GIVE_CONSENT_TEXT; consentTextView.LabelFor = _switchCustom.Id; //ABOUT _aboutHeader = FindViewById <TextView>(Resource.Id.consent1_about_header); _aboutHeader.Text = ConsentViewModel.CONSENT_ONE_TITLE; _aboutText1 = FindViewById <TextView>(Resource.Id.consent1_about_text_section1); _aboutText1.Text = ConsentViewModel.CONSENT_ONE_PARAGRAPH_SECTION_ONE; _aboutText2 = FindViewById <TextView>(Resource.Id.consent1_about_text_section2); _aboutText2.Text = ConsentViewModel.CONSENT_ONE_PARAGRAPH_SECTION_TWO; //HOW IT WORKS _howitworksHeader = FindViewById <TextView>(Resource.Id.consent1_howitworks_header); _howitworksHeader.Text = ConsentViewModel.CONSENT_TWO_TITLE; _howitworksText1 = FindViewById <TextView>(Resource.Id.consent1_howitworks_text_section1); _howitworksText1.Text = ConsentViewModel.CONSENT_TWO_PARAGRAPH_SECTION_ONE; _howitworksText2 = FindViewById <TextView>(Resource.Id.consent1_howitworks_text_section2); _howitworksText2.Text = ConsentViewModel.CONSENT_TWO_PARAGRAPH_SECTION_TWO; //SAMTYKKE _samtykkeText1 = FindViewById <TextView>(Resource.Id.consent1_samtykke_text_section1); _samtykkeText1.Text = ConsentViewModel.CONSENT_THREE_PARAGRAPH_SECTION_ONE; _samtykkeText2 = FindViewById <TextView>(Resource.Id.consent1_samtykke_text_section2); _samtykkeText2.Text = ConsentViewModel.CONSENT_THREE_PARAGRAPH_SECTION_TWO; //BEHANDLING AF PERSONOPLYSNINGWER _behandlingafpersonoplysningerText = FindViewById <TextView>(Resource.Id.consent1_behandlingafpersonopl_text); _behandlingafpersonoplysningerText.Text = ConsentViewModel.CONSENT_FIVE_PARAGRAPH; //SAMTYKKE, BOTTOM _samtykkebottomHeader = FindViewById <TextView>(Resource.Id.consent1_samtykkebottom_header); _samtykkebottomHeader.Text = ConsentViewModel.CONSENT_SIX_TITLE; _samtykkebottomText = FindViewById <TextView>(Resource.Id.consent1_samtykkebottom_text); _samtykkebottomText.Text = ConsentViewModel.CONSENT_SIX_PARAGRAPH; RelativeLayout RelativeLayout4 = FindViewById <RelativeLayout>(Resource.Id.consent_paragraph_hvordan_accepterer); RelativeLayout4.FindViewById <TextView>(Resource.Id.consent_page_text).TextFormatted = HtmlCompat.FromHtml(ConsentViewModel.CONSENT_FOUR_PARAGRAPH, HtmlCompat.FromHtmlModeLegacy); Button policyLinkBtn = FindViewById <Button>(Resource.Id.consent_paragraph_policy_btn); policyLinkBtn.Text = ConsentViewModel.CONSENT_SEVEN_BUTTON_TEXT; policyLinkBtn.Click += PolicyLinkBtn_Click; // CONTENT DESCRIPTIONS OF HEADER _aboutHeader.ContentDescription = ConsentViewModel.CONSENT_ONE_TITLE.ToLower(); _howitworksHeader.ContentDescription = ConsentViewModel.CONSENT_TWO_TITLE.ToLower(); _samtykkebottomHeader.ContentDescription = ConsentViewModel.CONSENT_SIX_TITLE.ToLower(); HeadingAccessibilityDelegate headingAccessibilityDelegate = AccessibilityUtils.GetHeadingAccessibilityDelegate(); header.SetAccessibilityDelegate(headingAccessibilityDelegate); _aboutHeader.SetAccessibilityDelegate(headingAccessibilityDelegate); _howitworksHeader.SetAccessibilityDelegate(headingAccessibilityDelegate); _samtykkebottomHeader.SetAccessibilityDelegate(headingAccessibilityDelegate); }
public void UpdateCell(NoteCell cell) { ContentText.TextFormatted = HtmlCompat.FromHtml(cell.Text, HtmlCompat.FromHtmlModeLegacy, imageGetter, null); ContentText.MovementMethod = LinkMovementMethod.Instance; }
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.Inflate(Resource.Layout.consent_settings_page_body, container, false); RelativeLayout RelativeLayout4 = view.FindViewById <RelativeLayout>(Resource.Id.consent_paragraph_hvordan_accepterer); RelativeLayout4.FindViewById <TextView>(Resource.Id.consent_page_text).TextFormatted = HtmlCompat.FromHtml(ConsentViewModel.CONSENT_FOUR_PARAGRAPH, HtmlCompat.FromHtmlModeLegacy); //ABOUT _aboutHeader = view.FindViewById <TextView>(Resource.Id.consent1_about_header); _aboutHeader.Text = ConsentViewModel.CONSENT_ONE_TITLE; _aboutText1 = view.FindViewById <TextView>(Resource.Id.consent1_about_text_section1); _aboutText1.Text = ConsentViewModel.CONSENT_ONE_PARAGRAPH_SECTION_ONE; _aboutText2 = view.FindViewById <TextView>(Resource.Id.consent1_about_text_section2); _aboutText2.Text = ConsentViewModel.CONSENT_ONE_PARAGRAPH_SECTION_TWO; //HOW IT WORKS _howitworksHeader = view.FindViewById <TextView>(Resource.Id.consent1_howitworks_header); _howitworksHeader.Text = ConsentViewModel.CONSENT_TWO_TITLE; _howitworksText1 = view.FindViewById <TextView>(Resource.Id.consent1_howitworks_text_section1); _howitworksText1.Text = ConsentViewModel.CONSENT_TWO_PARAGRAPH_SECTION_ONE; _howitworksText2 = view.FindViewById <TextView>(Resource.Id.consent1_howitworks_text_section2); _howitworksText2.Text = ConsentViewModel.CONSENT_TWO_PARAGRAPH_SECTION_TWO; //SAMTYKKE _samtykkeText1 = view.FindViewById <TextView>(Resource.Id.consent1_samtykke_text_section1); _samtykkeText1.Text = ConsentViewModel.CONSENT_THREE_PARAGRAPH_SECTION_ONE; _samtykkeText2 = view.FindViewById <TextView>(Resource.Id.consent1_samtykke_text_section2); _samtykkeText2.Text = ConsentViewModel.CONSENT_THREE_PARAGRAPH_SECTION_TWO; //BEHANDLING AF PERSONOPLYSNINGWER _behandlingafpersonoplysningerText = view.FindViewById <TextView>(Resource.Id.consent1_behandlingafpersonopl_text); _behandlingafpersonoplysningerText.Text = ConsentViewModel.CONSENT_FIVE_PARAGRAPH; //SAMTYKKE, BOTTOM _samtykkebottomHeader = view.FindViewById <TextView>(Resource.Id.consent1_samtykkebottom_header); _samtykkebottomHeader.Text = ConsentViewModel.CONSENT_SIX_TITLE; _samtykkebottomText = view.FindViewById <TextView>(Resource.Id.consent1_samtykkebottom_text); _samtykkebottomText.Text = ConsentViewModel.CONSENT_SIX_PARAGRAPH; Button policyLinkBtn = view.FindViewById <Button>(Resource.Id.consent_paragraph_policy_btn); policyLinkBtn.Text = ConsentViewModel.CONSENT_SEVEN_BUTTON_TEXT; policyLinkBtn.Click += PolicyLinkBtn_Click; // CONTENT DESCRIPTIONS OF HEADER _aboutHeader.ContentDescription = ConsentViewModel.CONSENT_ONE_TITLE.ToLower(); _howitworksHeader.ContentDescription = ConsentViewModel.CONSENT_TWO_TITLE.ToLower(); _samtykkebottomHeader.ContentDescription = ConsentViewModel.CONSENT_SIX_TITLE.ToLower(); return(view); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.welcome_page_five); View rootView = Window.DecorView.RootView; rootView.LayoutDirection = LayoutUtils.GetLayoutDirection(); LinearLayout headerLayout = FindViewById <LinearLayout>(Resource.Id.consent_header); TextView header = headerLayout.FindViewById <TextView>(Resource.Id.welcome_page_five_title); header.Text = ConsentViewModel.WELCOME_PAGE_CONSENT_TITLE; Button previousButton = FindViewById <Button>(Resource.Id.welcome_page_five_prev_button); previousButton.Click += new SingleClick(PreviousButtonPressed, 500).Run; previousButton.Text = WelcomeViewModel.PREVIOUS_PAGE_BUTTON_TEXT; Button nextButton = FindViewById <Button>(Resource.Id.welcome_page_five_button_next); nextButton.Click += new SingleClick(NextButtonPressed, 500).Run; nextButton.Text = WelcomeViewModel.NEXT_PAGE_BUTTON_TEXT; _switchCustom = FindViewById <SwitchCompat>(Resource.Id.welcome_page_five_switch); _switchCustom.CheckedChange += OnCheckedChange; _switchCustom.ContentDescription = ConsentViewModel.SWITCH_ACCESSIBILITY_CONSENT_SWITCH_DESCRIPTOR; _consentWarning = FindViewById <LinearLayout>(Resource.Id.welcome_page_five_consent_warning); SetConsentWarningShown(false); _consentWarningTextView = FindViewById <TextView>(Resource.Id.welcome_page_five_consent_warning_text); _consentWarningTextView.Text = ConsentViewModel.CONSENT_REQUIRED; TextView consentTextView = FindViewById <TextView>(Resource.Id.welcome_page_five_switch_text); consentTextView.Text = ConsentViewModel.GIVE_CONSENT_TEXT; consentTextView.LabelFor = _switchCustom.Id; //ABOUT _aboutHeader = FindViewById <TextView>(Resource.Id.consent1_about_header); _aboutHeader.Text = ConsentViewModel.CONSENT_ONE_TITLE; _aboutText1 = FindViewById <TextView>(Resource.Id.consent1_about_text_section1); _aboutText1.Text = ConsentViewModel.CONSENT_ONE_PARAGRAPH_SECTION_ONE; _aboutText2 = FindViewById <TextView>(Resource.Id.consent1_about_text_section2); _aboutText2.Text = ConsentViewModel.CONSENT_ONE_PARAGRAPH_SECTION_TWO; //HOW IT WORKS _howItWorksHeader = FindViewById <TextView>(Resource.Id.consent1_howitworks_header); _howItWorksHeader.Text = ConsentViewModel.CONSENT_TWO_TITLE; _howItWorksText1 = FindViewById <TextView>(Resource.Id.consent1_howitworks_text_section1); _howItWorksText1.Text = ConsentViewModel.CONSENT_TWO_PARAGRAPH_SECTION_ONE; _howItWorksText2 = FindViewById <TextView>(Resource.Id.consent1_howitworks_text_section2); _howItWorksText2.Text = ConsentViewModel.CONSENT_TWO_PARAGRAPH_SECTION_TWO; _howItWorksText3 = FindViewById <TextView>(Resource.Id.consent1_howitworks_text_section3); _howItWorksText3.Text = ConsentViewModel.CONSENT_TWO_PARAGRAPH_SECTION_THREE; //SAMTYKKE _samtykkeText1 = FindViewById <TextView>(Resource.Id.consent1_samtykke_text_section1); _samtykkeText1.Text = ConsentViewModel.CONSENT_THREE_PARAGRAPH_SECTION_ONE; _samtykkeText2 = FindViewById <TextView>(Resource.Id.consent1_samtykke_text_section2); _samtykkeText2.Text = ConsentViewModel.CONSENT_THREE_PARAGRAPH_SECTION_TWO; //BEHANDLING AF PERSONOPLYSNINGWER _processingofpersonaldataText1 = FindViewById <TextView>(Resource.Id.consent1_processingofpersonaldata_text_section1); _processingofpersonaldataText1.Text = ConsentViewModel.CONSENT_FIVE_PARAGRAPH_SECTION_ONE; _processingofpersonaldataText2 = FindViewById <TextView>(Resource.Id.consent1_processingofpersonaldata_text_section2); _processingofpersonaldataText2.Text = ConsentViewModel.CONSENT_FIVE_PARAGRAPH_SECTION_TWO; Linkify.AddLinks(_processingofpersonaldataText2, MatchOptions.EmailAddresses); _processingofpersonaldataText3 = FindViewById <TextView>(Resource.Id.consent1_processingofpersonaldata_text_section3); _processingofpersonaldataText3.Text = ConsentViewModel.CONSENT_FIVE_PARAGRAPH_SECTION_THREE; //PERSONVERNERKLÆRINGEN LINK _policyLinkText = FindViewById <TextView>(Resource.Id.consent_paragraph_policy_link); _policyLinkText.TextFormatted = HtmlCompat.FromHtml($"<a href=\"{ConsentViewModel.CONSENT_SEVEN_LINK_URL}\">{ConsentViewModel.CONSENT_SEVEN_LINK_TEXT}</a>", HtmlCompat.FromHtmlModeLegacy); _policyLinkText.MovementMethod = new Android.Text.Method.LinkMovementMethod(); //SAMTYKKE, BOTTOM _samtykkebottomHeader = FindViewById <TextView>(Resource.Id.consent1_samtykkebottom_header); _samtykkebottomHeader.Text = ConsentViewModel.CONSENT_SIX_TITLE; _samtykkebottomText = FindViewById <TextView>(Resource.Id.consent1_samtykkebottom_text); _samtykkebottomText.Text = ConsentViewModel.CONSENT_SIX_PARAGRAPH; RelativeLayout RelativeLayout4 = FindViewById <RelativeLayout>(Resource.Id.consent_paragraph_hvordan_accepterer); TextView contactInformation = RelativeLayout4.FindViewById <TextView>(Resource.Id.consent_page_text); contactInformation.TextAlignment = TextAlignment.ViewStart; contactInformation.TextFormatted = HtmlCompat.FromHtml(ConsentViewModel.CONSENT_FOUR_PARAGRAPH, HtmlCompat.FromHtmlModeLegacy); Linkify.AddLinks(contactInformation, MatchOptions.EmailAddresses | MatchOptions.PhoneNumbers); // CONTENT DESCRIPTIONS OF HEADER _aboutHeader.ContentDescription = ConsentViewModel.CONSENT_ONE_TITLE.ToLower(); _howItWorksHeader.ContentDescription = ConsentViewModel.CONSENT_TWO_TITLE.ToLower(); _samtykkebottomHeader.ContentDescription = ConsentViewModel.CONSENT_SIX_TITLE.ToLower(); HeadingAccessibilityDelegate headingAccessibilityDelegate = AccessibilityUtils.GetHeadingAccessibilityDelegate(); header.SetAccessibilityDelegate(headingAccessibilityDelegate); _aboutHeader.SetAccessibilityDelegate(headingAccessibilityDelegate); _howItWorksHeader.SetAccessibilityDelegate(headingAccessibilityDelegate); _samtykkebottomHeader.SetAccessibilityDelegate(headingAccessibilityDelegate); }