@Override
 public void onAttach(SupportActivity activity) {
   super.onAttach(activity);
   try {
     mListener = (OnButtonSelectedListener) activity;
   } catch (ClassCastException e) {
     throw new ClassCastException(
         activity.toString() + " must implement OnButtonSelectedListener");
   }
 }
Exemple #2
0
 @Override
 public void onAttach(SupportActivity activity) {
   super.onAttach(activity);
   // Check that the container activity has implemented the callback
   // interface
   try {
     mListener = (OnTaskListItemClickedListener) activity;
   } catch (ClassCastException e) {
     throw new ClassCastException(
         activity.toString() + " must implement OnTaskListItemClickedListener"); // $NON-NLS-1$
   }
 }