Hi

Update as below:

package biz.slwdesign.tvlocallysouthdevon;

import android.app.Activity;
import android.content.pm.ActivityInfo;
import android.media.MediaPlayer;
import android.media.MediaPlayer.OnCompletionListener;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;
import android.widget.MediaController;
import android.widget.VideoView;

public class Watch extends Activity implements OnClickListener {
VideoView videoview1

        protected void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);

setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_NOSENSOR);

setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);
                setContentView(R.layout.watch);

                //ImageButton1
                ImageButton video1 = (ImageButton)
findViewById(R.id.ImageButton1);
                video1.setOnClickListener(this);

                //ImageButton2
                ImageButton video2 = (ImageButton)
findViewById(R.id.ImageButton2);
                video2.setOnClickListener(this);

                //ImageButton3
                ImageButton video3 = (ImageButton)
findViewById(R.id.ImageButton3);
                video3.setOnClickListener(this);

                //ImageButton4
                ImageButton video4 = (ImageButton)
findViewById(R.id.ImageButton4);
                video4.setOnClickListener(this);

                //ImageButton5
                ImageButton video5 = (ImageButton)
findViewById(R.id.ImageButton5);
                video5.setOnClickListener(this);

                //ImageButton6
                ImageButton video6 = (ImageButton)
findViewById(R.id.ImageButton6);
                video6.setOnClickListener(this);

                //ImageButton7
                ImageButton video7 = (ImageButton)
findViewById(R.id.ImageButton7);
                video7.setOnClickListener(this);

                //ImageButton7
                ImageButton video8 = (ImageButton)
findViewById(R.id.ImageButton8);
                video8.setOnClickListener(this);

        }


        public void onClick(View v) {

                if(v.getId() == R.id.ImageButton1){
                        setContentView(R.layout.watch);
                        VideoView videoview1 = (VideoView)
findViewById(R.id.videoView1);
                        videoview1.setMediaController(new
MediaController(this));
                        videoview1.setVideoPath("
http://slwdesign.biz/android/austins.mp4";);
                        videoview1.start();
                        videoview1.requestFocus();
                }
                if (v.getId() == R.id.ImageButton2){
                        setContentView(R.layout.watch);
                        VideoView videoview1 = (VideoView)
findViewById(R.id.videoView1);
                        videoview1.setMediaController(new
MediaController(this));
                        videoview1.setVideoPath("
http://slwdesign.biz/android/brownsWigs.mp4";);
                        videoview1.start();
                        videoview1.requestFocus();
                }
                if (v.getId() == R.id.ImageButton3){
                        setContentView(R.layout.watch);
                        VideoView videoview1 = (VideoView)
findViewById(R.id.videoView1);
                        videoview1.setMediaController(new
MediaController(this));
                        videoview1.setVideoPath("
http://slwdesign.biz/android/frames&Boxes.mp4";);
                        videoview1.start();
                        videoview1.requestFocus();
                }
                if (v.getId() == R.id.ImageButton4){
                        setContentView(R.layout.watch);
                        VideoView videoview1 = (VideoView)
findViewById(R.id.videoView1);
                        videoview1.setMediaController(new
MediaController(this));
                        videoview1.setVideoPath("
http://slwdesign.biz/android/hatMckool.mp4";);
                        videoview1.start();
                        videoview1.requestFocus();
                }
                if(v.getId() == R.id.ImageButton5){
                        setContentView(R.layout.watch);
                        VideoView videoview1 = (VideoView)
findViewById(R.id.videoView1);
                        videoview1.setMediaController(new
MediaController(this));
                        videoview1.setVideoPath("
http://slwdesign.biz/android/gardenTime.mp4";);
                        videoview1.start();
                        videoview1.requestFocus();
                }
                if (v.getId() == R.id.ImageButton6){
                        setContentView(R.layout.watch);
                        VideoView videoview1 = (VideoView)
findViewById(R.id.videoView1);
                        videoview1.setMediaController(new
MediaController(this));
                        videoview1.setVideoPath("
http://slwdesign.biz/android/paulBarclay.mp4";);
                        videoview1.start();
                        videoview1.requestFocus();
                }
                if (v.getId() == R.id.ImageButton7){
                        setContentView(R.layout.watch);
                        VideoView videoview1 = (VideoView)
findViewById(R.id.videoView1);
                        videoview1.setMediaController(new
MediaController(this));
                        videoview1.setVideoPath("
http://slwdesign.biz/android/fishShed.mp4";);
                        videoview1.start();
                        videoview1.requestFocus();
                }
                if(v.getId() == R.id.ImageButton8){
                        setContentView(R.layout.watch);
                        VideoView videoview1 = (VideoView)
findViewById(R.id.videoView1);
                        videoview1.setMediaController(new
MediaController(this));
                        videoview1.setVideoPath("
http://slwdesign.biz/android/offBoutique.mp4";);
                        videoview1.start();
                        videoview1.requestFocus();
                }
        }
}

On Thu, Apr 5, 2012 at 9:09 PM, lbendlin <[email protected]> wrote:

> Under res/values create a resource array with the video URLs. That will
> automatically give you the enumeration that you can then use in the code.
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> 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
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
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