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


Java PercentFrameLayout类代码示例

本文整理汇总了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);
}
 
开发者ID:AnyRTC,项目名称:anyRTC-RTCP-Android,代码行数:24,代码来源:RTCVideoView.java

示例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);
}
 
开发者ID:AnyRTC,项目名称:anyRTC-Meeting-Android,代码行数:24,代码来源:RTCVideoView.java

示例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);
        }
 
开发者ID:AnyRTC,项目名称:anyRTC-P2P-Android,代码行数:19,代码来源:RTCVideoView.java


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