pedrovgs / DraggablePanel

Android library used to create an awesome Android UI based on a draggable element similar to the last YouTube graphic component.
Apache License 2.0
2.99k stars 606 forks source link

Top Fragment Shift downwards on Seeking the Video(The Seek is not proper) #32

Open Amritpal33 opened 9 years ago

Amritpal33 commented 9 years ago

Hi Pedrovgs,Fiddl3, I am using mediaplayer in the top fragment and when i try to seek(drag the thumb of Seekbar), The Top fragment moves downward(fluctuates). What could be done to stabilize the TopView untill significant dragging is done ?

Fiddl3 commented 9 years ago

You can try extend DraggableView class and override public boolean onInterceptTouchEvent(MotionEvent ev) and return false when user touch mediaController view.

But i discovered that this will produce NullPointerException in ViewDragHelper class similar to #31. Generally if other view take over a MotionEvent the shouldInterceptTouchEvent method will throw NullPointerException or OutOfBoundsException at some point....

grandsmarquis commented 9 years ago

got kind of same issue there, do you have a workaround or i need to do it by myself?

grandsmarquis commented 9 years ago

I quick patched this doing:

   if (isViewHit(mySeekBar, (int) ev.getX(), (int) ev.getY())
       return (false);

in onInterceptTouchEvent(MotionEvent ev) of the DraggableView.java

haipro912 commented 7 years ago

Thanks jdourlens!

coderbhupendra commented 7 years ago

@jdourlens @haipro912 can you give a detail code how to use isViewHit in onInterceptTouchEvent and what is mySeekBar.