The keyboard should let you do both, I know GBoard does as I do both on it. Some (including GBoard) allow you to disable the swiping in the settings for the keyboard.
Or.. are you asking about answering the phone? I guess we need more detail from you.
If you need additional help or have more questions or details to share, please join the site so you can reply in this thread. See
this link for instructions on how to join Android Central.