@Override @CallSuper public void onAttach(android.app.Activity activity) { super.onAttach(activity); lifecycleSubject.onNext(FragmentEvent.ATTACH); }
@Override public void onAttach(Context context) { super.onAttach(context); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 && getParentFragment() != null) { if (getParentFragment() instanceof EasyPermissions.PermissionCallbacks) { mPermissionCallbacks = (EasyPermissions.PermissionCallbacks) getParentFragment(); } if (getParentFragment() instanceof EasyPermissions.RationaleCallbacks){ mRationaleCallbacks = (EasyPermissions.RationaleCallbacks) getParentFragment(); } } if (context instanceof EasyPermissions.PermissionCallbacks) { mPermissionCallbacks = (EasyPermissions.PermissionCallbacks) context; } if (context instanceof EasyPermissions.RationaleCallbacks) { mRationaleCallbacks = (EasyPermissions.RationaleCallbacks) context; } }
@Override public void onAttach(Context context) { super.onAttach(context); mActivity = (MainActivity) getActivity(); mInputMethodManager = context.getSystemService(InputMethodManager.class); mSharedPreferences = PreferenceManager.getDefaultSharedPreferences(context); }
@Override public void onAttach(Context context) { super.onAttach(context); if (context instanceof SingleTouchActivity ) { listener = (SingleTouchActivity) context; } }
@Override public void onAttach(Activity activity) { super.onAttach(activity); mActivity = activity; }
@Override public void onAttach(Activity activity) { super.onAttach(activity); } @Override
@Override public void onAttach(Context context) { super.onAttach(context); mActivity = (Activity) context; }
@Override public void onAttach(Context context) { super.onAttach(context); if (context instanceof AddTrackToPlaylistListener) { listener = (AddTrackToPlaylistListener) context; } }
@Override public void onAttach(Activity activity) { super.onAttach(activity); // Verify that the host activity implements the callback interface if(activity instanceof IDeleteDialogFragmentListener) { listeners.add((IDeleteDialogFragmentListener) activity); } }
@Override public void onAttach(Context context) { super.onAttach(context); try { dialogListener = (AddFriendListener) context; } catch (ClassCastException e) { throw new ClassCastException(context.toString() + " must implement NoticeDialogListener"); } }
@Override public void onAttach(Activity activity) { super.onAttach(activity); try { callbackListener = (OAuthListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OAuthListener"); } }
@Override public void onAttach(Activity activity) { super.onAttach(activity); // Verify that the host activity implements the callback interface try { // Instantiate the NoticeDialogListener so we can send events to the host mListener = (ApplicationFilesDialogListener) activity; } catch (ClassCastException e) { // The activity doesn't implement the interface, throw exception throw new ClassCastException(activity.toString() + " must implement ApplicationFilesDialogListener"); } }
@Override public void onAttach(Activity activity) { super.onAttach(activity); try { onLocaleSelected = (OnLocaleSelected) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnLocaleSelected"); } }
@Override public void onAttach(Activity activity) { super.onAttach(activity); tryBindLists(); }
@Override public void onAttach(Activity activity) { try { listener = (NameFileDialogInterface) activity; } catch (ClassCastException e) { e.printStackTrace(); } super.onAttach(activity); }
@Override public void onAttach(Activity act) { super.onAttach(act); importtext = getArguments().getString(Lime.IMPORT_TEXT); }
@SuppressWarnings("unchecked") @Override public void onAttach(Activity activity) { super.onAttach(activity); try { listener = (Listener) activity; } catch (ClassCastException e) { if ( !isListenerOptional() ) throw new ClassCastException(activity.getClass().getName() + " must implement listener"); } }
@Override public void onAttach(Activity activity) { super.onAttach(activity); dispatcher.dispatchOnAttach(this, activity); }
@Override public void onAttach(Context context) { super.onAttach(context); if (context instanceof OnColorSelectedListener) { setOnColorSelectedListener((OnColorSelectedListener) context); } else { repopulateItems(); } }
@Override public void onAttach(Context context) { super.onAttach(context); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 && getParentFragment() != null && getParentFragment() instanceof EasyPermissions.PermissionCallbacks) { mPermissionCallbacks = (EasyPermissions.PermissionCallbacks) getParentFragment(); } else if (context instanceof EasyPermissions.PermissionCallbacks) { mPermissionCallbacks = (EasyPermissions.PermissionCallbacks) context; } }