There is strange problem that I have come across, I have EditText like this
<EditText
android:id="@+id/pin_digit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="numberPassword"
android:selectAllOnFocus="true"
android:maxLength="1"/>
And in some activity code used with ButterKnife (version 6.1.0),
@OnTextChanged(R.id.pin_digit)
public void onPinTextChanged(CharSequence sequence){
//do something with sequence
}
My problem is that, when I type (on softinput) a digit, everything is ok, but when i click "done" this event is triggered with new line character (softinput is of course hidden properly), but i get invalid character in my input.
Have you ever encountered something like this?
I have solved this one tempolary by checking if inputed char sequence is ineed a digit, but I would like to solve a real problem, not heal the results...