daily pastebin goal
52%
SHARE
TWEET

Untitled

a guest Feb 23rd, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @Override
  2. public void onCreate(Bundle savedInstanceState) {
  3.     super.onCreate(savedInstanceState);
  4.     setContentView(R.layout.activity_main);
  5.     showVideo();
  6. }
  7. private void showVideo()
  8. {
  9.     VideoView vd = (VideoView)findViewById(R.id.videoview);
  10.     Uri uri = Uri.parse("android.resource://package/"+R.raw.movie);
  11.     MediaController mc = new MediaController(this);
  12.     vd.setMediaController(mc);
  13.     vd.setVideoURI(uri);
  14.     vd.start();
  15. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top