Home » Android » android – how to make swipe keyboard like app

android – how to make swipe keyboard like app

Posted by: admin June 15, 2020 Leave a comment


i’d like to know which is the tecnique behind a gesture keyboard like Swype Keyboard or Nexus 4 stock keyboard. I’ve googled a lot for this but can’t find nothing usefull.

I obviously found the example in the sdk samples for the simple kayboard, and started with that in order to understand the principle behind a IME developing. Now that I understand how things works, I’d like to understand how that kind of keyboards works. I thought it had something to do with gestures, and I studied them, but it looks as the wrong way. So I’m asking this question what kind of technique is the base. Is it drawing? Do I need to undestand Canvas ecc?


How to&Answers:

Well, since I helped write Swype I’ll give you a bit of help here. You’re going to need to spend a lot of time studying DSP (digital signal processing) to understand how to evaluate the incoming touch data and figure out where letters are (this is more complicated than you think, because people don’t Swype cleanly letter to letter- they loop and curl). The algorithms behind Swype were the end result of over a decade of research by our founder.


The problem is two-fold:

1- Implementing a custom keyboard. This question has been asked before here, but you can check out this post with some sample code: http://www.fampennings.nl/maarten/android/09keyboard/index.htm

2- Implementing the swipe gesture. This is even more complicated, as you would have to create your onTouchListener, and draw some kind of animation when the screen is touched. You could start here