Example #1
1
 @Override
 public void onAttach(Activity activity) {
   super.onAttach(activity);
   semesterList = ((App) activity.getApplication()).getSemesterList();
   subject = (AppStateSubject) activity.getApplication();
   subject.registerListener(this);
 }
 @Override
 public void onAttach(Context context) {
   super.onAttach(context);
   if (context instanceof Activity) {
     mActivity = (Activity) context;
   }
 }
  @Override
  public void onAttach(Activity activity) {
    super.onAttach(activity);

    // Set listener to handle editing events
    mEditListener = (OnEditListener) activity;
  }
Example #4
0
 @Override
 public void onAttach(Context context) {
   super.onAttach(context);
   if (context instanceof ILoginFragmentListener) {
     mLoginFragmentListener = (ILoginFragmentListener) context;
   }
 }
Example #5
0
 @Override
 public void onAttach(Activity activity) {
   // TODO Auto-generated method stub
   super.onAttach(activity);
   context = activity;
   listener = (OnHeadlineSelectedListener) activity;
 }
Example #6
0
  @Override
  public void onAttach(Activity activity) {
    super.onAttach(activity);

    // Log current Fragment name;
    LogUtil.i(TAG, getClass().getSimpleName() + " : onAttach ");
  }
 @Override
 public void onAttach(Activity activity) {
   super.onAttach(activity);
   // 缓存当前依附的activity
   mContext = activity;
   Log.d(TAG, "BaseFragmentV4-->onAttach()");
 }
Example #8
0
 @Override
 public void onAttach(Activity activity) {
   super.onAttach(activity);
   mActivity = activity;
   inflater = LayoutInflater.from(activity);
   Logger.i(TAG, "onAttach");
 }
  @Override
  public void onAttach(Activity activity) {
    super.onAttach(activity);

    if (mFinishReceiver == null) mFinishReceiver = new FinishReceiver();
    getActivity().registerReceiver(mFinishReceiver, JRFragmentHostActivity.FINISH_INTENT_FILTER);
  }
  @Override
  public void onAttach(Activity activity) {
    super.onAttach(activity);

    /* Set the Listener */
    listener = (FullScreenImageFragmentInterface) activity;
  }
  @Override
  public void onAttach(Activity activity) {
    super.onAttach(activity);
    if (activity instanceof PagerCallbacks) pagerCallbacks = (PagerCallbacks) activity;

    if (activity instanceof InviteCreator) creator = (InviteCreator) activity;
  }
 @SuppressWarnings({
   "squid:S00112"
 }) // Rethrow unchecked exception due to constraint in method signature
 @Override
 public void onAttach(Context context) {
   super.onAttach(context);
 }
 @Override
 public void onAttach(Context context) {
   super.onAttach(context);
   if (getActivity() instanceof OnImageSelectedInteractionListener) {
     mOnImageSelectedInteractionListener = (OnImageSelectedInteractionListener) getActivity();
   }
 }
Example #14
0
 @Override
 public void onAttach(Activity activity) {
   super.onAttach(activity);
   mContext = getActivity();
   // mToolBarFragment = (Toolbar) getActivity().findViewById(R.id.toolbar);//TODO #lastclear
   mToolBarFragment = ((BaseActivity) getActivity()).getToolBar();
 }
 @Override
 public void onAttach(Activity activity) {
   if (BuildConfig.DEBUG) {
     Log.i(TAG, "onAttach");
   }
   super.onAttach(activity);
 }
  /* (non-Javadoc)
   * @see android.support.v4.app.Fragment#onAttach(android.app.Activity)
   */
  @Override
  public void onAttach(Activity activity) {
    super.onAttach(activity);

    // Save our parent activity.
    ParentActivity = activity;

    try {
      onNewInstitutionClickedListener = (OnNewInstitutionClickedListener) activity;
    } catch (ClassCastException e) {
      throw new ClassCastException(
          activity.toString() + "must implment OnNewInstitutionClickedListener");
    }

    try {
      onNoInstitutionCheckedListener = (OnNoInstitutionCheckedListener) activity;
    } catch (ClassCastException e) {
      throw new ClassCastException(
          activity.toString() + "must implment OnNoInstitutionCheckedListener");
    }

    try {
      onSendInstitutionData = (OnSendInstitutionData) activity;
    } catch (ClassCastException e) {
      throw new ClassCastException(activity.toString() + "must implment OnInstitutionData");
    }
  }
 @Override
 public void onAttach(Activity activity) {
   // TODO Auto-generated method stub
   super.onAttach(activity);
   if (activity instanceof CustDrawerMenu_10) mParentActivity = (CustDrawerMenu_10) activity;
   if (mParentActivity == null) mParentActivity = CustDrawerMenu_10.getInstance();
 }
 @Override
 public void onAttach(Context context) {
   super.onAttach(context);
   if (context != null) {
     callback = (ActivityCallback) context;
   }
 }
