Search in sources :

Example 1 with MainActivityPresenterImpl

use of pri.weiqiang.myjapanese.mvp.presenter.MainActivityPresenterImpl in project MyJapanese by 54wall.

the class MainActivity method initVariable.

@Override
protected void initVariable(@Nullable Bundle savedInstanceState) {
    presenter = new MainActivityPresenterImpl(this);
    if (!registered) {
        busSubscription = RxBus.getDefault().toObserverable(EventContainer.class).subscribe(new Action1<EventContainer>() {

            @Override
            public void call(EventContainer eventContainer) {
                presenter.onBusEventInteraction(eventContainer);
            }
        });
        registered = true;
    }
    initToolbar();
    initRadioButtonView();
    initDrawerLayout();
    initNavigationView();
    initBanner();
// 无效
// mToolbar.setTitle(SharedPreferenceManager.getInstance().getString(Constants.CURRENT_LESSON, Constants.DEFAULT_LESSON));
}
Also used : MainActivityPresenterImpl(pri.weiqiang.myjapanese.mvp.presenter.MainActivityPresenterImpl) Action1(rx.functions.Action1) EventContainer(pri.weiqiang.myjapanese.rxbus.event.EventContainer)

Aggregations

MainActivityPresenterImpl (pri.weiqiang.myjapanese.mvp.presenter.MainActivityPresenterImpl)1 EventContainer (pri.weiqiang.myjapanese.rxbus.event.EventContainer)1 Action1 (rx.functions.Action1)1