예제 #1
0
        /**
         * Launches new Activity and finishes, triggering an autofill save request if the user entered
         * any new data.
         */
        private void Submit()
        {
            var intent = WelcomeActivity.GetStartActivityIntent(this);

            StartActivity(intent);
            Finish();
        }
 protected override void OnCreate(Bundle savedInstanceState)
 {
     base.OnCreate(savedInstanceState);
     SetContentView(Resource.Layout.email_compose_activity);
     FindViewById(Resource.Id.sendButton).Click += delegate
     {
         StartActivity(WelcomeActivity.GetStartActivityIntent(this));
         Finish();
     };
 }
        /**
         * Emulates a login action.
         */
        private void Login()
        {
            var username = mUsernameLine.GetText().ToString();
            var password = mPasswordLine.GetText().ToString();
            var valid    = IsValidCredentials(username, password);

            if (valid)
            {
                var intent = WelcomeActivity.GetStartActivityIntent(this);
                StartActivity(intent);
                Finish();
            }
            else
            {
                Toast.MakeText(this, "Authentication failed.", ToastLength.Short).Show();
            }
        }
예제 #4
0
        /**
         * Emulates a login action.
         */
        private void Login()
        {
            var  username = mUsernameAutoCompleteField.Text;
            var  password = mPasswordField.Text;
            bool valid    = IsValidCredentials(username, password);

            if (valid)
            {
                var intent = WelcomeActivity.GetStartActivityIntent(this);
                StartActivity(intent);
                Finish();
            }
            else
            {
                Toast.MakeText(this, "Authentication failed.", ToastLength.Short).Show();
            }
        }