问题描述:

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);


}
相关阅读:
Top