private void SetReturnType(UltimateEntryReturn type)
        {
            switch (type)
            {
            case UltimateEntryReturn.Next:
                _editText.ImeOptions = ImeAction.Next;
                _editText.SetImeActionLabel("Next", ImeAction.Next);
                // Editor Action is called when the return button is pressed
                _editText.EditorAction += (object sender, Android.Widget.TextView.EditorActionEventArgs eventArgs) =>
                {
                    _ultimateEntry.OnNext();
                };
                break;

            case UltimateEntryReturn.Search:
                _editText.ImeOptions = ImeAction.Search;
                _editText.SetImeActionLabel("Search", ImeAction.Search);
                break;

            default:
                _editText.ImeOptions = ImeAction.Done;
                _editText.SetImeActionLabel("Done", ImeAction.Done);
                break;
            }
        }
Esempio n. 2
0
 bool TextField_ShouldReturn(UITextField textField)
 {
     _ultimateEntry.OnNext();
     return(false);
 }