Code example for SeekBar

Methods: setMaxgetMaxgetProgressincrementProgressBysetProgress

0
 
					huntRangeValueText.setText(progress + " ft");
					huntRangeVal = progress;
					 
					//attack range must be lower than hunt range 
					int currAttackVal = attackRange.getProgress();
					attackRange.setMax((huntRange.getProgress() > 0) ? huntRange.getProgress() -1 : 0);
					attackRange.setProgress(currAttackVal);
					 
					//force onProgressChange to be called to keep it in sync with hunt range 
					if(currAttackVal < attackRange.getMax())
					{ 
						attackRange.incrementProgressBy(1);
						attackRange.incrementProgressBy(-1);
					} 
 
			} 
 
			public void onStartTrackingTouch(SeekBar arg0) {
				// TODO Auto-generated method stub 
Stop searching for code, let great code find you!  Add Codota to your java IDE