开发者

In Android, how do I insert text into the textbox the user is currently using?

开发者 https://www.devze.com 2023-02-12 06:10 出处:网络
I\'m building what is essentially a character map. The user would invoke it as a popup dialog, and after touching a desired character, it would be inserted into the current editor, which is in another

I'm building what is essentially a character map. The user would invoke it as a popup dialog, and after touching a desired character, it would be inserted into the current editor, which is in another application. What I want is essentially a "send keys" type of behavior.

开发者_如何学JAVAIs there a way to do this without becoming an Input Method? If I have to become an Input Method, can it be used alongside normal keyboards, or does it have to replace them?

Also, if the API doesn't let you do that, I'm okay requiring root for this, though I'd prefer not to.

Thanks!


Make a custom modified "popup" which listens to onTouch() or onClick() events for the editor input box.

Its up to you how to design this qwerty layout. It should be simple and you dont have to root your phone.

0

精彩评论

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

关注公众号