コード例 #1
0
  protected List<GeneralRowInterface> getData() {

    if (mProjects == null) {
      updateProjects();
    }

    if (mProjects == null || mProjects.size() < 1) {
      return new ArrayList<>();
    }

    List<GeneralRowInterface> dataList = new ArrayList<>();
    for (Project row : mProjects) {
      dataList.add(
          new GeneralRowInterface.BasicGeneralRowInterface(row.getUniqueSlug(), row.getTitle()));
      //            List<Language> langs = row.getLanguages();
    }

    return dataList;
  }
コード例 #2
0
  private void startReadingActivity(Project project) {

    Class nextActivity =
        (project.getUniqueSlug().equalsIgnoreCase(getString(R.string.open_bible_stories_slug)))
            ? StoryReadingActivity.class
            : ReadingActivity.class;

    Intent newIntent = new Intent(this, nextActivity).putExtra(PROJECT_PARAM, project);

    goToNextActivity(newIntent);
  }
コード例 #3
0
  private void updateProjects() {

    mProjects = Project.getAllModels(DaoDBHelper.getDaoSession(getApplicationContext()));
  }