Exemple #1
0
        private void MTrackIn_Click(object sender, EventArgs e)
        {
            loading.Visibility = ViewStates.Visible;
            inputMethodManager.ToggleSoftInput(InputMethodManager.ShowForced, 0);
            Thread thread = new Thread(trackin);

            thread.Start();
        }
Exemple #2
0
        private void MLogin_Click(object sender, EventArgs e)
        {
            mLoading.Visibility = ViewStates.Visible;
            mUser.Enabled       = false;
            mPass.Enabled       = false;
            imm.ToggleSoftInput(InputMethodManager.ShowForced, 0);
            Thread load = new Thread(Functions);

            load.Start();
        }
Exemple #3
0
        private void ShowVirtualKeyboard()
        {
            InputMethodManager inputMethodManager = _context.GetSystemService(Context.InputMethodService) as InputMethodManager;

            inputMethodManager.ShowSoftInput(_password, ShowFlags.Forced);
            inputMethodManager.ToggleSoftInput(ShowFlags.Forced, HideSoftInputFlags.ImplicitOnly);
        }
        private void ShowKeyboard(EditText userInput)
        {
            userInput.RequestFocus();
            InputMethodManager imm = (InputMethodManager)this.Activity.GetSystemService(Context.InputMethodService);

            imm.ToggleSoftInput(ShowFlags.Forced, 0);
        }
Exemple #5
0
        public void ShowKeyboard(View view)
        {
            view.RequestFocus();
            InputMethodManager imm = (InputMethodManager)ActivityContext.GetSystemService(Context.InputMethodService);

            imm.ToggleSoftInput(ShowFlags.Forced, 0);
        }
Exemple #6
0
        private void ShowInputMethod(View view)
        {
            InputMethodManager imm = AppCompatActivity?.GetSystemService(
                Context.InputMethodService) as InputMethodManager;

            imm?.ToggleSoftInput(0, HideSoftInputFlags.NotAlways);
        }
Exemple #7
0
        protected void ShowSoftKeyboard()
        {
            InputMethodManager mgr = (InputMethodManager)this.Activity.GetSystemService(Context.InputMethodService);

            mgr.ShowSoftInput(this.View, ShowFlags.Forced);
            mgr.ToggleSoftInput(ShowFlags.Forced, HideSoftInputFlags.ImplicitOnly);
        }
        public void Toggle()
        {
            InputMethodManager inputMethodManager =
                (InputMethodManager)CrossCurrentActivity.Current.Activity.GetSystemService(Context.InputMethodService);

            inputMethodManager?.ToggleSoftInput(ShowFlags.Forced, HideSoftInputFlags.ImplicitOnly);
        }
        public static void ShowKeyboard(View pView, InputMethodManager imm)
        {
            pView.RequestFocus();

            imm.ShowSoftInput(pView, ShowFlags.Forced);
            imm.ToggleSoftInput(ShowFlags.Forced, HideSoftInputFlags.ImplicitOnly);
        }
