Fixed crash when removing feed

This commit is contained in:
daniel oeh 2012-09-26 20:28:16 +02:00
parent 0f76583344
commit 258a6acd6e
1 changed files with 13 additions and 3 deletions

View File

@ -73,7 +73,12 @@ public class ExternalPlayerFragment extends SherlockFragment {
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
controller = new PlaybackController(getActivity()) {
controller = setupPlaybackController();
butPlay.setOnClickListener(controller.newOnPlayButtonClickListener());
}
private PlaybackController setupPlaybackController() {
return new PlaybackController(getActivity()) {
@Override
public void setupGUI() {
@ -150,9 +155,14 @@ public class ExternalPlayerFragment extends SherlockFragment {
if (fragmentLayout != null) {
fragmentLayout.setVisibility(View.GONE);
}
controller = setupPlaybackController();
if (butPlay != null) {
butPlay.setOnClickListener(controller
.newOnPlayButtonClickListener());
}
}
};
butPlay.setOnClickListener(controller.newOnPlayButtonClickListener());
}
@Override