Code example for ProgressBar

Methods: setSecondaryProgress

0
    private void fireDataLoadUpdate() { 
		Runnable updater = new Runnable() {
	        public void run() { 
	        	textStreamed.setText((CharSequence) (totalKbRead + " Kb read"));
	    		float loadProgress = ((float)totalKbRead/(float)mediaLengthInKb);
	    		progressBar.setSecondaryProgress((int)(loadProgress*100));
	        } 
	    }; 
	    handler.post(updater);
    } 
 
    /** 
     * We have preloaded enough content and started the MediaPlayer so update the buttons & progress meters. 
     */ 
    private void fireDataPreloadComplete() { 
    	Runnable updater = new Runnable() {
	        public void run() { 
	    		mediaPlayer.start();
	    		startPlayProgressUpdater(); 
	        	playButton.setEnabled(true);
	        	//streamButton.setEnabled(false);