I am using Butterknife and trying to change on EditText the enter for a submit
<EditText
android:id="@+id/id_message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/gray_line_background"
android:ems="10"
android:gravity="top"
android:inputType="textMultiLine"
android:minLines="8" />
and in my fragment
@InjectView(R.id.id_message)
@NotEmpty(messageResId = R.string.err_message_empty)
EditText message;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.fragment_myfragment, container, false);
ButterKnife.inject(this, v);
validator = new Validator(this);
validator.setValidationListener(this);
message.setImeActionLabel("Submit", KeyEvent.KEYCODE_ENTER);
message.setOnEditorActionListener(new EditText.OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
if (actionId == EditorInfo.IME_ACTION_DONE) {
onNextClick(message);
return true;
}
return false;
}
});
return v;
}
Is not working neither of the things the button doesn't change the text, and the listener doesn't perform the action
Thank you