public class SoundPullEventListener<V extends android.view.View> extends java.lang.Object implements PullToRefreshBase.OnPullEventListener<V>
| Constructor and Description |
|---|
SoundPullEventListener(android.content.Context context)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSoundEvent(PullToRefreshBase.State event,
int resId)
Set the Sounds to be played when a Pull Event happens.
|
void |
clearSounds()
Clears all of the previously set sounds and events.
|
android.media.MediaPlayer |
getCurrentMediaPlayer()
Gets the current (or last) MediaPlayer instance.
|
void |
onPullEvent(PullToRefreshBase<V> refreshView,
PullToRefreshBase.State event,
PullToRefreshBase.Mode direction)
Called when the internal state has been changed, usually by the user
pulling.
|
public SoundPullEventListener(android.content.Context context)
context - - Contextpublic final void onPullEvent(PullToRefreshBase<V> refreshView, PullToRefreshBase.State event, PullToRefreshBase.Mode direction)
PullToRefreshBase.OnPullEventListeneronPullEvent in interface PullToRefreshBase.OnPullEventListener<V extends android.view.View>refreshView - - View which has had it's state change.event - - The new state of View.direction - - One of PullToRefreshBase.Mode.PULL_FROM_START or
PullToRefreshBase.Mode.PULL_FROM_END depending on which direction
the user is pulling. Only useful when state is
PullToRefreshBase.State.PULL_TO_REFRESH or
PullToRefreshBase.State.RELEASE_TO_REFRESH.public void addSoundEvent(PullToRefreshBase.State event, int resId)
event - - The event for which the sound will be played.resId - - Resource Id of the sound file to be played (e.g.
R.raw.pull_sound)public void clearSounds()
public android.media.MediaPlayer getCurrentMediaPlayer()