Exemple #10
0
        /// <summary>
        /// Attempts to force the keyboard to be displayed.
        /// </summary>
        /// <param name="focusedView">The UI element in focus that the keyboard should send keypresses to</param>
        public void ShowKeyboard(View focusedView)
        {
            InputMethodManager imm = (InputMethodManager)context.GetSystemService(Activity.InputMethodService);

            imm.ShowSoftInput(focusedView, ShowFlags.Forced);
            imm.ToggleSoftInput(ShowFlags.Forced, HideSoftInputFlags.ImplicitOnly);
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            View view = inflater.Inflate(Resource.Layout.categories, container, false);
            InputMethodManager imm = (InputMethodManager)Context.GetSystemService(Context.InputMethodService);

            categoriesRecicleView = view.FindViewById <RecyclerView>(Resource.Id.categoriesRecicleView);
            searchEditText        = view.FindViewById <EditText>(Resource.Id.searchEditText);
            var cancelButton  = view.FindViewById <Button>(Resource.Id.cancelButton);
            var accountButton = view.FindViewById <ImageButton>(Resource.Id.accountButton);

            listSearchRecycleView = view.FindViewById <RecyclerView>(Resource.Id.listSearchRecycleView);
            var basketButton = view.FindViewById <ImageButton>(Resource.Id.imageButton);

            fillCategories();
            fillSearch();

            searchEditText.SetFocusable(ViewFocusability.NotFocusable);

            searchEditText.AfterTextChanged += (sender, args) =>
            {
                if (!args.Equals(""))
                {
                    filter(args.ToString());
                }
            };

            searchEditText.Click += delegate
            {
                searchEditText.SetFocusable(ViewFocusability.Focusable);
                cancelButton.Visibility          = ViewStates.Visible;
                listSearchRecycleView.Visibility = ViewStates.Visible;
                imm.ToggleSoftInput(InputMethodManager.ShowForced, 0);
            };
            cancelButton.Click += delegate
            {
                searchEditText.SetFocusable(ViewFocusability.Focusable);
                cancelButton.Visibility = ViewStates.Invisible;
                searchEditText.Text     = "";
                view.ClearFocus();
                imm.HideSoftInputFromWindow(searchEditText.WindowToken, 0);
                listSearchRecycleView.Visibility = ViewStates.Invisible;
            };

            accountButton.Click += delegate
            {
                AccountActivity fragment = new AccountActivity();
                this.FragmentManager.BeginTransaction().Replace(Resource.Id.main_container, fragment, "account").AddToBackStack(null).Commit();
                listSearchRecycleView.Visibility = ViewStates.Invisible;
            };

            basketButton.Click += delegate
            {
                BasketActivity fragment = new BasketActivity();
                this.FragmentManager.BeginTransaction().Replace(Resource.Id.main_container, fragment, "basket").AddToBackStack(null).Commit();
                listSearchRecycleView.Visibility = ViewStates.Invisible;
            };


            return(view);
        }
        public void Close()
        {
            InputMethodManager inputMethodManager =
                (InputMethodManager)CrossCurrentActivity.Current.Activity.GetSystemService(Context.InputMethodService);

            inputMethodManager?.ToggleSoftInput(ShowFlags.Implicit, 0);
        }
Exemple #13
0
        void ShowKeyBoard(View view)
        {
            InputMethodManager imm = (InputMethodManager)Activity.GetSystemService(Context.InputMethodService);

            imm.ShowSoftInputFromInputMethod(view.WindowToken, ShowFlags.Forced);
            imm.ToggleSoftInput(ShowFlags.Forced, 0);
        }
Exemple #14
0
        private void CallKeyboard(EditText editText)
        {
            InputMethodManager inputMethodManager = this.GetSystemService(Context.InputMethodService) as InputMethodManager;

            inputMethodManager.ShowSoftInput(editText, ShowFlags.Forced);
            inputMethodManager.ToggleSoftInput(ShowFlags.Forced, HideSoftInputFlags.ImplicitOnly);
            editText.RequestFocus();
        }
        public static void ShowKeyboard(Context context, View pView)
        {
            pView.RequestFocus();
            InputMethodManager inputMethodManager = (InputMethodManager)context.GetSystemService(Context.InputMethodService);

            inputMethodManager.ShowSoftInput(pView, ShowFlags.Forced);
            inputMethodManager.ToggleSoftInput(ShowFlags.Forced, HideSoftInputFlags.ImplicitOnly);
        }
Exemple #16
0
 public void OnFocusChange(View v, bool hasFocus)
 {
     if (hasFocus)
     {
         InputMethodManager imm = (InputMethodManager)_context.GetSystemService(Context.InputMethodService);
         imm.ToggleSoftInput(InputMethodManager.ShowForced, 0);
     }
 }
        //Shows the soft keyboard
        public void showSoftKeyboard(Android.App.Activity activity, View view)
        {
            InputMethodManager inputMethodManager = (InputMethodManager)activity.GetSystemService(Context.InputMethodService);

            view.RequestFocus();
            inputMethodManager.ShowSoftInput(view, 0);
            inputMethodManager.ToggleSoftInput(ShowFlags.Forced, HideSoftInputFlags.ImplicitOnly);//personal line added
        }
Exemple #18
0
        protected internal void ShowKeyboard(AView inputView)
        {
            AObject temp = AndroidContext.GetSystemService(AContext.InputMethodService) ?? throw new NullReferenceException(nameof(Context.InputMethodService));

            using InputMethodManager inputMethodManager = (InputMethodManager)temp;
            inputMethodManager.ShowSoftInput(inputView, ShowFlags.Forced);
            inputMethodManager.ToggleSoftInput(ShowFlags.Forced, HideSoftInputFlags.ImplicitOnly);
        }
Exemple #19
0
        protected void ShowKeyboard(EditText editText)
        {
            InputMethodManager imm = (InputMethodManager)GetSystemService(Context.InputMethodService);

            imm.ShowSoftInput(editText, ShowFlags.Forced);
            imm.ToggleSoftInput(ShowFlags.Forced, HideSoftInputFlags.ImplicitOnly);
            editText.SetSelection(editText.Text.Length);
        }
Exemple #20
0
        protected override void InternalShowKeyboard(UIInputField inputField)
        {
            m_CurrentInput = inputField;
            InputMethodManager inputMethodManager = (InputMethodManager)Activity1.Instance.Application.GetSystemService(Context.InputMethodService);

            inputMethodManager.ShowSoftInput(Activity1.Instance.TheGame.Services.GetService <View>(), ShowFlags.Forced);
            inputMethodManager.ToggleSoftInput(ShowFlags.Forced, HideSoftInputFlags.ImplicitOnly);
        }
Exemple #21
0
        private void StartSearch()
        {
            isInSearchMode = true;
            searchTextView.RequestFocus();
            InputMethodManager inputManager = (InputMethodManager)GetSystemService(InputMethodService);

            inputManager.ToggleSoftInput(0, HideSoftInputFlags.NotAlways);
        }
Exemple #22
0
        void anim_AnimationEndDown(object sender, Android.Views.Animations.Animation.AnimationEndEventArgs e)
        {
            mSearch.RequestFocus();
            InputMethodManager inputMethodManager = this.GetSystemService(Context.InputMethodService) as InputMethodManager;

            inputMethodManager.ShowSoftInput(mSearch, ShowFlags.Forced);
            inputMethodManager.ToggleSoftInput(ShowFlags.Forced, HideSoftInputFlags.ImplicitOnly);
            mIsAnimating = false;
        }
Exemple #23
0
        private void ShowKeyboard(Android.Views.View view)
        {
            view.RequestFocus();

            InputMethodManager inputMethodManager = MainActivity.Context.GetSystemService(Context.InputMethodService) as InputMethodManager;

            inputMethodManager.ShowSoftInput(view, ShowFlags.Forced);
            inputMethodManager.ToggleSoftInput(ShowFlags.Forced, HideSoftInputFlags.ImplicitOnly);
        }
        public void ShowKeyboard(View view)
        {
            view.RequestFocus();

            InputMethodManager inputMethodManager = Application.GetSystemService(InputMethodService) as InputMethodManager;

            inputMethodManager.ShowSoftInput(view, ShowFlags.Forced);
            inputMethodManager.ToggleSoftInput(ShowFlags.Forced, HideSoftInputFlags.ImplicitOnly);
        }
Exemple #25
0
        public void ShowKeyboard()
        {
            Control.RequestFocus();

            InputMethodManager inputMethodManager = Control.Context.GetSystemService(Context.InputMethodService) as InputMethodManager;

            inputMethodManager.ShowSoftInput(Control, ShowFlags.Forced);
            inputMethodManager.ToggleSoftInput(ShowFlags.Forced, HideSoftInputFlags.ImplicitOnly);
        }