Example #19
0
 @Override
 public void onAttach(Activity activity) {
   // TODO Auto-generated method stub
   super.onAttach(activity);
   context = activity;
   secNewsService = SecNewsService.getInstance(context);
 }
Example #20
0
 @Override
 public void onAttach(Activity activity) {
   super.onAttach(activity);
   try {
     homeListener = (UserCardActionsCallback) activity;
   } catch (Exception e) {
   }
 }
 public void onAttach(Activity activity) {
   super.onAttach(activity);
   try {
     this.f10968C = (LocalTaxiBookingRequestFragment) activity;
   } catch (ClassCastException e) {
     throw new ClassCastException("Activity must implement NavigationDrawerCallbacks.");
   }
 }
Example #22
0
 /*
  * Deprecated on API 23
  * Use myOnAttach instead
  */
 @SuppressWarnings("deprecation")
 @Override
 public void onAttach(Activity activity) {
   super.onAttach(activity);
   if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
     // myOnAttach(activity);
   }
 }
  @Override
  public void onAttach(Activity activity) {
    super.onAttach(activity);

    if (activity instanceof WorkerFragmentListener) {
      mListener = (WorkerFragmentListener) activity;
    }
  }
  @Override
  public void onAttach(Activity activity) {

    super.onAttach(activity);

    ctx = activity;
    querySearchGoClickedListener = (QuerySearchGoClickedListener) ctx;
  }
 @Override
 public void onAttach(Context context) {
   super.onAttach(context);
   BaseApplication.getBus().post(new FragmentOnAttachEvent());
   Timber.tag(TAG);
   Timber.d("onAttach");
   initOnAttachBody();
 }
Example #26
0
  @Override
  public void onAttach(Activity activity) {
    super.onAttach(activity);

    if (onPhotoSelectClickListener == null) {
      onPhotoSelectClickListener = (OnPhotoSelectClickListener) activity;
    }
  }
Example #27
0
 @Override
 public void onAttach(Context activity) {
   super.onAttach(activity);
   if (activity instanceof SelectItemFragment.OnItemSelectedListener) {
     this.listener = (SelectItemFragment.OnItemSelectedListener) activity;
   }
   Assert.assertNotNull(listener);
 }
Example #28
0
 public void onAttach(Activity activity) {
   super.onAttach(activity);
   TAG = this.getClass().getSimpleName();
   mApp = GlobalApplication.getInstance();
   mLoadingDialog = new ProgressDialog(activity);
   mLoadingDialog.setCanceledOnTouchOutside(false);
   mLoadingDialog.setMessage("数据加载中...");
 }
Example #29
0
 @Override
 public void onAttach(Context context) {
   super.onAttach(context);
   mContext = context;
   mActivity = getActivity();
   mFragment = this;
   isAttached = true;
 }
 @Override
 public void onAttach(Context context) {
   super.onAttach(context);
   MainApplication.getComponent(this).inject(this);
   if (context instanceof OnChangeSessionListener) {
     onChangeSessionListener = (OnChangeSessionListener) context;
   }
 }