title: How to change the title of fragment when press back?
body: <p>I have 3 fragments, Home, Menu and orders they can be loaded by <code>bottomnavigtioview</code> items and the title shown by it as well
  once navigate from Home to Orders then if you want to go back to Home From Orders the title still "Orders"</p>
  
  <pre><code>    public boolean onNavigationItemSelected(@NonNull MenuItem item) {
  
          Fragment fragment;
  
          switch (item.getItemId()) {
              case R.id.navigation_home:
                  toolbar.setTitle(getResources().getString(R.string.title_home));
                  fragment = new HomeFragment();
                  loadFragment(fragment);
                  return true;
              case R.id.navigation_menu:
                  toolbar.setTitle(getResources().getString(R.string.fragment_title_menu));
                  fragment = new ProductFragment();
                  loadFragment(fragment);
                  return true;
              case R.id.navigation_orders:
                  toolbar.setTitle(getResources().getString(R.string.title_orders));
                  fragment = new OrdersFragment();
                  loadFragment(fragment);
                  return true;
          }
          return false;
      }
  };
  
  private void loadFragment(Fragment fragment) {
      // load fragment
     FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
         transaction.replace(R.id.frame_container, fragment);
         transaction.addToBackStack(null);
         transaction.commit();
  }
  </code></pre>
  
  <p><code>
  </code></p>
  
  <p>@Override</p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      context = this;
  
       navigation =  findViewById(R.id.navigation);
      navigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);
  
  
      // attaching bottom sheet behaviour - hide / show on scroll
      CoordinatorLayout.LayoutParams layoutParams = (CoordinatorLayout.LayoutParams) navigation.getLayoutParams();
      layoutParams.setBehavior(new BottomNavigationBehavior());
  
      toolbar.setTitle(getResources().getString(R.string.title_home));
      Fragment f = HomeFragment.newInstance();
      getSupportFragmentManager().beginTransaction()
              .replace(R.id.frame_container, f)
              .commit();
  }`
  </code></pre>
  
  <p>I have Also Tried this but its not working</p>
  
  <p>`  </p>
  
  <p>fragmentmanger.addOnBackStackChangedListener ->  public void onBackStackChanged() {</p>
  
  <pre><code>        }`
  </code></pre>