Add View Not Covering Full Screen

389 views Asked by At

Attached Layout and Code Please help me to get my Remote video in full screen

Adding View to Layout Code

private fun addVideoViews() {
    if (mVideoViewsAdded || sinchServiceInterface == null) {
        return  //early
    }
    val vc = sinchServiceInterface!!.getVideoController()
    if (vc != null) {
        val localView = findViewById<View>(com.ayush.flow.R.id.localVideo) as RelativeLayout
        val remoteview = findViewById<View>(com.ayush.flow.R.id.remoteVideo) as RelativeLayout

        val lview = vc.localView
        val rview=vc.remoteView


        localView.addView(lview)
        remoteview.addView(rview)
        mVideoViewsAdded = true


        localView.setOnClickListener(object : View.OnClickListener {
            override fun onClick(v: View?) {
                //this toggles the front camera to rear camera and vice versa
                vc.toggleCaptureDevicePosition()
            }
        })
    }
}

This is what i get I want full background covered with view

Thanks in Advance

1

There are 1 answers

1
akram abdullah On

Enable fullscreen mode. See this link https://developer.android.com/training/system-ui/immersive