How to make VideoView full screen

后端 未结 4 408
粉色の甜心
粉色の甜心 2021-01-14 09:09

I want to play a video in my Activity using a VideoView,and make it fullscreen and landscape mode (with hiding virtual button and stat

4条回答
  •  庸人自扰
    2021-01-14 09:43

    You can use this for BackButton:

    closeButton = (Button) findViewById(R.id.buttonClose);
        closeButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View arg0) {
                Log.d("VideoPreview", "onClick Close Button");
                VideoFullscreenActivity.super.onBackPressed();
            }
        });
    

    Take a look: How to close a VideoView Activity (currently have to press back twice)

提交回复
热议问题