Example usage for android.widget VideoView setMinimumHeight

List of usage examples for android.widget VideoView setMinimumHeight

Introduction

In this page you can find the example usage for android.widget VideoView setMinimumHeight.

Prototype

@RemotableViewMethod
public void setMinimumHeight(int minHeight) 

Source Link

Document

Sets the minimum height of the view.

Usage

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);/*from  w w  w . ja  v a  2s  . c  o  m*/
    videoHolder.setMinimumHeight(height);

    //getWindow().setFormat(PixelFormat.TRANSLUCENT);
    videoHolder.setMediaController(new MediaController(this));
    videoHolder.setVideoPath(videoFile.getAbsolutePath());
    videoHolder.requestFocus();
    videoHolder.start();

}