Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
- showVideo();
- }
- private void showVideo()
- {
- VideoView vd = (VideoView)findViewById(R.id.videoview);
- Uri uri = Uri.parse("android.resource://package/"+R.raw.movie);
- MediaController mc = new MediaController(this);
- vd.setMediaController(mc);
- vd.setVideoURI(uri);
- vd.start();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement