public class VolumePreference.SeekBarVolumizer extends Object implements SeekBar.OnSeekBarChangeListener, Runnable
SeekBar
into a volume control.Constructor and Description |
---|
VolumePreference.SeekBarVolumizer(Context context,
SeekBar seekBar,
int streamType) |
VolumePreference.SeekBarVolumizer(Context context,
SeekBar seekBar,
int streamType,
Uri defaultUri) |
Modifier and Type | Method and Description |
---|---|
void |
changeVolumeBy(int amount) |
SeekBar |
getSeekBar() |
boolean |
isSamplePlaying() |
void |
muteVolume() |
void |
onProgressChanged(SeekBar seekBar,
int progress,
boolean fromTouch)
Notification that the progress level has changed.
|
void |
onRestoreInstanceState(VolumePreference.VolumeStore volumeStore) |
void |
onSaveInstanceState(VolumePreference.VolumeStore volumeStore) |
void |
onStartTrackingTouch(SeekBar seekBar)
Notification that the user has started a touch gesture.
|
void |
onStopTrackingTouch(SeekBar seekBar)
Notification that the user has finished a touch gesture.
|
void |
revertVolume() |
void |
run()
Starts executing the active part of the class' code.
|
void |
startSample() |
void |
stop() |
void |
stopSample() |
public VolumePreference.SeekBarVolumizer(Context context, SeekBar seekBar, int streamType)
public void stop()
public void revertVolume()
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromTouch)
SeekBar.OnSeekBarChangeListener
onProgressChanged
in interface SeekBar.OnSeekBarChangeListener
seekBar
- The SeekBar whose progress has changedprogress
- The current progress level. This will be in the range 0..max where max
was set by ProgressBar.setMax(int)
. (The default value for max is 100.)fromTouch
- True if the progress change was initiated by the user.public void onStartTrackingTouch(SeekBar seekBar)
SeekBar.OnSeekBarChangeListener
onStartTrackingTouch
in interface SeekBar.OnSeekBarChangeListener
seekBar
- The SeekBar in which the touch gesture beganpublic void onStopTrackingTouch(SeekBar seekBar)
SeekBar.OnSeekBarChangeListener
onStopTrackingTouch
in interface SeekBar.OnSeekBarChangeListener
seekBar
- The SeekBar in which the touch gesture beganpublic void run()
Runnable
Runnable
.public boolean isSamplePlaying()
public void startSample()
public void stopSample()
public SeekBar getSeekBar()
public void changeVolumeBy(int amount)
public void muteVolume()
public void onSaveInstanceState(VolumePreference.VolumeStore volumeStore)
public void onRestoreInstanceState(VolumePreference.VolumeStore volumeStore)