Example #1
0
        private void prepareViews()
        {
            ActivityIndicator.Alpha = 0;
            ActivityIndicator.StartAnimation();

            LoginButton.SetTitleColor(
                Color.Login.DisabledButtonColor.ToNativeColor(),
                UIControlState.Disabled
                );

            EmailTextField.ShouldReturn += _ => {
                PasswordTextField.BecomeFirstResponder();
                return(false);
            };

            PasswordTextField.ShouldReturn += _ =>
            {
                PasswordTextField.ResignFirstResponder();
                return(false);
            };

            PasswordTextField.ResignFirstResponder();

            ShowPasswordButton.SetupShowPasswordButton();
            prepareForgotPasswordButton();
        }
Example #2
0
        public override void ViewDidAppear(bool animated)
        {
            base.ViewDidAppear(animated);

            ActivityIndicator.Alpha = 0;
            ActivityIndicator.StartAnimation();
        }
Example #3
0
        private void prepareViews()
        {
            ActivityIndicator.Alpha = 0;
            ActivityIndicator.StartAnimation();

            SignupButton.SetTitleColor(
                Color.Login.DisabledButtonColor.ToNativeColor(),
                UIControlState.Disabled
                );

            EmailTextField.ShouldReturn += _ => {
                PasswordTextField.BecomeFirstResponder();
                return(false);
            };

            PasswordTextField.ShouldReturn += _ =>
            {
                PasswordTextField.ResignFirstResponder();
                return(false);
            };

            PasswordTextField.ResignFirstResponder();

            ShowPasswordButton.SetupShowPasswordButton();

            SelectCountryButton.SemanticContentAttribute = UISemanticContentAttribute.ForceRightToLeft;
            var spacing = 4;

            SelectCountryButton.ImageEdgeInsets = new UIEdgeInsets(0, spacing, 0, 0);
            SelectCountryButton.TitleEdgeInsets = new UIEdgeInsets(0, 0, 0, spacing);
        }
Example #4
0
        private void prepareViews()
        {
            NavigationController.NavigationBarHidden = true;

            ActivityIndicator.Alpha = 0;
            ActivityIndicator.StartAnimation();

            SignupButton.SetTitleColor(
                Color.Login.DisabledButtonColor.ToNativeColor(),
                UIControlState.Disabled
                );

            EmailTextField.ShouldReturn += _ => {
                PasswordTextField.BecomeFirstResponder();
                return(false);
            };

            PasswordTextField.ShouldReturn += _ =>
            {
                ViewModel.SignupCommand.Execute();
                PasswordTextField.ResignFirstResponder();
                return(false);
            };

            View.AddGestureRecognizer(new UITapGestureRecognizer(() =>
            {
                EmailTextField.ResignFirstResponder();
                PasswordTextField.ResignFirstResponder();
            }));

            SignupShakeTriggerButton.TouchUpInside += (sender, e) =>
            {
                if (!ViewModel.Email.IsValid)
                {
                    EmailTextField.Shake();
                }
                if (!ViewModel.Password.IsValid)
                {
                    PasswordTextField.Shake();
                }
                if (!ViewModel.IsCountryValid)
                {
                    SelectCountryButton.Shake();
                    CountryNotSelectedImageView.Shake();
                    CountryDropDownCaretImageView.Shake();
                }
            };

            ShowPasswordButton.SetupShowPasswordButton();

            EmailTextField.ResignFirstResponder();
            PasswordTextField.ResignFirstResponder();
        }