diff --git a/src/com/connectsdk/sampler/fragments/MediaPlayerFragment.java b/src/com/connectsdk/sampler/fragments/MediaPlayerFragment.java index a04e660..250ee76 100644 --- a/src/com/connectsdk/sampler/fragments/MediaPlayerFragment.java +++ b/src/com/connectsdk/sampler/fragments/MediaPlayerFragment.java @@ -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); @@ -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("--:--:--"); @@ -405,7 +410,7 @@ public void onClick(View view) { @Override public void onSuccess(Object response) { - disableMedia(); + stopMedia(); stopUpdating(); }