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

Draggable view is not working as expected in minimized state when moving left or right. #20

Closed manpreetsinghsodhi closed 9 years ago

manpreetsinghsodhi commented 9 years ago

Hi, when i drag view in left or right in minimized form then vedio is not behaving or moving properly. I tried to do some changes in viewcallback class but not working my way. It is not going smooth for me i.e on dragging right the view is going completely left.

I checked your app on play store, there it is working fine but when i run your sample app i am facing these issues.

Moreover when view is dragged to minimized state then it got some margins in left and right in every vedio. Please help me resolve this issue. Thanks

pedrovgs commented 9 years ago

Can you upload any screenshot or video to show this problem? I'm not able to reproduce it.

manpreetsinghsodhi commented 9 years ago

Sure. Here is the link of video i am facing problem http://tinypic.com/player.php?v=289wjo7%3E&s=8#.VGLjdMluVlM Issues with this video when dragged left and right on minimized state are :

  1. On dragging right halfway, it is going left and vica versa.
  2. And when video is dragged out(via left or right), it comes back again in minimized state(on right side) sometimes.
  3. Fading effect(alpha) while going left and right fades video completely as soon as we drag. Fading should be such that video keep on playing and should fade lightly then completely at corner. And lastly one minor issue is dragging horizontally was not that smooth . Vertically it was very very smooth.
pedrovgs commented 9 years ago

@manpreetsinghsodhi can you take a look at https://github.com/pedrovgs/DraggablePanel/tree/fix-horizontal-drag-problems I've been working to improve horizontal drag implementation and it seems to work again in this branch :)

Once you validate this branch I will release this feature to 1.4 version

manpreetsinghsodhi commented 9 years ago

Hi Pedrovgs, First of all thanks for taking time in solving the issue. I tested this branch. It is working fine on left drag(on minimized view) but when we drag right sometimes it goes left again(out of the screen) and whenever this particular case happens the view after going out of screen comes back in minimized state on right side . Rest everything is fine..

pedrovgs commented 9 years ago

Can you upload a video with that movement? Thanks! On Dec 1, 2014 9:30 AM, "manpreetsinghsodhi" notifications@github.com wrote:

Hi Pedrovgs, First of all thanks for taking time in solving the issue. I tested this branch. It is working fine on left drag(on minimized view) but when we drag right sometimes it goes left again and whenever this particular case happens the view after going out of screen comes back in minimized state on right side . Rest everything is fine..

— Reply to this email directly or view it on GitHub https://github.com/pedrovgs/DraggablePanel/issues/20#issuecomment-65033247 .

manpreetsinghsodhi commented 9 years ago

Here is the link of video . Please have a look. Thanks ! http://tinypic.com/player.php?v=zwjn7q%3E&s=8#.VH1UZ8ladWE

Fiddl3 commented 9 years ago

in triggerOnReleaseActionsWhileVerticalDrag() method of DraggableViewCallback:

edit: sorry in triggerOnReleaseActionsWhileHorizontalDrag()

...

       if (xVel < 0 && xVel <= -X_MIN_VELOCITY) {//the mising "-" before (Y_MIN_VELOCITY) caused this bug
            draggableView.closeToLeft();
        }

...
pedrovgs commented 9 years ago

Thanks to @Fiddl3 I've found the bug \o/. @manpreetsinghsodhi can you review if it's working fine for you?

pedrovgs commented 9 years ago

@manpreetsinghsodhi can you review if this branch is working fine for you and fixes the bug related to the horizontal drag? I'd like to integrate this branch and release a new version :)

manpreetsinghsodhi commented 9 years ago

Hi ,yes it is working fine now . Thanks @Pedrovgs and fiddle :)

pedrovgs commented 9 years ago

\o/ @manpreetsinghsodhi I'll merge that branch and generate a new release asap. Thanks for your help!