开发者

android softkeyboard onTouch()

开发者 https://www.devze.com 2023-01-19 01:13 出处:网络
What is best way to implement custom SoftKeyboard, so it recognize where user push, and where user release, and then use both coordinates to determine character?

What is best way to implement custom SoftKeyboard, so it recognize where user push, and where user release, and then use both coordinates to determine character? E.g. if i push Q, then move finger to E, then release. Application should get 2 coordinates. Basically simple line.

One way is to make it trough buttons and using onTouch(View v, MotionEvent event) method when button is touched. Then dis开发者_开发问答patch MotionEvent. Other way is to handle all input, and draw layout as "image". Same as above example, but just without buttons. Or maybe there is some better way (as I'm new to android and don't know it well yet)?

Thank you for any help or advices.

0

精彩评论

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

关注公众号