Exemple #1
0
        private void GoBack()
        {
            SupportActionBar.SetDisplayHomeAsUpEnabled(false);
            toolbar.Title = "Timesheet Tracker";
            bottomNavigation.Visibility = ViewStates.Visible;

            InputMethodManager imm = InputMethodManager.FromContext(this.ApplicationContext);

            imm.HideSoftInputFromInputMethod(this.Window.DecorView.WindowToken, HideSoftInputFlags.NotAlways);

            LoadFragment(_pastFragmentId);
        }
Exemple #2
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            mContainer = container;
            View view = inflater.Inflate(Resource.Layout.RegisterTab, container, false);

            progressBar = view.FindViewById <ProgressBar>(Resource.Id.circularProgress);
            cfID        = view.FindViewById <EditText>(Resource.Id.cfID);
            Button    registerButton = view.FindViewById <Button>(Resource.Id.registerButton);
            ImageView infoButton     = view.FindViewById <ImageView>(Resource.Id.questionMark);
            ViewPager viewPager      = this.Activity.FindViewById <ViewPager>(Resource.Id.viewpager);

            registerButton.Enabled = false;

            registerButton.SetBackgroundColor(Android.Graphics.Color.Rgb(239, 239, 239));
            cfID.TextChanged += (sender, e) =>
            {
                string CFID = cfID.Text;
                if (string.IsNullOrWhiteSpace(CFID))
                {
                    registerButton.Enabled = false;
                    registerButton.SetBackgroundColor(Android.Graphics.Color.Rgb(239, 239, 239));
                }
                else
                {
                    registerButton.Enabled = true;
                    registerButton.SetBackgroundResource(Resource.Drawable.turquoisebutton);
                }
            };

            imm = (InputMethodManager)this.Activity.GetSystemService(Context.InputMethodService);

            viewPager.PageSelected += (sender, e) =>
            {
                imm.HideSoftInputFromInputMethod(cfID.WindowToken, 0);
            };

            /*viewPager.LayoutChange += (sender, e) =>
             * {
             *  imm.HideSoftInputFromInputMethod(cfID.WindowToken, 0);
             * };*/

            infoButton.Click     += InfoButton_Click;
            registerButton.Click += RegisterButton_Click;
            registerButton.Click += (sender, e) =>
            {
            };
            return(view);
        }
Exemple #3
0
        private void SendInlineResponse_Click(object sender, EventArgs e)
        {
            ImageButton actionButton = sender as ImageButton;
            OpenAction  openAction   = actionButton.GetTag(DefaultActionIdentificator) as OpenAction;

            openAction.SendInlineResponse(InlineResponse.Text);
            InlineResponse.Text            = string.Empty;
            NotificationActions.Visibility = ViewStates.Visible;
            InlineResponseNotificationContainer.Visibility = ViewStates.Invisible;
            // Check if no view has focus:
            View view = NotificationFragment?.Activity?.CurrentFocus;

            if (view != null)
            {
                InputMethodManager imm = (InputMethodManager)NotificationFragment.Activity.GetSystemService(Context.InputMethodService);
                imm.HideSoftInputFromInputMethod(view.WindowToken, 0);
            }
            SendInlineResponseAvailabityChanged?.Invoke(null, false);
        }
        public void Reset()
        {
            cardNumberTextView.GetEditText().Text    = "";
            cardExpiryCv2TextView.GetEditText().Text = "";
            currentCard = CardType.UNKNOWN;
            cardImageView.SetCardImage(JudoSDKManager.GetCardResourceId(Context, currentCard, true), false);

            if (HintTextView != null)
            {
                HintTextView.SetText(Resource.String.enter_card_no);
            }

            SetStage(Stage.STAGE_CC_NO);

            //Show keyboard
            InputMethodManager imm = (InputMethodManager)Context.GetSystemService(Context.InputMethodService);

            imm.HideSoftInputFromInputMethod(cardNumberTextView.WindowToken, 0);
            imm.ToggleSoftInput(ShowFlags.Forced, 0);
        }
        void Init()
        {
            etEmailInvite = this.FindViewById <EditText>(Resource.Id.etEmailInvite);
            etEmailInvite.EditorAction += (sender, args) =>
            {
                if (args.ActionId == ImeAction.Done)
                {
                    ViewModel.InviteCommand.Execute();
                }
            };
            etEmailInvite.FocusChange += (sender, args) =>
            {
                if (!args.HasFocus)
                {
                    InputMethodManager imm = (InputMethodManager)GetSystemService(Context.InputMethodService);
                    imm.HideSoftInputFromInputMethod(etEmailInvite.WindowToken, 0);

                    Window.SetSoftInputMode(SoftInput.StateHidden);

                    ViewModel.InviteCommand.Execute();
                }
            };
        }