Toolbar toolbar = findViewById(R.id.toolBar); toolbar.setNavigationIcon(R.drawable.ic_baseline_arrow_right_24); toolbar.setNavigationOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // You Code } });