Code example for MediaController

0
	} 
 
	@Override 
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);
		videoView.setMediaController(new MediaController(getActivity()));
	} 
 
	public void playVideo() { 
		Uri uri = Uri.parse("android.resource://" + getActivity().getPackageName() + "/" + R.raw.test_vid);
		Log.d(TAG, "Uri is: " + uri);
		setVideoLocation(uri);
		if (!videoView.isPlaying()) {
			videoView.start();
		} 
	} 
 
	private void setVideoLocation(Uri uri) {
		try { 
			videoView.setVideoURI(uri);
		} catch (Exception e) {