YoutubeVideoSample
YoutubeVideoSample copied to clipboard
DispatchLayout without marginRight and marginLeft
I want the bar at the bottom to be full width. Removing the marginRight and marginLeft results in a bug where the bar is at the top of the screen instead of the bottom.
This are the changes I made:
YouTuDraggingView.java Line 406:
mTopViewWrapper.setWidth(Math.round(mTopViewOriginalWidth * videoNodeWidthPercent));
To:
mTopViewWrapper.setWidth(DensityUtil.getScreenW(getContext()));
YouTuDraggingView.java Line 411:
mBackgroundViewWrapper.setWidth(Math.round(mTopViewOriginalWidth * videoNodeWidthPercent));
To:
mBackgroundViewWrapper.setWidth(DensityUtil.getScreenW(getContext()));
Removed:
YouTuDraggingView.java Line 412 and Line 413:
mBackgroundViewWrapper.setMarginRight(videoLeftRightOffset);
mBackgroundViewWrapper.setMarginLeft(videoLeftRightOffset);
This method does not work for me either, very weird behavior indeed! BTW, I migrated to Androidx., It could be the reason.