public enum Music extends java.lang.Enum<Music> implements android.media.MediaPlayer.OnPreparedListener, android.media.MediaPlayer.OnErrorListener
Enum Constant and Description |
---|
INSTANCE |
Modifier and Type | Method and Description |
---|---|
void |
enable(boolean value) |
boolean |
isPlaying() |
void |
mute() |
boolean |
onError(android.media.MediaPlayer mp,
int what,
int extra) |
void |
onPrepared(android.media.MediaPlayer player) |
void |
pause() |
void |
play(java.lang.String assetName,
boolean looping) |
void |
resume() |
void |
stop() |
static Music |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Music[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
void |
volume(float value) |
public static final Music INSTANCE
public static Music[] values()
for (Music c : Music.values()) System.out.println(c);
public static Music valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic void play(@NonNull java.lang.String assetName, boolean looping)
public void mute()
public void onPrepared(android.media.MediaPlayer player)
onPrepared
in interface android.media.MediaPlayer.OnPreparedListener
public boolean onError(android.media.MediaPlayer mp, int what, int extra)
onError
in interface android.media.MediaPlayer.OnErrorListener
public void pause()
public void resume()
public void stop()
public void volume(float value)
public boolean isPlaying()
public void enable(boolean value)