Пример #1
0
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setHasOptionsMenu(true);
   intraUserSubAppSession = ((IntraUserSubAppSession) appSession);
   moduleManager = intraUserSubAppSession.getModuleManager();
   errorManager = appSession.getErrorManager();
   lstIntraUserInformations = new ArrayList<>();
 }
  private void setUpScreen(LayoutInflater layoutInflater)
      throws CantGetActiveLoginIdentityException {
    /** add navigation header */
    addNavigationHeader(
        FragmentsCommons.setUpHeaderScreen(
            layoutInflater,
            getActivity(),
            intraUserSubAppSession.getIntraUserModuleManager().getActiveIntraUserIdentity()));

    /** Navigation view items */
    NavigationViewAdapter navigationViewAdapter = new NavigationViewAdapter(getActivity(), null);
    setNavigationDrawer(navigationViewAdapter);
  }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    try {

      setHasOptionsMenu(true);
      // setting up  module
      intraUserSubAppSession = ((IntraUserSubAppSession) subAppsSession);
      moduleManager = intraUserSubAppSession.getIntraUserModuleManager();
      errorManager = subAppsSession.getErrorManager();

      mNotificationsCount = moduleManager.getIntraUsersWaitingYourAcceptanceCount();

      // TODO: display unread notifications.
      // Run a task to fetch the notifications count
      new FetchCountTask().execute();

    } catch (Exception ex) {
      CommonLogger.exception(TAG, ex.getMessage(), ex);
      errorManager.reportUnexpectedUIException(
          UISource.ACTIVITY, UnexpectedUIExceptionSeverity.CRASH, ex);
    }
  }