当前位置: 首页>>代码示例>>Java>>正文


Java ScreenUtils类代码示例

本文整理汇总了Java中org.anyrtc.common.utils.ScreenUtils的典型用法代码示例。如果您正苦于以下问题:Java ScreenUtils类的具体用法?Java ScreenUtils怎么用?Java ScreenUtils使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ScreenUtils类属于org.anyrtc.common.utils包,在下文中一共展示了ScreenUtils类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onScreenChanged

import org.anyrtc.common.utils.ScreenUtils; //导入依赖的package包/类
/**
 * 横竖屏切换
 */
public void onScreenChanged() {
    mScreenWidth = ScreenUtils.getScreenWidth(mContext);
    mScreenHeight = ScreenUtils.getScreenHeight(mContext) - ScreenUtils.getStatusHeight(mContext);

    if (mScreenHeight > mScreenWidth) {
        SUB_Y = 2;
        SUB_WIDTH = 24;
        SUB_HEIGHT = 20;
    } else {
        SUB_Y = 2;
        SUB_WIDTH = 20;
        SUB_HEIGHT = 24;
    }
    updateVideoView();
}
 
开发者ID:AnyRTC,项目名称:anyRTC-RTCP-Android,代码行数:19,代码来源:RTCVideoView.java

示例2: RTCVideoView

import org.anyrtc.common.utils.ScreenUtils; //导入依赖的package包/类
public RTCVideoView(RelativeLayout videoView, Context ctx, EglBase eglBase) {
    mAutoLayout = false;
    mContext = ctx;
    mVideoView = videoView;
    mRootEglBase = eglBase;
    mLocalRender = null;
    mRemoteRenders = new HashMap<>();
    this.isHost = isHost;
    mRTCVideoLayout = AnyRTCRTCPEngine.Inst().getAnyRTCRTCPOption().getmVideoLayout();
    if (mRTCVideoLayout == AnyRTCVideoLayout.AnyRTC_V_3X3_auto) {
        ((Activity) mContext).setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
    }
    mScreenWidth = ScreenUtils.getScreenWidth(mContext);
    mScreenHeight = ScreenUtils.getScreenHeight(mContext) - ScreenUtils.getStatusHeight(mContext);
}
 
开发者ID:AnyRTC,项目名称:anyRTC-RTCP-Android,代码行数:16,代码来源:RTCVideoView.java

示例3: RTCVideoView

import org.anyrtc.common.utils.ScreenUtils; //导入依赖的package包/类
public RTCVideoView(RelativeLayout videoView, Context ctx, EglBase eglBase) {
    mAutoLayout = false;
    mContext = ctx;
    mVideoView = videoView;
    mRootEglBase = eglBase;
    mLocalRender = null;
    mRemoteRenders = new HashMap<>();
    mRTCVideoLayout = AnyRTCMeetEngine.Inst().getAnyRTCMeetOption().getmVideoLayout();
    if (mRTCVideoLayout == AnyRTCVideoLayout.AnyRTC_V_3X3_auto) {
        ((Activity) mContext).setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
    }
    mScreenWidth = ScreenUtils.getScreenWidth(mContext);
    mScreenHeight = ScreenUtils.getScreenHeight(mContext) - ScreenUtils.getStatusHeight(mContext);
}
 
开发者ID:AnyRTC,项目名称:anyRTC-Meeting-Android,代码行数:15,代码来源:RTCVideoView.java

示例4: RTCVideoView

import org.anyrtc.common.utils.ScreenUtils; //导入依赖的package包/类
public RTCVideoView(RelativeLayout videoView, Context ctx, EglBase eglBase) {
    this.mContext = ctx;
    mAutoLayout = false;
    mVideoView = videoView;
    mRootEglBase = eglBase;
    mLocalRender = null;
    mRemoteRenders = new HashMap<>();
    mScreenWidth = ScreenUtils.getScreenWidth(mContext);
    mScreenHeight = ScreenUtils.getScreenHeight(mContext) - ScreenUtils.getStatusHeight(mContext);
}
 
开发者ID:AnyRTC,项目名称:anyRTC-P2P-Android,代码行数:11,代码来源:RTCVideoView.java


注:本文中的org.anyrtc.common.utils.ScreenUtils类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。