Closed 0xcra5hs closed 9 years ago
You need to disable the touch listener of the DraggablePanel. I think this library has a method to do that.
sorry, i can't find that method in DraggableView
can you make snippet code for me, thanks u
thanks for support, i do solved problem.
In draggable view, declare : private boolean isDisableDraggableView = false;
@Override public boolean onInterceptTouchEvent(MotionEvent ev) { if(isDisableDraggableView) return false; // -> add to this if (!isEnabled()) { return false; } }
@Override public boolean onTouchEvent(MotionEvent ev) { if(isDisableDraggableView) return false; // -> add to this int actionMasked = MotionEventCompat.getActionMasked(ev); }
and in my fragment, solved:
skProgress.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { int action = event.getAction(); switch (action){ case MotionEvent.ACTION_DOWN: draggableView.setIsDisableDraggableView(true); draggableView.setEnable(false); break; case MotionEvent.ACTION_CANCEL: case MotionEvent.ACTION_UP: draggableView.setIsDisableDraggableView(false); draggableView.setEnable(true); break; } return false; } });
Tkz u and close my issue :)
@DuongNTdev I've seen this patch in other issue and I've already asked you about a pull request so I'm going to close this one. Can you review your code and send me a PR with the changes?
Thanks!
Hi pedrovgs, I have the question about touch to another view.
I using Draggable View. In fragment, i have a seekbar. My problem is : "When i seek to seekbar, draggable view is scaled too".
Plz, help me. Thank u so much.