Search in sources :

Example 6 with PresenterImpl

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();
}
Also used : PresenterImpl(com.google.samples.apps.iosched.archframework.PresenterImpl) Bundle(android.os.Bundle)

Example 7 with PresenterImpl

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();
}
Also used : PresenterImpl(com.google.samples.apps.iosched.archframework.PresenterImpl)

Aggregations

PresenterImpl (com.google.samples.apps.iosched.archframework.PresenterImpl)7 Bundle (android.os.Bundle)1 UpdatableView (com.google.samples.apps.iosched.archframework.UpdatableView)1 ScheduleHelper (com.google.samples.apps.iosched.model.ScheduleHelper)1 SessionsHelper (com.google.samples.apps.iosched.util.SessionsHelper)1