Code example for SeekBar

Methods: setProgresssetSecondaryProgress

0
				position = mediaPlayer.getCurrentPosition(); 
				long duration = mediaPlayer.getDuration(); 
				if (seekBar != null) { 
					if (duration > 0) { 
						long pos = 1000L * position / duration; 
						seekBar.setProgress((int) pos); 
					} 
					int percent = 0; 
					seekBar.setSecondaryProgress(percent * 10); 
				} 
			} catch (IllegalStateException ex) { 
				Log.i(getClass().getName(), 
						"Player has been either released or in an error state."); 
			} 
		} 
	}; 
	 
	private PhoneStateListener phoneStateListener = new PhoneStateListener() {
	    @Override 
	    public void onCallStateChanged(int state, String incomingNumber) { 
	        if (state == TelephonyManager.CALL_STATE_RINGING ||