@Override
 public void onDetach() {
   super.onDetach();
   ((PrintsEditorActivity) getActivity()).removeActionListener(this);
   ((PrintsEditorActivity) getActivity()).removePhotoSelectedListener(this);
 }
 @Override
 public void onAttach(Activity activity) {
   super.onAttach(activity);
   ((PrintsEditorActivity) getActivity()).addActionListener(this);
   ((PrintsEditorActivity) getActivity()).addPhotoSelectedListener(this);
 }