List of usage examples for android.widget VideoView setMinimumWidth
public void setMinimumWidth(int minWidth)
From source file:com.ternup.caddisfly.activity.VideoActivity.java
private void playVideo(File videoFile) { DisplayMetrics dm = new DisplayMetrics(); this.getWindowManager().getDefaultDisplay().getMetrics(dm); int height = dm.heightPixels; int width = dm.widthPixels; final VideoView videoHolder = (VideoView) this.findViewById(R.id.video_player_view); videoHolder.setMinimumWidth(width); videoHolder.setMinimumHeight(height); //getWindow().setFormat(PixelFormat.TRANSLUCENT); videoHolder.setMediaController(new MediaController(this)); videoHolder.setVideoPath(videoFile.getAbsolutePath()); videoHolder.requestFocus();//from w w w.ja va 2s . c o m videoHolder.start(); }