Advertisement
Guest User

Untitled

a guest
Sep 15th, 2014
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. @Override
  2. public void onAttach(Activity activity) {
  3.  
  4. super.onAttach(activity);
  5.  
  6. try {
  7. if (!(activity instanceof FragmentActivity)) {
  8. throw new IllegalStateException(((Object) this).getClass().getSimpleName()
  9. + " must be attached to a FragmentActivity.");
  10.  
  11. }
  12. mHomeActivity = (FragmentActivity) activity;
  13.  
  14. } catch (ClassCastException e) {
  15. throw new ClassCastException(activity.toString() + " must implement OnNavigateProfileListener ");
  16. }
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement