DraggablePanel icon indicating copy to clipboard operation
DraggablePanel copied to clipboard

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

Open Amritpal33 opened this issue 11 years ago • 5 comments

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 ?

Amritpal33 avatar Dec 10 '14 18:12 Amritpal33

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....

Fiddl3 avatar Dec 10 '14 19:12 Fiddl3

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

grandsmarquis avatar Apr 23 '15 12:04 grandsmarquis

I quick patched this doing:

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

in onInterceptTouchEvent(MotionEvent ev) of the DraggableView.java

grandsmarquis avatar Apr 23 '15 13:04 grandsmarquis

Thanks jdourlens!

haipro912 avatar Nov 28 '16 03:11 haipro912

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

coderbhupendra avatar Feb 27 '17 21:02 coderbhupendra