3

How can I make my videoPlayer work in mini mode just like the youTube App.

I want to display is at the bottom right and while the video is playing I want to continue to browser the app.

Here I can make the videoPlayer and surface half size.

     WindowManager.LayoutParams params = getWindow().getAttributes();  
        params.x = -100;  
        params.height = videoHeight;  
        params.width = videoWidth;  
        params.y = -50;  
        NXPPlayerActivity.this.getWindow().setAttributes(params);

    ViewGroup.LayoutParams lp = mMyLVSurfaceView.getLayoutParams();
    lp.height = videoHeight;
    lp.width = videoWidth;
    mMyLVSurfaceView.setLayoutParams(lp);
Thiago
  • 12,778
  • 14
  • 93
  • 110

0 Answers0