Fixed crash when removing feed
This commit is contained in:
parent
0f76583344
commit
258a6acd6e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue