Reputation: 19
First I want to thank everybody for their tips. I want to build an activity with multi videos in the same activity. How can I do that? If there is a way to have it in a list view format where all the videos are displayed nicely and I can just chose any of them.
Upvotes: 0
Views: 584
Reputation: 6034
try something like this:
public class Two_videos extends Activity
{
VideoView video1, video2;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.two_video);
VideoView video1= (VideoView) findViewById(R.id.video1);
video1.setVideoPath("/mnt/sdcard/IOU.mp4");
video1.start();
VideoView video2= (VideoView) findViewById(R.id.video2);
video2.setVideoPath("/mnt/sdcard/Movies/IMGmp4");
video2.start();
}
}
Create an activity called Two_videos and paste the above code. In the layout two video.xml, create two video view with ids video1 and video2.
Upvotes: 1