protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.ac_sign_in);
            EditText editEmail    = FindViewById <EditText>(Resource.Id.editEmail);
            EditText editPassword = FindViewById <EditText>(Resource.Id.editPassword);

            ProgressGenerator   progressGenerator = new ProgressGenerator(this);
            ActionProcessButton btnSignIn         = FindViewById <ActionProcessButton>(Resource.Id.btnSignIn);
            Bundle extras = Intent.Extras;

            if (extras != null && extras.GetBoolean(EXTRAS_ENDLESS_MODE))
            {
                btnSignIn.setMode(ActionProcessButton.Mode.ENDLESS);
            }
            else
            {
                btnSignIn.setMode(ActionProcessButton.Mode.PROGRESS);
            }
            btnSignIn.Click += (object sender, EventArgs e) => {
                this.RunOnUiThread(() => {
                    progressGenerator.start(btnSignIn, this);
                    btnSignIn.Enabled    = false;
                    editEmail.Enabled    = false;
                    editPassword.Enabled = false;
                });
            };
        }
Exemple #2
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            Cancelable = false;
            Dialog.Window.Attributes.WindowAnimations = Resource.Animation.modal_in;
            var ignore = base.OnCreateView(inflater, container, savedInstanceState);
            var view   = this.BindingInflate(Resource.Layout.LoginView, null);

            var set = this.CreateBindingSet <LoginView, LoginViewModel>();

            set.Bind(this).For(v => v.LoginInteraction).To(viewModel => viewModel.LoginInteraction).OneWay();
            set.Apply();


            _btLogin = view.FindViewById <ActionProcessButton>(Resource.Id.btLogin);
            _btLogin.SetBackgroundColor(Color.ParseColor("#3b5999"));
            _btLogin.setMode(ActionProcessButton.Mode.ENDLESS);
            _btLogin.Click += (sender, args) =>
            {
                _btLogin.setProgress(1);
                var token = SilentLogin();
                if (string.IsNullOrEmpty(token))
                {
                    FacebookLogin();
                }
                else
                {
                    TokenSuccess(token);
                }
            };
            return(view);
        }
Exemple #3
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            Cancelable = false;
            var ignore = base.OnCreateView(inflater, container, savedInstanceState);

            var set = this.CreateBindingSet <NewGameView, NewGameViewModel>();

            set.Bind(this).For(v => v.CreateGameInteraction).To(viewModel => viewModel.CreateGameInteraction).OneWay();
            set.Apply();


            var view = this.BindingInflate(Resource.Layout.NewGame, null);
            // grid
            var grid = (MvxGridView)view.FindViewById(Resource.Id.grid);

            grid.Adapter = new GridPlayerAdapter(Context, (IMvxAndroidBindingContext)BindingContext);

            // button
            ProgressGenerator progressGenerator = new ProgressGenerator(this);

            _btnUpload = view.FindViewById <ActionProcessButton>(Resource.Id.btNext);
            _btnUpload.setMode(ActionProcessButton.Mode.ENDLESS);
            _btnUpload.Click += (object sender, EventArgs e) =>
            {
                //progressGenerator.start(btnUpload, Activity);
                _btnUpload.setProgress(1);
                ViewModel.NextCommand.Execute(null);
            };

            return(view);
        }
Exemple #4
0
 private void setUI()
 {
     takeBtn       = FindViewById <Button>(Resource.Id.Upload_takeBtn);
     chooseBtn     = FindViewById <Button>(Resource.Id.Upload_chooseBtn);
     clearBtn      = FindViewById <Button>(Resource.Id.Upload_clearBtn);
     uploadBtn     = FindViewById <ActionProcessButton>(Resource.Id.Upload_uploadBtn);
     categoryField = FindViewById <EditText>(Resource.Id.Upload_categoryField);
     imageView     = FindViewById <ImageView>(Resource.Id.Upload_imageView);
 }
Exemple #5
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.ac_states);

            mBtnAction   = FindViewById <ActionProcessButton>(Resource.Id.btnAction);
            mBtnSubmit   = FindViewById <SubmitProcessButton>(Resource.Id.btnSubmit);
            mBtnGenerate = FindViewById <GenerateProcessButton>(Resource.Id.btnGenerate);

            FindViewById(Resource.Id.btnProgressLoading).SetOnClickListener(this);
            FindViewById(Resource.Id.btnProgressError).SetOnClickListener(this);
            FindViewById(Resource.Id.btnProgressComplete).SetOnClickListener(this);
            FindViewById(Resource.Id.btnProgressNormal).SetOnClickListener(this);
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.Upload);

            SetActionBar("Upload");

            takeBtn       = FindViewById <Button>(Resource.Id.Upload_takeBtn);
            chooseBtn     = FindViewById <Button>(Resource.Id.Upload_chooseBtn);
            clearBtn      = FindViewById <Button>(Resource.Id.Upload_clearBtn);
            uploadBtn     = FindViewById <ActionProcessButton>(Resource.Id.Upload_uploadBtn);
            categoryField = FindViewById <EditText>(Resource.Id.Upload_categoryField);
            imageView     = FindViewById <ImageView>(Resource.Id.Upload_imageView);

            imageClearUI();

            setEvents();
        }