Example #1
0
 public LoginViewModel(LoginActivityViewInterface view,
                       LoginInteractor interactor)
 {
     mView = view;
     mView.setViewModel(this);
     mInteractor = interactor;
 }
Example #2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.login_activity);

            mInteractor = new LoginInteractor(ApplicationContext);
            mViewModel  = new LoginViewModel(this, mInteractor);

            // Setup UI
            mLoadingIndicator = FindViewById(Resource.Id.login_progress);

            mLoginContainer = FindViewById(Resource.Id.login_container);

            mUserName = FindViewById <EditText>(Resource.Id.txtUserName);
            mPassword = FindViewById <EditText>(Resource.Id.txtPassword);

            mLoginButton        = FindViewById <Button>(Resource.Id.btnLogin);
            mLoginButton.Click += mLoginButton_Click;
        }