Code example for SeekBar

Methods: getId

0
    } 
 
    SeekBar.OnSeekBarChangeListener mSeekBarListener = new SeekBar.OnSeekBarChangeListener() {
        @Override 
        public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { 
            mAudioManager.setStreamVolume(SEEKBAR_TYPE[seekBar.getId()], progress, 0); 
        } 
 
        @Override 
        public void onStartTrackingTouch(SeekBar seekBar) { 
        } 
 
        @Override 
        public void onStopTrackingTouch(SeekBar seekBar) { 
            int index = seekBar.getId(); 
            if (!isSamplePlaying()) { 
                mRingtone.setStreamType(SEEKBAR_TYPE[index]); 
                startSample(); 
            } 
        } 
    };