Advertisement
arxeiss

Android Dialog Interface

Apr 29th, 2016
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.76 KB | None | 0 0
  1. public class LineUpDetailDialog extends DialogFragment {
  2.     public interface DetailDialogListener {
  3.         void onConcertInCustomLineUpChanged(int wpId);
  4.         void onDismiss();
  5.     }
  6.  
  7.     @Override
  8.     public Dialog onCreateDialog(Bundle savedInstanceState) {
  9.         parentFragment = getArguments().getString(bundleParentFragmentKey);
  10.         try {
  11.             Fragment fragment = activity.getSupportFragmentManager().findFragmentByTag(parentFragment);
  12.             listener = (DetailDialogListener) fragment;
  13.         }catch (Exception e){
  14.             Crashlytics.logException(e);
  15.         }
  16.     }
  17. }
  18. // --------------------------------------------------
  19. public class PageLineUp extends LoadingFragment implements LineUpDetailDialog.DetailDialogListener{¨
  20.     ...
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement