>我需要将此抽屉图标更改为后退箭头,该箭头会将详细信息活动更改为列表活动。
法典图像
Toolbar toolbar = (Toolbar) findViewById(R.id.your_tool_bar);
setSupportActionBar(toolbar);
toolbar.setNavigationIcon(R.drawable.your_arrow_icon);
我建议你阅读这个
https://developer.android.com/training/implementing-navigation/nav-drawer#java
您可以使用 ActionBarDrawerToggle
final DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle( this, drawer, toolbar,
R.string.navigation_drawer_open, R.string.navigation_drawer_close);
toggle.setDrawerIndicatorEnabled(false);
toggle.setHomeAsUpIndicator(R.drawable.myicon);//your preferred drawable image here
toggle.setToolbarNavigationClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
drawer.openDrawer(GravityCompat.START);
}
});