edittext imeOptions not working

edittext imeOptions not working

多設定一個inputType即可
    
android:imeOptions="actionDone"
android:inputType="text"


處理ActionSend事件


edittext.setOnEditorActionListener(new OnEditorActionListener() {
    public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
        if (actionId == EditorInfo.IME_ACTION_SEND) {
            button.performClick();
            return true;
        }
        return false;
    }
});

留言