I am trying to learn using Android Studio's built in templates. I have the Navigation Drawer variant selected currently, and I am trying to use the onNavigationItemSelected
method determine the supportActionBar
title using the following code:
public boolean onNavigationItemSelected(MenuItem item) {
// Handle navigation view item clicks here.
int id = item.getItemId();
getSupportActionBar().setTitle(item.getTitle()); ...
The issue is that once I start loading fragments, the title isn't updating whenever I select a new navigation item. I have checked to see if the method is firing every time an item in the drawer is selected, and it does, so I can't tell why this isn't updating.
Any help would be greatly appreciated!