diff options
author | daniel <daniel@danielpc> | 2012-06-06 18:46:36 +0200 |
---|---|---|
committer | daniel <daniel@danielpc> | 2012-06-06 18:46:36 +0200 |
commit | df298ba2e78df0b1d164ad80e37ccba9ea2fe08c (patch) | |
tree | cb0452ea4e7222c20d3bf6bcd135a41614b80514 /src/de/podfetcher/activity/MediaplayerActivity.java | |
parent | 76f1f7054db31aa50a311ec1a0f4508c9cfe1fce (diff) | |
download | AntennaPod-df298ba2e78df0b1d164ad80e37ccba9ea2fe08c.zip |
Implemented "FF" and "Rev" Buttons
Diffstat (limited to 'src/de/podfetcher/activity/MediaplayerActivity.java')
-rw-r--r-- | src/de/podfetcher/activity/MediaplayerActivity.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/de/podfetcher/activity/MediaplayerActivity.java b/src/de/podfetcher/activity/MediaplayerActivity.java index 974e70523..52d95e347 100644 --- a/src/de/podfetcher/activity/MediaplayerActivity.java +++ b/src/de/podfetcher/activity/MediaplayerActivity.java @@ -31,6 +31,8 @@ import de.podfetcher.util.Converter; public class MediaplayerActivity extends SherlockActivity { private final String TAG = "MediaplayerActivity"; + private static final int DEFAULT_SEEK_DELTA = 30000; // Seek-Delta to use when using FF or Rev Buttons + private PlaybackService playbackService; private MediaPositionObserver positionObserver; @@ -214,6 +216,24 @@ public class MediaplayerActivity extends SherlockActivity { } } }); + + butFF.setOnClickListener(new OnClickListener() { + @Override + public void onClick(View v) { + if (status == PlayerStatus.PLAYING) { + playbackService.seekDelta(DEFAULT_SEEK_DELTA); + } + } + }); + + butRev.setOnClickListener(new OnClickListener() { + @Override + public void onClick(View v) { + if (status == PlayerStatus.PLAYING) { + playbackService.seekDelta(-DEFAULT_SEEK_DELTA); + } + } + }); } |