Search in sources :

Example 1 with PresenterImpl

use of com.google.samples.apps.iosched.archframework.PresenterImpl in project iosched by google.

the class AppNavigationViewAbstractImpl method activityReady.

@Override
public void activityReady(Activity activity, LoginStateListener loginStateListener, NavigationItemEnum self) {
    mActivity = activity;
    mLoginStateListener = loginStateListener;
    mSelfItem = self;
    setUpView();
    NavigationModel model = new NavigationModel(getContext());
    PresenterImpl presenter = new PresenterImpl(model, this, NavigationUserActionEnum.values(), NavigationQueryEnum.values());
    presenter.loadInitialQueries();
    addListener(presenter);
}
Also used : PresenterImpl(com.google.samples.apps.iosched.archframework.PresenterImpl)

Example 2 with PresenterImpl

use of com.google.samples.apps.iosched.archframework.PresenterImpl in project iosched by google.

the class SessionDetailFragment method initPresenter.

private void initPresenter() {
    SessionDetailModel model = ModelProvider.provideSessionDetailModel(((SessionDetailActivity) getActivity()).getSessionUri(), getContext(), new SessionsHelper(getActivity()), getLoaderManager());
    PresenterImpl presenter = new PresenterImpl(model, this, SessionDetailUserActionEnum.values(), SessionDetailQueryEnum.values());
    presenter.loadInitialQueries();
}
Also used : SessionsHelper(com.google.samples.apps.iosched.util.SessionsHelper) PresenterImpl(com.google.samples.apps.iosched.archframework.PresenterImpl)

Example 3 with PresenterImpl

use of com.google.samples.apps.iosched.archframework.PresenterImpl in project iosched by google.

the class SessionFeedbackFragment method initPresenter.

private void initPresenter() {
    SessionFeedbackModel model = ModelProvider.provideSessionFeedbackModel(((SessionFeedbackActivity) getActivity()).getSessionUri(), getContext(), new FeedbackHelper(getContext()), getLoaderManager());
    PresenterImpl presenter = new PresenterImpl(model, this, SessionFeedbackUserActionEnum.values(), SessionFeedbackQueryEnum.values());
    presenter.loadInitialQueries();
}
Also used : PresenterImpl(com.google.samples.apps.iosched.archframework.PresenterImpl)

Example 4 with PresenterImpl

use of com.google.samples.apps.iosched.archframework.PresenterImpl in project iosched by google.

the class ExploreIOFragment method initPresenter.

private void initPresenter() {
    ExploreIOModel model = ModelProvider.provideExploreIOModel(getDataUri(ExploreIOQueryEnum.SESSIONS), getContext(), getLoaderManager());
    PresenterImpl presenter = new PresenterImpl(model, this, ExploreIOUserActionEnum.values(), ExploreIOQueryEnum.values());
    presenter.loadInitialQueries();
}
Also used : PresenterImpl(com.google.samples.apps.iosched.archframework.PresenterImpl)

Example 5 with PresenterImpl

use of com.google.samples.apps.iosched.archframework.PresenterImpl in project iosched by google.

the class MyScheduleActivity method initPresenter.

private void initPresenter() {
    MyScheduleModel model = ModelProvider.provideMyScheduleModel(new ScheduleHelper(this), this);
    if (mWideMode) {
        mPresenter = new PresenterImpl(model, (UpdatableView) getFragmentManager().findFragmentById(R.id.myScheduleWideFrag), MyScheduleModel.MyScheduleUserActionEnum.values(), MyScheduleModel.MyScheduleQueryEnum.values());
        mPresenter.loadInitialQueries();
    } else {
        // Each fragment in the pager adapter is an updatable view that the presenter must know
        MyScheduleSingleDayFragment[] fragments = mViewPagerAdapter.getFragments();
        UpdatableView[] views = new UpdatableView[fragments.length];
        for (int i = 0; i < fragments.length; i++) {
            views[i] = fragments[i];
        }
        mPresenter = new PresenterImpl(model, views, MyScheduleModel.MyScheduleUserActionEnum.values(), MyScheduleModel.MyScheduleQueryEnum.values());
    }
}
Also used : PresenterImpl(com.google.samples.apps.iosched.archframework.PresenterImpl) ScheduleHelper(com.google.samples.apps.iosched.model.ScheduleHelper) UpdatableView(com.google.samples.apps.iosched.archframework.UpdatableView)

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