0

Androidキーボードの代わりにアクティビティでボタンを使用する必要があります。例を見つけました(http://developer.android.com/guide/topics/text/creating-input-method.html):

InputConnection ic = getCurrentInputConnection();

    ic.deleteSurroundingText(4, 0);

    ic.commitText("Hello", 1);

    ic.commitText("!", 1);

しかし、自分のアプリケーションでそれをどのように使用するか理解できません。InputMethodService を拡張するクラスを作成する場所と、このクラスに必要なもの。助けてください!!!

4

1 に答える 1

0

EditText を拡張するクラスを作成する必要があります。次に、onCreateInputConnection メソッドをオーバーライドできます。

于 2013-02-28T01:51:19.577 に答える