YoutubeVideoSample icon indicating copy to clipboard operation
YoutubeVideoSample copied to clipboard

DispatchLayout without marginRight and marginLeft

Open BRdev opened this issue 4 years ago • 1 comments

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);

BRdev avatar Aug 18 '20 19:08 BRdev

This method does not work for me either, very weird behavior indeed! BTW, I migrated to Androidx., It could be the reason.

NanyangTaiji avatar Apr 14 '21 00:04 NanyangTaiji