views:

261

answers:

2

I'm wondering how I can create a custom pop-up like the one in the screenshot below (borrowed from the Swype keyboard), where I can have a couple of buttons, which each commit a string to the currently "connected" TextView (via a InputConnection).

Please note: this is an InputMethodService and not an ordinary Activity. I already tried launching a separate Activity with Theme:Dialog. However, as soon as that one opens I lose my focus with the TextView and my keyboard disappears (and with that my InputConnection is gone).

Swype

+1  A: 

You can try using a PopupWindow. You'll have to do a bit of hacking to get it to do what you want and the only good documentation for it is the source.

Qberticus
Cool. Thanks for the hint. I'm already going through the Android's keyboard source code, so I'm quite used to that :-)
znq
A: 

hi Stefan,

  If u have got the solution for this , please the answer or a hint where u modified in core.
Faheem