Java Code Examples for com.shuyu.gsyvideoplayer.video.base.GSYBaseVideoPlayer#setIfCurrentIsFullscreen()

The following examples show how to use com.shuyu.gsyvideoplayer.video.base.GSYBaseVideoPlayer#setIfCurrentIsFullscreen() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SmallVideoHelper.java    From GSYVideoPlayer with Apache License 2.0 5 votes vote down vote up
/**
 * 如果是5.0的,要从原位置过度到全屏位置
 */
private void resolveMaterialFullVideoShow(GSYBaseVideoPlayer gsyVideoPlayer) {
    FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) gsyVideoPlayer.getLayoutParams();
    lp.setMargins(0, 0, 0, 0);
    lp.height = ViewGroup.LayoutParams.MATCH_PARENT;
    lp.width = ViewGroup.LayoutParams.MATCH_PARENT;
    lp.gravity = Gravity.CENTER;
    gsyVideoPlayer.setLayoutParams(lp);
    gsyVideoPlayer.setIfCurrentIsFullscreen(true);
}
 
Example 2
Source File: GSYVideoHelper.java    From GSYVideoPlayer with Apache License 2.0 5 votes vote down vote up
/**
 * 如果是5.0的,要从原位置过度到全屏位置
 */
private void resolveMaterialFullVideoShow(GSYBaseVideoPlayer gsyVideoPlayer) {
    FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) gsyVideoPlayer.getLayoutParams();
    lp.setMargins(0, 0, 0, 0);
    lp.height = ViewGroup.LayoutParams.MATCH_PARENT;
    lp.width = ViewGroup.LayoutParams.MATCH_PARENT;
    lp.gravity = Gravity.CENTER;
    gsyVideoPlayer.setLayoutParams(lp);
    gsyVideoPlayer.setIfCurrentIsFullscreen(true);
}
 
Example 3
Source File: ListVideoUtil.java    From GSYVideoPlayer with Apache License 2.0 5 votes vote down vote up
/**
 * 如果是5.0的,要从原位置过度到全屏位置
 */
private void resolveMaterialFullVideoShow(GSYBaseVideoPlayer gsyVideoPlayer) {
    FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) gsyVideoPlayer.getLayoutParams();
    lp.setMargins(0, 0, 0, 0);
    lp.height = ViewGroup.LayoutParams.MATCH_PARENT;
    lp.width = ViewGroup.LayoutParams.MATCH_PARENT;
    lp.gravity = Gravity.CENTER;
    gsyVideoPlayer.setLayoutParams(lp);
    gsyVideoPlayer.setIfCurrentIsFullscreen(true);
}