public static void InitlizeReturnKey(this EditText editText, SupportEntryReturnType returnType) { switch (returnType) { case SupportEntryReturnType.Go: editText.ImeOptions = ImeAction.Go; editText.SetImeActionLabel("Go", ImeAction.Go); break; case SupportEntryReturnType.Next: editText.ImeOptions = ImeAction.Next; editText.SetImeActionLabel("Next", ImeAction.Next); break; case SupportEntryReturnType.Send: editText.ImeOptions = ImeAction.Send; editText.SetImeActionLabel("Send", ImeAction.Send); break; case SupportEntryReturnType.Search: editText.ImeOptions = ImeAction.Search; editText.SetImeActionLabel("Search", ImeAction.Search); break; default: editText.ImeOptions = ImeAction.Done; editText.SetImeActionLabel("Done", ImeAction.Done); break; } }
public static void InitlizeReturnKey(this UITextField uITextField, SupportEntryReturnType returnType) { switch (returnType) { case SupportEntryReturnType.Go: uITextField.ReturnKeyType = UIReturnKeyType.Go; break; case SupportEntryReturnType.Next: uITextField.ReturnKeyType = UIReturnKeyType.Next; break; case SupportEntryReturnType.Send: uITextField.ReturnKeyType = UIReturnKeyType.Send; break; case SupportEntryReturnType.Search: uITextField.ReturnKeyType = UIReturnKeyType.Search; break; case SupportEntryReturnType.Done: uITextField.ReturnKeyType = UIReturnKeyType.Done; break; default: uITextField.ReturnKeyType = UIReturnKeyType.Default; break; } }