开发者

Slide finger on keyboard area to print a key

i just need to create an edit box with keyboard below..Below keyboard,,there should be an Slide finger on the keyboard link area while looking at the keyboard.As the finger slides, the key corresponding to the location of the finger on the keyboard link area开发者_StackOverflow社区 is highlighted.And when i click on dragger,the corresponding letter should be printed on edittext.How could i do this.?.Thanks..


As I have figured out, you need to have a mechanism where you let the users draw letters on a surface, and then you put them in the EditText by detecting what it latter was.

As a concept, you can do this:

Below the EditText, have a Canvas area, where people can draw letters.

Since I haven't tried many of Canvas things myself, you'll have to do the R&D, sorry. but listen for press and move events. record each pixel where the user is moving their fingers, and when the user lifts the finger up, perform detection.

For detection, you will have to have a database which tells you which drawing pattern corresponds to which letter. For this, develop a base where you store which pixel traversal path refers to which letter, and allow a threshold level. then put this info in the database.

when the user finishes drawing, and you have collected all the pixels user had traversed on, compare the set with the database to recognise which letter it was.

I know it might become complex, and requires you to evolve your own data structures (sadly, i don't have any structure in mind for this purpose as of now) for this, but it will be extremely interesting, and time taking too! ;-)

Just disable the keyboard for EditText when you're about to implement it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