use of com.google.samples.apps.iosched.archframework.PresenterImpl in project iosched by google.
the class VideoLibraryFilteredFragment method initPresenter.
private void initPresenter() {
VideoLibraryModel model = ModelProvider.provideVideoLibraryModel(getDataUri(VideoLibraryQueryEnum.VIDEOS), getDataUri(VideoLibraryQueryEnum.MY_VIEWED_VIDEOS), getDataUri(VideoLibraryQueryEnum.FILTERS), getActivity(), getLoaderManager());
// Instantiate a new model with initial filter values from the intent call.
String topicIdFilter = VideoLibraryModel.ALL_TOPICS;
int yearFilter = VideoLibraryModel.ALL_YEARS;
Bundle extras = getActivity().getIntent().getExtras();
if (extras != null) {
topicIdFilter = extras.getString(VideoLibraryFilteredActivity.KEY_FILTER_TOPIC, VideoLibraryModel.ALL_TOPICS);
yearFilter = extras.getInt(VideoLibraryFilteredActivity.KEY_FILTER_YEAR, VideoLibraryModel.ALL_YEARS);
}
model.setSelectedTopic(topicIdFilter);
model.setSelectedYear(yearFilter);
PresenterImpl presenter = new PresenterImpl(model, this, VideoLibraryUserActionEnum.values(), VideoLibraryQueryEnum.values());
presenter.loadInitialQueries();
}
use of com.google.samples.apps.iosched.archframework.PresenterImpl in project iosched by google.
the class VideoLibraryFragment method initPresenter.
private void initPresenter() {
VideoLibraryModel model = ModelProvider.provideVideoLibraryModel(getDataUri(VideoLibraryQueryEnum.VIDEOS), getDataUri(VideoLibraryQueryEnum.MY_VIEWED_VIDEOS), getDataUri(VideoLibraryQueryEnum.FILTERS), getActivity(), getLoaderManager());
PresenterImpl presenter = new PresenterImpl(model, this, VideoLibraryUserActionEnum.values(), VideoLibraryQueryEnum.values());
presenter.loadInitialQueries();
}
Aggregations