Code example for Equalizer

Methods: setEnabled

0
        updateBars(); 
        return true; 
    } 
 
    private void setEqualizerEnabled(boolean enabled) {
        equalizer.setEnabled(enabled);
        updateBars(); 
    } 
 
    private void updateBars() { 
 
        for (Map.Entry<Short, SeekBar> entry : bars.entrySet()) {
            short band = entry.getKey();
            SeekBar bar = entry.getValue();
            bar.setEnabled(equalizer.getEnabled());
            short minEQLevel = equalizer.getBandLevelRange()[0];
            bar.setProgress(equalizer.getBandLevel(band) - minEQLevel);
        } 
    } 
 
    private void initEqualizer() {