-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with RecyclerView #17
Comments
Hey @phabiulla . public class CustomRecyclerView extends RecyclerView {
public CustomRecyclerView(Context context) {
super(context);
}
public CustomRecyclerView(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
}
public CustomRecyclerView(Context context, @Nullable AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
final int action = ev.getAction();
switch (action)
{
case MotionEvent.ACTION_DOWN:
super.onTouchEvent(ev);
break;
case MotionEvent.ACTION_MOVE:
return false; // redirect MotionEvents to ourself
case MotionEvent.ACTION_CANCEL:
super.onTouchEvent(ev);
break;
case MotionEvent.ACTION_UP:
return false;
default: break;
}
return false;
}
@Override
public boolean onTouchEvent(MotionEvent ev) {
super.onTouchEvent(ev);
//Log.i("VerticalScrollview", "onTouchEvent. action: " + ev.getAction() );
return true;
}
} and use it in |
Thank you! You helped me a lot. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm using RecyclerView to show a list of questions and for each one, displayed inside a CardView .. it has a recordbutton and a recordview .. By clicking on the button and moving it up and taking it .. instead of canceling press the button again. I believe the problem is due to the existence of scroll .. but I can not solve it. If anyone has ideas to help ..
The text was updated successfully, but these errors were encountered: