Hello Everyone,
    I have this question regarding on how to create a player in my application 
to play a video in fullscreen(stretch to fit width and height).
    I have this in my code already and setting the layout width and height in 
the ui xml file to fill parent but still does not stretch to fit the width.
protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        Log.v( TAG , "onCreate");
        super.onCreate(savedInstanceState);        
        this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 
                                  WindowManager.LayoutParams.FLAG_FULLSCREEN);
        setContentView(R.layout.player);
        
        Bundle extra = this.getIntent().getExtras();
this.mVideo = extra.getBundle(VIDEO);
                
        VideoView vidView = (VideoView)this.findViewById(R.id.vidView);
vidView.setVideoPath(this.mVideo.getString(URL));
        vidView.setOnPreparedListener(this);
        MediaController ctrl = new MediaController(this);
        ctrl.setMediaPlayer(vidView);
        vidView.setMediaController(ctrl);
        vidView.requestFocus();        
    }

Thanks,
-Brian


      

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to