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
What I have done is override the getSupportActionBar() method in my base Activity and add a @NonNull annotation. This way, I only get one lint warning in the base activity about how I use @NonNull annotation for something that has a @Nullable annotation.
@NonNull
@Override
public ActionBar getSupportActionBar() {
// Small hack here so that Lint does not warn me in every single activity about null
// action bar
return super.getSupportActionBar();
}