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; }
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); }
private void updateProjects() { mProjects = Project.getAllModels(DaoDBHelper.getDaoSession(getApplicationContext())); }