Hi,
I have a 3gp video that I would like to play at different sizes
depending on what size user would like to choose. I am calling
SurfaceHolder's setFixedSize to try to change the size of the
displayed video but it doesn't seem to take any effect.

I am creating a SurfaceView using the XML layout and get the holder in
onCreate method of the activity.
public void onCreate(Bundle icicle)
   {
      super.onCreate(icicle);
      setContentView(R.layout.mediaplayer_2);
      surfaceView = (SurfaceView) findViewById(R.id.surface);
      holder = surfaceView.getHolder();
      holder.addCallback(this);
      holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
   }

In the onPrepared callback set using the
mediaPlayer.setOnPreparedListener function I am calling the
setFixedSize function.
public void onPrepared(MediaPlayer mediaplayer)
   {
      // Set video view size
      holder.setFixedSize(videoWidth, videoHeight);
   }

No matter what the videoWidth and videoHeight is the video is
displayed with the original size of the video. For example, if I would
like the video to take full screen then I am finding the full screen
size and setting the holder size but it is not working.

On th eother hand, if I set the holder size using setFixedSize
function in onCreate method then no matter what videoWidth and
videoHeight size I choose the video takes up the full screen
automatically.

This seems very weird to me. Is there something I am doing wrong? What
is the good way to change the displayed video size?

Thanks.
--~--~---------~--~----~------------~-------~--~----~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to