how to make swipe keyboard like app [closed]

余生颓废 提交于 2020-01-22 05:32:08

问题


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?

Thanks


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/17000937/how-to-make-swipe-keyboard-like-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!