Code example for SeekBar

Methods: setClickablesetEnabledsetFocusablesetMaxsetProgresssetOnSeekBarChangeListener

0
    /** 
	 * Set up the slide bar to adjust the opacity of the front image 
	 */ 
	private void setupSeekBar() 
	{ 
		seekBarOpacity.setEnabled(true);
		seekBarOpacity.setFocusable(true);
		seekBarOpacity.setClickable(true);
 
		// 255 is the maximum opacity of a drawable 
		seekBarOpacity.setMax(255);		
 
		// Set the default opacity to 70 
		seekBarOpacity.setProgress(70);
		transparentLayerDrawable.setAlpha(70);
 
		seekBarOpacity.setOnSeekBarChangeListener( new OnSeekBarChangeListener() {
 
			@Override 
			public void onStopTrackingTouch(SeekBar seekBar) {
			} 
 
Experience pair programming with AI  Get Codota for Java