예제 #1
0
 private void setTaskInfo() {
   TaskProvider mTaskProvider = TaskProvider.getInstance(getActivity());
   Task task = mTaskProvider.getTaskById(mTaskid);
   if (task != null && getView() != null) {
     showEmptyLabel(false);
     TextView title = (TextView) getView().findViewById(R.id.view_task_title);
     TextView desc = (TextView) getView().findViewById(R.id.view_task_description);
     title.setText(task.getTitle());
     desc.setText(task.getDescription());
   } else {
     showEmptyLabel(true);
   }
 }
예제 #2
0
 Task getTask() {
   if (_task == null && _intent.getData() != null) {
     int taskId = Task.getIdFromUri(_intent.getData());
     if (_provider != null) setTask(_provider.get(taskId));
   }
   return _task;
 }
  /**
   * The init method is responsible for intializing all singletons of the research stack framework
   *
   * @param context android context, preferably application context.
   * @param concreteResearchStack implementation of ResearchStack class
   */
  public static void init(Context context, ResearchStack concreteResearchStack) {
    instance = concreteResearchStack;

    ResourceManager.init(concreteResearchStack.createResourceManagerImplementation(context));

    UiManager.init(concreteResearchStack.createUiManagerImplementation(context));

    DataProvider.init(concreteResearchStack.createDataProviderImplementation(context));

    StorageAccess.getInstance()
        .init(
            concreteResearchStack.getPinCodeConfig(context),
            concreteResearchStack.getEncryptionProvider(context),
            concreteResearchStack.createFileAccessImplementation(context),
            concreteResearchStack.createAppDatabaseImplementation(context));

    TaskProvider.init(concreteResearchStack.createTaskProviderImplementation(context));

    NotificationConfig.init(concreteResearchStack.createNotificationConfigImplementation(context));

    PermissionRequestManager.init(
        concreteResearchStack.createPermissionRequestManagerImplementation(context));
  }