List of usage examples for android.widget Toolbar setNavigationIcon
public void setNavigationIcon(@Nullable Drawable icon)
From source file:org.cyanogenmod.theme.chooser.ChooserActivity.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setActionBar(toolbar);/* w w w. j a va 2s . co m*/ toolbar.setNavigationIcon(R.drawable.ic_menu); toolbar.setNavigationOnClickListener(new View.OnClickListener() { public void onClick(View v) { if (mDrawerLayout.isDrawerOpen(mDrawerContainer)) { mDrawerLayout.closeDrawer(mDrawerContainer); } else { mDrawerLayout.openDrawer(mDrawerContainer); } } }); initDrawer(); NotificationHijackingService.ensureEnabled(this); if (savedInstanceState == null) { handleIntent(getIntent()); } }