本文整理汇总了Java中org.webrtc.PercentFrameLayout类的典型用法代码示例。如果您正苦于以下问题:Java PercentFrameLayout类的具体用法?Java PercentFrameLayout怎么用?Java PercentFrameLayout使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PercentFrameLayout类属于org.webrtc包,在下文中一共展示了PercentFrameLayout类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: VideoView
import org.webrtc.PercentFrameLayout; //导入依赖的package包/类
public VideoView(String strPeerId, Context ctx, EglBase eglBase, int index, int x, int y, int w, int h, AnyRTCVideoLayout videoLayout) {
this.strPeerId = strPeerId;
this.index = index;
this.x = x;
this.y = y;
this.w = w;
this.h = h;
this.mRTCVideoLayout = videoLayout;
mLayout = new PercentFrameLayout(ctx);
mLayout.setLayoutParams(new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT));
View view = View.inflate(ctx, R.layout.layout_top_right, null);
mView = (SurfaceViewRenderer) view.findViewById(R.id.suface_view);
btnClose = (ImageView) view.findViewById(R.id.img_close_render);
mLocalCamera = (ImageView) view.findViewById(R.id.camera_off);
mAudioImageView = (ImageView) view.findViewById(R.id.img_audio_close);
mVideoImageView = (ImageView) view.findViewById(R.id.img_video_close);
layoutCamera = (RelativeLayout) view.findViewById(R.id.layout_camera);
mView.init(eglBase.getEglBaseContext(), null);
mView.setLayoutParams(new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT));
mLayout.addView(view);
}
示例2: VideoView
import org.webrtc.PercentFrameLayout; //导入依赖的package包/类
public VideoView(String strPeerId, Context ctx, EglBase eglBase, int index, int x, int y, int w, int h, AnyRTCVideoLayout videoLayout) {
this.strPeerId = strPeerId;
this.index = index;
this.x = x;
this.y = y;
this.w = w;
this.h = h;
this.mRTCVideoLayout = videoLayout;
mLayout = new PercentFrameLayout(ctx);
mLayout.setLayoutParams(new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT));
View view = View.inflate(ctx, org.anyrtc.meet_kit.R.layout.layout_top_right, null);
mView = (SurfaceViewRenderer) view.findViewById(org.anyrtc.meet_kit.R.id.suface_view);
btnClose = (ImageView) view.findViewById(org.anyrtc.meet_kit.R.id.img_close_render);
mLocalCamera = (ImageView) view.findViewById(org.anyrtc.meet_kit.R.id.camera_off);
mAudioImageView = (ImageView) view.findViewById(org.anyrtc.meet_kit.R.id.img_audio_close);
mVideoImageView = (ImageView) view.findViewById(org.anyrtc.meet_kit.R.id.img_video_close);
layoutCamera = (RelativeLayout) view.findViewById(org.anyrtc.meet_kit.R.id.layout_camera);
mView.init(eglBase.getEglBaseContext(), null);
mView.setLayoutParams(new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT));
mLayout.addView(view);
}
示例3: VideoView
import org.webrtc.PercentFrameLayout; //导入依赖的package包/类
public VideoView(String strPeerId, Context ctx, EglBase eglBase, int index, int x, int y, int w, int h) {
this.strPeerId = strPeerId;
this.index = index;
this.x = x;
this.y = y;
this.w = w;
this.h = h;
mLayout = new PercentFrameLayout(ctx);
// mLayout.setBackgroundResource(R.drawable.background);
mLayout.setLayoutParams(new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT));
View view = View.inflate(ctx, R.layout.layout_top_right, null);
mView = (SurfaceViewRenderer) view.findViewById(R.id.suface_view);
layoutCamera = (RelativeLayout) view.findViewById(R.id.layout_camera);
mView.init(eglBase.getEglBaseContext(), null);
mView.setLayoutParams(new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT));
mLayout.addView(view);
}