I\'d like to layout a view like the following, but I\'m not sure how to go about doing so:
To set the size of the SurfaceView you should use:
// Set surfaceview size in px
private void setVideoSize(int width, int height) {
LayoutParams params = (LayoutParams) mYourSurfaceView.getLayoutParams();
params.height = height;
params.width = width;
mYourSurfaceView.setLayoutParams(params);
}
And if you want to know the size of the screen:
Display display = ((WindowManager) getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
int width = display.getWidth();
int heigth = display.getHeight();
Hope this helps