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 605 forks source link

DraggablePanel and VideoPlayer usage generates some empty spaces between dragged view and second view. #12

Closed jayachandrak closed 9 years ago

jayachandrak commented 10 years ago

Added two fragments to DraggablePanel one is Video player second one is list fragment

while maximizing the view, videoview is getting moved slightly then it will have some empty space in corners its not happening with normal views like images its happening only while playing video

manpreetsinghsodhi commented 10 years ago

i guess same is happening in my case. On maximising vedioview, bottom fragment is slighly moving under vedioview and lot of empty spaces can been seen. Since in my case i am using listview behind draggable panel so list view is visible . please help

pedrovgs commented 10 years ago

@jayachandrakuruba we are trying to fix this issue, but I need to see your code to help you. My demo is working find :S. Can you give me access to your repository to take a look?

FYI, I'll try to fix a similar issue reported by @manpreetsinghsodhi.

pedrovgs commented 10 years ago

@jayachandrakuruba I've released a new version (Release 1.3) with some fixes. Can you review if your I've fixed your problem with this release?

jayachandrak commented 10 years ago

Sure i will test and let you know the result

Is this version supports oriantation changes? On Nov 12, 2014 2:33 AM, "Pedro Vicente Gómez Sánchez" < notifications@github.com> wrote:

@jayachandrakuruba https://github.com/jayachandrakuruba I've released a new version (Release 1.3) with some fixes. Can you review if your I've fixed your problem with this release?

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

pedrovgs commented 9 years ago

@jayachandrakuruba I'm working to support orientation changes. Release 1.3 is working fine for you?

pedrovgs commented 9 years ago

@jayachandrakuruba can you check if this branch or the previous release fix your problem? https://github.com/pedrovgs/DraggablePanel/tree/fix-video-view-sample-problems

jayachandrak commented 9 years ago

I have tested it wasn't fixed my problem , are you supporting orientation changes? On 05-Dec-2014 5:47 am, "Pedro Vicente Gómez Sánchez" < notifications@github.com> wrote:

@jayachandrakuruba https://github.com/jayachandrakuruba can you check if this branch or the previous release fix your problem? https://github.com/pedrovgs/DraggablePanel/tree/fix-video-view-sample-problems

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

Fiddl3 commented 9 years ago

this https://github.com/Fiddl3/DraggablePanel/commit/ba33447ae423c3fa6ca4083fbb456d924eea6274 implementation of onLayout method should fix this issue.

pedrovgs commented 9 years ago

@jayachandrakuruba can you upload a screenshot or video to review your problem?

Fiddl3 commented 9 years ago

This happens when VideoView change his size to match played Video aspect ratio. One of solution is put VideoView in container ex FrameLayout in that case video size changes will not affect dragView height.

ppamorim commented 9 years ago

VideoPlayer extends SurfaceView, SurfaceView can't be transformed or resized. I recommend to change to TextureView. Look to this sample: https://github.com/ppamorim/DraggablePanel/tree/textureViewSample

Fiddl3 commented 9 years ago

SurfaceView can be resized (can not be animated, transformed and scaled). TextureView can only be used in a H/A windows. TextureView use more memory, much more. TextureView has small lag, needs 1-5 extra frames to update

So for video playback we should use overridden SV, add listeners and update SV dimensions manually when it's necessary. TV will not work on all devices (ex. wo H/A, with small amount of RAM memory....)... but it's easier to implement

EDIT H/A - Hardware Acceleration

ppamorim commented 9 years ago

@Fiddl3 Correct! I confuse me with resized and scaled. But the scale of SurfaceView as some problems (black borders while dragging).

Fiddl3 commented 9 years ago

If you take care of its size (while dragging) there will not be black borders. It takes some time, but it can be done.

ppamorim commented 9 years ago

I've removed the surfaceView if my project because it cause some problems(black screen, resize/scale)

Fiddl3 commented 9 years ago

...and if everything works well for you, that's the most effective way, but you have to make sure that app is working as supposed on all devices you targeting - that's the main goal

pedrovgs commented 9 years ago

@Fiddl3 is this issue related just to VideoPlayer?

Fiddl3 commented 9 years ago

It's related to all view all which were not designed to move/resize/transform while rendering. But we can't do anything to improve this in library.

pedrovgs commented 9 years ago

Ok, thanks for your help!

ppamorim commented 9 years ago

@Fiddl3 API 14 here :p