Exemple #26
0
        public void OpenKeyboard()
        {
            View.KeyPress -= View_KeyPress;

            inputMethodManager.ShowSoftInput(View, ShowFlags.Forced);
            inputMethodManager.ToggleSoftInput(ShowFlags.Forced, HideSoftInputFlags.ImplicitOnly);

            View.KeyPress += View_KeyPress;
        }
Exemple #27
0
        public void MakeRequestFocus()
        {
            this.RequestFocus();

            InputMethodManager inputMethodManager = (InputMethodManager)Android.App.Application.Context.GetSystemService(Context.InputMethodService);

            inputMethodManager.ShowSoftInput(this, ShowFlags.Forced);
            inputMethodManager.ToggleSoftInput(ShowFlags.Forced, HideSoftInputFlags.ImplicitOnly);
        }
Exemple #28
0
        private void ShowKeyboard(View pView)
        {
            pView.RequestFocus();

            InputMethodManager inputMethodManager = context.GetSystemService(Context.InputMethodService) as InputMethodManager;

            inputMethodManager.ShowSoftInput(pView, ShowFlags.Forced);
            inputMethodManager.ToggleSoftInput(ShowFlags.Forced, HideSoftInputFlags.ImplicitOnly);
        }
Exemple #29
0
 public void OnFocusChange(View v, bool hasFocus)
 {
     if (hasFocus)
     {
         InputMethodManager imm = (InputMethodManager)Singleton.Instance.GoalActivity.GetSystemService(Context.InputMethodService);
         imm.ShowSoftInput(Singleton.Instance.AddGoalView, ShowFlags.Forced);
         imm.ToggleSoftInput(ShowFlags.Forced, HideSoftInputFlags.ImplicitOnly);
     }
 }
Exemple #30
0
        public void AddPlayer()
        {
            if (playersInfo.Count < MaxPlayerCount)
            {
                EditText            et = (EditText)LayoutInflater.Inflate(Resource.Layout.edittext_dialog, null, false);
                AlertDialog.Builder ad = new AlertDialog.Builder(this);
                et.Text = GetFreeName();
                ad.SetTitle("Player's name");
                ad.SetView(et);
                var dialog = ad.Create();
                et.KeyPress += (sender, e) =>
                {
                    if (e.Event.Action == KeyEventActions.Down && e.KeyCode == Keycode.Enter)
                    {
                        string name = et.Text;
                        HideKeyboard(et);
                        dialog.Dismiss();

                        ad = new AlertDialog.Builder(this);
                        ad.SetTitle("Player's type");
                        dialog = ad.Create();
                        ad.SetItems(System.Enum.GetValues(typeof(PlayerType)).Cast <PlayerType>().Select(_ => _.ToString()).ToArray(), (sender2, e2) => {
                            playersInfo.Add(new PlayerInfo(et.Text, (PlayerType)e2.Which));
                            ((AlertDialog)sender2).Dismiss();
                            adapter.NotifyDataSetChanged();
                        });
                        ad.Show();
                    }
                    else
                    {
                        e.Handled = false;
                    }
                };
                dialog.Show();
                //dialog.DismissEvent += (a, b) => { HideKeyboard(et); };
                et.SelectAll();
                ShowKeyboard(et);
            }

            void ShowKeyboard(View pView)
            {
                pView.RequestFocus();

                InputMethodManager inputMethodManager = GetSystemService(InputMethodService) as InputMethodManager;

                inputMethodManager.ShowSoftInput(pView, ShowFlags.Forced);
                inputMethodManager.ToggleSoftInput(ShowFlags.Forced, HideSoftInputFlags.ImplicitOnly);
            }

            void HideKeyboard(View pView)
            {
                InputMethodManager inputMethodManager = GetSystemService(InputMethodService) as InputMethodManager;

                inputMethodManager.HideSoftInputFromWindow(pView.WindowToken, HideSoftInputFlags.None);
            }
        }