Search in sources :

Example 1 with MainPresenterImpl

use of com.lauren.simplenews.main.presenter.MainPresenterImpl in project SimpleNews by liuling07.

the class MainActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    mToolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(mToolbar);
    mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
    mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, mToolbar, R.string.drawer_open, R.string.drawer_close);
    mDrawerToggle.syncState();
    mDrawerLayout.setDrawerListener(mDrawerToggle);
    mNavigationView = (NavigationView) findViewById(R.id.navigation_view);
    setupDrawerContent(mNavigationView);
    mMainPresenter = new MainPresenterImpl(this);
    switch2News();
}
Also used : ActionBarDrawerToggle(android.support.v7.app.ActionBarDrawerToggle) MainPresenterImpl(com.lauren.simplenews.main.presenter.MainPresenterImpl)

Aggregations

ActionBarDrawerToggle (android.support.v7.app.ActionBarDrawerToggle)1 MainPresenterImpl (com.lauren.simplenews.main.presenter.MainPresenterImpl)1