How to perform zoom in/out on VideoView in android?

Viewed 12528

I am using VideoView & running videos from resources.

I want to know, is there any way by which I can perform zoom in/out functionality on running video?

4 Answers

Found a tricky method to implement the same zooming methods used by all of the video player applications(mx player, vlc)

You can change the Videoview Layout params on the basics of screen width and height.

zoom++;
if (zoom == 1) {
    videoview1.setLayoutParams(new LinearLayout.LayoutParams(getDisplayWidthPixels(getApplicationContext()) + 500, getDisplayHeightPixels(getApplicationContext()) + 200));
    Toast.showMessage(getApplicationContext(), "1");
}
Related