Open vuhung3990 opened 9 years ago
Hi vuhung3990, You have to set draggable_view:top_view_resize="true" to resize your videos in com.github.pedrovgs.DraggableView attribute of your xml.
Thanks!
thank you for your hint, but my code have already draggable_view:top_view_resize="true"
in XML
Are You using regular Android VideoView or custom view?
i use mediaplayer for play video
@Fiddl3 same problem with youtubeplayersupportfragment. I saw comments saying it works fine with youtubeplayerview, but i dont know how to use youtubplayerview inside fragment and it is actually said that this view can be used only in activity extending YoutubeBaseActivity
Look in to sample app, there is example with YT player (but with outdated library) and it's working
@Fiddl3 If you mention this example http://oi58.tinypic.com/2mos0i0.jpg you can see that video is cropped at right and bottom ( it also visible in readme of this project. May be you have any idea about this problem? https://github.com/pedrovgs/DraggablePanel/issues/38 It is resized properly, but due to few pixels overlapping it stops by crual youtubeplayer developers' logic/ From you words, I assume that this issue was fixed at some point, but later it was accidentaly reverted
Did You try set right & bottom margin for draggableview? I don't know where yt player view is overlaped and I don't have time to investigate this right now, but I'll take look in to this in future.
I use custom media player, maybe it is my problem
@Fiddl3 I tried. margins in dagable pannel does not affect the distance between topview and bottom view. Those view are adjecent if scaleTransformer is used and there is few pixel overlaping if ResizeTransformer is used.
I don't understand...
draggablePanel.setTopFragmentMarginRight(topViewMarginRight);
draggablePanel.setTopFragmentMarginBottom(topViewMargnBottom);
doesn't work if you are using ResizeTransformer ??
And which view is overlaping YT player? or is it positioned outside the screen?
@vuhung3990 review your MediaPlayer usage. I'm using VideoView for this sample and the resize is working as expected.
@Fiddl3 YouTube sample is not using ResizeTransformer because take the resize
value and move it to the DraggableView is not implemented. Remember DragablePanel uses DragableView inside.
@vuhung3990 was this issue a problem with your MediaPlayer or can you confirm if it's related to DraggableView?
@vuhung3990 I had the same bug with height not resizing properly. I'm also using a custom player but I doubt the problem is with the player. It seems like the issue occurs when I manually set the height in code, in order to keep aspect ratio. Can you confirm this is the case for you too?
Hi, I'm also having a similar issue, I'm using a custom player as top fragment and when I minimize it, bottom and right are cropped. Is there any parameter that I have to change to "fitXY"-like? Or maybe in my video fragment?
I think it's something with my player, because I added an imageview to my video fragment and it's being resized properly, only my video is being cropped. This is my panel:
<com.github.pedrovgs.DraggablePanel android:id="@+id/draggable_panel" android:layout_width="match_parent" android:layout_height="match_parent" draggable_panel:enable_horizontal_alpha_effect="false" draggable_panel:top_fragment_height="200dp" draggable_panel:top_fragment_margin_bottom="10dp" draggable_panel:top_fragment_margin_right="10dp" draggable_panel:top_view_resize="true" draggable_panel:x_scale_factor="2.3" draggable_panel:y_scale_factor="2.3" />
And this is my Custom Player:
<my.PlayerView android:id="@+id/vvVideoWidget" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="center" />
i have problen when minimize video height not resize (width work fine), see my video: https://www.youtube.com/watch?v=-7igAAaaWdk