You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Background: I created CustomView with NumberPicker and EditText in the middle, and if the user clicks on NumberPicker, it shows the EditText with that value so the user can the value by the keyboard.
The problem is that onClickListener fires as soon as the user touches the middle number. The convention is that onClick should be called when the user lifts finger within getTapTimeout milliseconds.
I fixed it myself, but I would like you to integrate it into your library so I can continue using it.
My approach:
Insert
private long clickedMillis = 0;
Replace the 2 occurrences of:
if (mOnClickListener != null) {
mOnClickListener.onClick(this);
}
to:
clickedMillis = System.currentTimeMillis();
Add this to ACTION_UP switch of onTouchEvent() method, when selectorIndexOffset == 0:
Background: I created CustomView with NumberPicker and EditText in the middle, and if the user clicks on NumberPicker, it shows the EditText with that value so the user can the value by the keyboard.
The problem is that onClickListener fires as soon as the user touches the middle number. The convention is that onClick should be called when the user lifts finger within getTapTimeout milliseconds.
I fixed it myself, but I would like you to integrate it into your library so I can continue using it.
My approach:
to:
The text was updated successfully, but these errors were encountered: