private void initResourceRefs() { mVideoTipsLy = (RelativeLayout) findViewById(R.id.video_call_in_ly); mVideoIcon = (ImageView) findViewById(R.id.video_icon); mVideoTopTips = (TextView) findViewById(R.id.notice_tips); mVideoCallTips = (TextView) findViewById(R.id.video_call_tips); mVideoCancle = (Button) findViewById(R.id.video_botton_cancle); mVideoBegin = (Button) findViewById(R.id.video_botton_begin); mVideoStop = (Button) findViewById(R.id.video_stop); mVideoStop.setEnabled(false); mVideoCancle.setOnClickListener(this); mVideoBegin.setOnClickListener(this); mVideoStop.setOnClickListener(this); mVideoView = (SurfaceView) findViewById(R.id.video_view); mVideoView.getHolder().setFixedSize(240, 320); mLoaclVideoView = (RelativeLayout) findViewById(R.id.localvideo_view); mVideoLayout = (FrameLayout) findViewById(R.id.Video_layout); mCameraSwitch = (ImageButton) findViewById(R.id.camera_switch); mCameraSwitch.setOnClickListener(this); mCallStatus = (TextView) findViewById(R.id.call_status); mCallStatus.setVisibility(View.GONE); // mVideoView.getHolder().setFixedSize(width, height); VoiceHelper.getInstance().getDevice().setVideoView(mVideoView, null); // Create a RelativeLayout container that will hold a SurfaceView, // and set it as the content of our activity. SurfaceView localView = ViERenderer.CreateLocalRenderer(this); mLoaclVideoView.addView(localView); }
@Override protected void onResume() { super.onResume(); if (mLoaclVideoView != null && mLoaclVideoView.getVisibility() == View.VISIBLE) { SurfaceView localView = ViERenderer.CreateLocalRenderer(this); mLoaclVideoView.addView(localView); } lockScreen(); }