Beispiel #1
0
        private void SyncContent()
        {
            if (CurrentMode == Mode.Login)
            {
                LoginButton.SetText(isAuthenticating ? Resource.String.LoginButtonProgressText : Resource.String.LoginButtonText);
                LegalTextView.Visibility = ViewStates.Gone;
                GoogleLoginButton.SetText(Resource.String.LoginGoogleButtonText);
            }
            else
            {
                LoginButton.SetText(isAuthenticating ? Resource.String.LoginButtonSignupProgressText : Resource.String.LoginSignupButtonText);
                LegalTextView.SetText(FormattedLegalText, TextView.BufferType.Spannable);
                LegalTextView.MovementMethod = Android.Text.Method.LinkMovementMethod.Instance;
                LegalTextView.Visibility     = ViewStates.Visible;
                GoogleLoginButton.SetText(Resource.String.LoginSignupGoogleButtonText);
            }

            LoginTabRadioButton.Enabled  = !isAuthenticating;
            SignupTabRadioButton.Enabled = !isAuthenticating;
            TabsRadioGroup.Enabled       = !isAuthenticating;
            EmailEditText.Enabled        = !isAuthenticating;
            PasswordEditText.Enabled     = !isAuthenticating;
            GoogleLoginButton.Enabled    = !isAuthenticating;

            SyncLoginButton();
        }
Beispiel #2
0
        private void SyncContent()
        {
            // Views not loaded yet/anymore?
            if (LoginButton == null)
            {
                return;
            }

            if (CurrentMode == Mode.Login)
            {
                LoginButton.SetText(isAuthenticating ? Resource.String.LoginButtonProgressText : Resource.String.LoginButtonText);
                LegalTextView.Visibility = ViewStates.Gone;
                GoogleLoginButton.SetText(Resource.String.LoginGoogleButtonText);
                SwitchModeButton.SetText(Resource.String.SignupViewButtonText);
            }
            else
            {
                LoginButton.SetText(isAuthenticating ? Resource.String.LoginButtonSignupProgressText : Resource.String.LoginSignupButtonText);
                LegalTextView.SetText(FormattedLegalText, TextView.BufferType.Spannable);
                LegalTextView.MovementMethod = Android.Text.Method.LinkMovementMethod.Instance;
                LegalTextView.Visibility     = ViewStates.Visible;
                GoogleLoginButton.SetText(Resource.String.LoginSignupGoogleButtonText);
                SwitchModeButton.SetText(Resource.String.LoginViewButtonText);
            }
            EmailEditText.Enabled     = !isAuthenticating;
            PasswordEditText.Enabled  = !isAuthenticating;
            GoogleLoginButton.Enabled = !isAuthenticating;

            SyncLoginButton();
        }