use of com.lguipeng.notes.adpater.DrawerListAdapter in project Notes by lguipeng.
the class MainActivity method initDrawerView.
@Override
public void initDrawerView(List<String> list) {
SimpleListAdapter adapter = new DrawerListAdapter(this, list);
mDrawerMenuListView.setAdapter(adapter);
mDrawerMenuListView.setOnItemClickListener((AdapterView<?> parent, View view, int position, long id) -> mainPresenter.onDrawerItemSelect(position));
mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, 0, 0) {
@Override
public void onDrawerOpened(View drawerView) {
super.onDrawerOpened(drawerView);
invalidateOptionsMenu();
mainPresenter.onDrawerOpened();
}
@Override
public void onDrawerClosed(View drawerView) {
super.onDrawerClosed(drawerView);
invalidateOptionsMenu();
mainPresenter.onDrawerClosed();
}
};
mDrawerToggle.setDrawerIndicatorEnabled(true);
mDrawerLayout.setDrawerListener(mDrawerToggle);
mDrawerLayout.setScrimColor(getCompactColor(R.color.drawer_scrim_color));
}
Aggregations