How to change toolbar back button icon in android material components
问题 I would like to change the default navigate up icon (back button icon) to my custom icon. I not using a drawer, just a simple toolbar and material components Is this possible? 回答1: If you are using a Toolbar to change the icon just use: Toolbar toolbar = findViewById(R.id.xxx); toolbar.setNavigationIcon(R.drawable.xxxx4); setSupportActionBar(toolbar); If you are using the ActionBar you can use: getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setHomeAsUpIndicator(R