当前位置: 动力学知识库 > 问答 > 编程问答 >

android - keyOutputText not work on soft keyboard

问题描述:

keyOutputText not work on soft keyboard.

> <Key android:keyEdgeFlags="left" android:keyOutputText=".net" android:keyLabel=".net"/>

> <Key android:keyOutputText=".org" android:keyLabel=".org"/>

> <Key android:keyOutputText=".gov" android:keyLabel=".gov"/>

> <Key android:keyEdgeFlags="right" android:keyOutputText=".tw" android:keyLabel=".tw"/>

as above, but it does not write anything to the pressure button.

网友答案:

I found the solution..

@Override public void onText(CharSequence text) {

    InputConnection ic = getCurrentInputConnection();
    ic.commitText(text, 0);


}
分享给朋友:
您可能感兴趣的文章:
随机阅读: