protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            SharedPush.Initialize();

            // Get our button from the layout resource,
            // and attach an event to it
            Button button = FindViewById <Button>(Resource.Id.myButton);

            button.Click += delegate
            {
                button.Text = $"{count++} clicks!";
                System.Diagnostics.Debug.WriteLine("Button clicked");
            };

            Switch consentButton = FindViewById <Switch>(Resource.Id.consentSwitch);

            consentButton.CheckedChange += (o, e) =>
            {
                SharedPush.ConsentStatusChanged(consentButton.Checked);
                System.Diagnostics.Debug.WriteLine("Changing consent state");
            };

            consentButton.Checked = SharedPush.UserDidProvideConsent();
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            PrivacyConsentControl.SelectedSegment = SharedPush.UserDidProvideConsent() ? 1 : 0;

            UITextField externalIdField = (UITextField)this.View.ViewWithTag(3);

            externalIdField.Delegate = textDelegate;
        }
Beispiel #3
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();


            // Perform any additional setup after loading the view, typically from a nib.
            Button.AccessibilityIdentifier = "myButton";
            Button.TouchUpInside          += delegate
            {
                SharedPush.RegisterIOS();
            };

            PrivacyConsentControl.SelectedSegment = SharedPush.UserDidProvideConsent() ? 1 : 0;
        }