Code example for SeekBar

Methods: setSecondaryProgress

0
		}, 0, 1000); 
	} 
 
	public void onBufferingUpdate(MediaPlayer mp, int percent) {
		int progress = (int) ((float) mp.getDuration() * ((float) percent / (float) 100));
		seekBarProgress.setSecondaryProgress(progress / 1000);
	} 
 
	public void onClick(View v) {
		if (v.getId() == R.id.surfaceViewFrame) {
			if (linearLayoutMediaController.getVisibility() == View.GONE) {
				linearLayoutMediaController.setVisibility(View.VISIBLE);
				hideMediaController(); 
			} else if (player != null) {
				if (player.isPlaying()) {
					player.pause();
					imageViewPauseIndicator.setVisibility(View.VISIBLE);
				} else { 
					player.start();
					imageViewPauseIndicator.setVisibility(View.GONE);
				}