I am using a toolbar as my actionbar in an activity. I am trying to add the method getActionBar().setDisplayHomeAsUpEnabled(true); to the Activity.java file fo
getActionBar().setDisplayHomeAsUpEnabled(true);
just check getSupportActionBar not equal to null
setSupportActionBar(toolbar); if(getSupportActionBar() != null) { getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setTitle("Daily Shopping List"); }