Exemplo n.º 1
0
            public static void Start (FragmentManager mgr, string email, RegisterUserViewModel vm)
            {
                // Find old fragment to replace
                var frag = mgr.FindFragmentByTag ("google_auth");
                if (frag != null) {
                    var authFrag = frag as GoogleAuthFragment;
                    if (authFrag != null && authFrag.IsAuthenticating) {
                        // Authentication going on still, do nothing.
                        return;
                    }
                }

                viewModel = vm;

                var tx = mgr.BeginTransaction ();
                if (frag != null) {
                    tx.Remove (frag);
                }
                tx.Add (new GoogleAuthFragment (email), "google_auth");
                tx.Commit ();
            }
Exemplo n.º 2
0
 public GoogleAccountSelectionDialogFragment (RegisterUserViewModel vm)
 {
     viewModel = vm;
 }
Exemplo n.º 3
0
        public override void OnViewCreated (View view, Bundle savedInstanceState)
        {
            base.OnViewCreated (view, savedInstanceState);

            ViewModel = RegisterUserViewModel.Init ();

            registerBinding = this.SetBinding (() => ViewModel.IsRegistering, () => IsRegistering);
            isRegisteringBinding = this.SetBinding (() => ViewModel.IsRegistering).WhenSourceChanges (SyncLoadingState);
            isSuccessfulBinding = this.SetBinding (()=> ViewModel.IsSuccesful).WhenSourceChanges (SyncSuccessScreen);
        }