嗨,我正在为抽屉使用“android.support.v4.widget.DrawerLayout”。我想改变抽屉图标的颜色。请有人告诉我怎么做。我分享我的代码。请看一下并建议我如何更改图标颜色更改。
toolbar = (Toolbar) findViewById(R.id.tool_bar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
toolbar.setNavigationIcon(R.drawable.drawer);
toolbar.hideOverflowMenu();
getSupportActionBar().setTitle(null);
ImageView img = (ImageView) findViewById(R.id.imgCourses);
mRecyclerView = (RecyclerView) findViewById(R.id.RecyclerView);
mRecyclerView.setHasFixedSize(true);
Drawer = (DrawerLayout) findViewById(R.id.DrawerLayout);
mAdapter = new MyAdapter(TITLES,NAME,EMAIL,PROFILE,this);
mRecyclerView.setAdapter(mAdapter);
mRecyclerView.setVerticalScrollBarEnabled(false);
mLayoutManager = new LinearLayoutManager(this);
mRecyclerView.setLayoutManager(mLayoutManager);
mDrawerToggle = new ActionBarDrawerToggle(this,
Drawer,
toolbar,
R.string.openDrawer,
R.string.closeDrawer)
{
@Override
public void onDrawerOpened(View drawerView) {
super.onDrawerOpened(drawerView);
}
@Override
public void onDrawerClosed(View drawerView) {
super.onDrawerClosed(drawerView);
}
};
Drawer.setDrawerListener(mDrawerToggle);
mDrawerToggle.syncState();
Drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);