android.view
public
class
android.view.VolumePanel
Handle the volume up and down keys.
This code really should be moved elsewhere.
Summary
Public Constructors
Public Methods
Protected Methods
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Public Constructors
public
VolumePanel(Context context, int type, int[] volumes, String setting)
Public Methods
public
int
adjustVolume(int amount, int flags)
Adjust the volume up or down.
Parameters
| amount
| How much to adjust the volume. Must be +1 or -1 |
| flags
| is the flags parameter from IRingerVolume |
public
int
getIndex()
Get the current index into the volume array
public
void
restorePositiveVolume(int flags)
Becomes audible and set to the same level as it was
before it went into mute
Parameters
| flags
| optional flags to be shown/heard
|
public
void
setIndex(int index, int flags)
Sets the volume array index directly.
Parameters
| index
| the new index for the volume
|
Protected Methods
protected
void
onVolumeChanged(int index, int volume, int flags)
Override this if you have other work to do when the volume
changes (for example, vibrating, playing a sound, etc.)