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);
}
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();
}
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();
}
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();
}
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());
}
}
Aggregations