Exemplo n.º 1
0
 private void OnTextFieldEditorActionListener(object sender, TextView.EditorActionEventArgs e)
 {
     if (e.ActionId == ImeAction.Done)
     {
         TextField.ClearFocus();
     }
 }
Exemplo n.º 2
0
            public override void ResignFirstResponder( )
            {
                // only allow this text edit to hide the keyboard if it's the text field with focus.
                Activity activity = ( Activity )Rock.Mobile.PlatformSpecific.Android.Core.Context;

                if (activity.CurrentFocus != null && (activity.CurrentFocus as EditText) == TextField)
                {
                    InputMethodManager imm = ( InputMethodManager )Rock.Mobile.PlatformSpecific.Android.Core.Context.GetSystemService(Android.Content.Context.InputMethodService);

                    imm.HideSoftInputFromWindow(TextField.WindowToken, 0);

                    // yeild focus to the dummy view so the text field clears it's caret and the selected outline
                    TextField.ClearFocus( );
                }
            }