本文整理汇总了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();
}
示例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);
}
示例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);
}
示例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);
}