Skip to content

Commit

Permalink
Fix for sampler issue #141.
Browse files Browse the repository at this point in the history
Disable "Play/Pause/Rwd/FF" tabs and enable "Close" tab after clicking "Stop" tab.
  • Loading branch information
oleksii-frolov committed Nov 4, 2014
1 parent 6a97a85 commit ca5a91b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/com/connectsdk/sampler/fragments/MediaPlayerFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,13 @@ public void enableMedia() {
}

public void disableMedia() {
closeButton.setEnabled(false);
closeButton.setOnClickListener(null);

stopMedia();
}

public void stopMedia() {
playButton.setEnabled(false);
playButton.setOnClickListener(null);
pauseButton.setEnabled(false);
Expand All @@ -356,8 +363,6 @@ public void disableMedia() {
mSeekBar.setEnabled(false);
mSeekBar.setOnSeekBarChangeListener(null);
mSeekBar.setProgress(0);
closeButton.setEnabled(false);
closeButton.setOnClickListener(null);

positionTextView.setText("--:--:--");
durationTextView.setText("--:--:--");
Expand Down Expand Up @@ -405,7 +410,7 @@ public void onClick(View view) {

@Override
public void onSuccess(Object response) {
disableMedia();
stopMedia();
stopUpdating();
}

Expand Down

0 comments on commit ca5a91b

Please sign in to comment.