Hi.
I stream a Video from URL. That works fine. My Problem is, when I start the stream (vertical) the video is to big. It goes over the right border and takes all the height from the display. How can I do that the video is always only has the max values from his parent? In horizontal mode the video has the correct properties.
XML:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:fitsSystemWindows="true"
>
<VideoView
android:layout_width="320px"
android:layout_height="wrap_content"
android:id="@+id/VideoView"
android:layout_centerInParent="true"
>
</VideoView>
</LinearLayout>
JAVA:
setContentView(R.layout.videoview);
mVideoView = (VideoView) findViewById(R.id.VideoView);
mVideoView.setVideoPath(url);
mVideoView.setMediaController(new MediaController(this));
mVideoView.start();
mVideoView.requestFocus();
Thanks a lot for any answers.