Skip to content
This repository has been archived by the owner on Nov 22, 2017. It is now read-only.

DraggablePanel using ResizeTransformer goes below the screen and is half hidden. #21

Closed
Amritpal33 opened this issue Nov 13, 2014 · 19 comments
Assignees
Labels

Comments

@Amritpal33
Copy link

Hi,
I am using Draggable panel and resizing feature to play videos. The issue is when i minimize the panel, it is half hidden in the screen and does not close to left or Right in minimize state.

Please Look into the issue.

@pedrovgs
Copy link
Owner

Can you upload a video or screenshot with your problem?

@Fiddl3
Copy link
Contributor

Fiddl3 commented Nov 13, 2014

It's because getMinHeightPlusMargin() in ResizeTransformer return different value than dimensions for verticalDragOffset ==1 verticalDragOffset ==0 in updateHeight()
I don't remember if there was another issue causing this....

ResizeTransformer from my form works OK but resizeFactor work different than in original library

@Amritpal33
Copy link
Author

How do i fix it..?
even the close to Left or right doesn't work for me.
I am testing on Nexus 5 and Samsung S4 with 4.4.2

@Fiddl3
Copy link
Contributor

Fiddl3 commented Nov 13, 2014

I'm sure @pedrovgs will fix it very quick

you can edit getMinHeightPlusMargin() to return the same value that is calculatet vile dragging

I think it will be:

return (int) ((getOriginalHeight()* (1/getYScaleFactor())) + getMarginBottom());

but I'm not sure

@pedrovgs pedrovgs added the bug label Nov 30, 2014
@pedrovgs
Copy link
Owner

@Amritpal33 I'd like to review your problem, could be related to other changes not just with getMinHeightPlusMargin method. Can you upload one video or one screenshot reproducing your bug?

I'm working to fix one issue related to the horizontal drag effect, issue #20 . Can you review if this branch: https://github.com/pedrovgs/DraggablePanel/tree/fix-horizontal-drag-problems fix your problems?

@Amritpal33
Copy link
Author

Hi Pedrovgs,
I took the latest update from Fiddl and it seemed to have solved maximum of my problems.
Also i will review the horizontal dragg effect branch.
You might close this bug now.
Thanks for your efforts.

@pedrovgs pedrovgs changed the title DraggablePanel goes below the screen and is Half Hidden DraggablePanel using ResizeTransformer goes below the screen and is half hidden. Dec 4, 2014
@pedrovgs
Copy link
Owner

pedrovgs commented Dec 4, 2014

You might close this bug now? I need to integrate that fix and I'm waiting for a pull request of @Fiddl3 xD

@Fiddl3
Copy link
Contributor

Fiddl3 commented Dec 4, 2014

I'll create new branch with fixes related to ResizeTransformer and send you a pull request.

@pedrovgs
Copy link
Owner

pedrovgs commented Dec 4, 2014

Please, create different branches for different fixes. One to fix video view position using resize transformer, other to support landscape mode. Create your branches from the development tip.

To fix video view position you can change every variable related to video view position or size to int instead of use floats.

@Fiddl3
Copy link
Contributor

Fiddl3 commented Dec 4, 2014

I think I already hanged all variables to int, except for scaleTransformer, but I will review this again...
This evening (very late) or tomorrow. With fixes for landscape mode You will have to wait, when I find some time to figure out how really Scale transformer works (for ResizeTransformer it works and this is what I needed for my project).
I'm working on project which requires rtmp stream (flv [x264+speex]) playback and I having some issues with audio/video sync... It's nightmare....

@pedrovgs
Copy link
Owner

pedrovgs commented Dec 4, 2014

hahaha, good luck with your project! I'll wait for your PR. Thanks!

2014-12-04 22:09 GMT+01:00 Fiddl3 notifications@github.com:

I think I already hanged all variables to int, except for
scaleTransformer, but I will review this again...
This evening (very late) or tomorrow. With fixes for landscape mode You
will have to wait, when I find some time to figure how really Scale
transformer works (for ResizeTransformer it works and this is what I needed
for my project).
I'm working on project which requires rtmp stream (flv [x264+speex])
playing and I having some issues with audio/video sync... It's nightmare....


Reply to this email directly or view it on GitHub
#21 (comment)
.

@pedrovgs pedrovgs self-assigned this Dec 5, 2014
@pedrovgs
Copy link
Owner

pedrovgs commented Dec 5, 2014

@Fiddl3, @Amritpal33 I've found and fix the bug with VideoView and Resize transformer \o/. Thanks to some help of @Fiddl3 !!! Can you check if it's working fine to you and your applications? I'd like to release this fix to maven central this weekend. You have the code in this branch: https://github.com/pedrovgs/DraggablePanel/tree/fix-video-view-sample-problems

@Fiddl3
Copy link
Contributor

Fiddl3 commented Dec 5, 2014

It'll not work...
int getMinWidthPlusMarginRight() "margin part is missing"

I'll update my for (ResizeTransformer_fix branch) with all fixes (without changing a scaleFactor implementation) then send you a pull request later today.

I still think that my scaleFactor implementation is better, but I don't know how many devs are using this library, and how many apps we "broke" when we will change this in maven central.... ergo lets leave this as is.

@pedrovgs
Copy link
Owner

pedrovgs commented Dec 5, 2014

Ok @Fiddl3, I'll wait for your PR. But compile and check that branch. The sample project is working fine without take into account the right margin.

@Fiddl3
Copy link
Contributor

Fiddl3 commented Dec 5, 2014

It's not working, look at the right side on the minimized dragView when you use minimize() method, there is no margin, so vertical dragging will not work.

@pedrovgs
Copy link
Owner

pedrovgs commented Dec 5, 2014

This is a screenshot of video sample in a Nexus 5 -> https://drive.google.com/file/d/0B9xkpTnF9BXjZHh0Q2NBRi1TZkU/view?usp=sharing

And this in a Samsung Galaxy S3 -> https://drive.google.com/file/d/0B9xkpTnF9BXjOXZXQkRQM0F3X1U/view?usp=sharing

Vertical drag is also working :)

@Fiddl3
Copy link
Contributor

Fiddl3 commented Dec 5, 2014

There is no way for this to work ok... look in to smoothSlideTo() left coordinate is calculated using getMinWidthPlusMarginRight() so it'll be moved right by margin size.

When you use finger to move view it'll work OK, but when you minimize it using minimize() or smoothSlideTo() it'll not

@pedrovgs
Copy link
Owner

pedrovgs commented Dec 5, 2014

Here you have a video where the VideoView is released and smoothSlideTo() is executed as minimize() method does.

https://drive.google.com/file/d/0B9xkpTnF9BXjRzdQVU9fdEd5Z2s/view?usp=sharing

@pedrovgs
Copy link
Owner

pedrovgs commented Dec 6, 2014

@Fiddl3 's pull request has been merged. I'm going to release a new version today :)

@pedrovgs pedrovgs closed this as completed Dec 6, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants