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); }
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); }