title: ActionBar Title dynamically change with fragment
body: <p>I have 1 Activity with 3 Fragments inside (Home-Login-RestorePass) Initially, HomeFragment shows and the other two are hidden. I want that the ActionBar Title change depending on which Fragment is showing.</p>
  
  <p>I'm trying in my Activity with:</p>
  
  <pre><code>public void setActionBarTitle(String title){
      getSupportActionBar().setTitle(title);
  }
  
  @Override
  public void onResume() {
      super.onResume();
      // Set title
      setActionBarTitle(getString(R.string.app_name));
  }
  </code></pre>
  
  <p>and the fragments has the same:</p>
  
  <pre><code>@Override
  public void onResume() {
      super.onResume();
      // Set title
      ((LoginActivity) getActivity()).setActionBarTitle(getString(R.string.fragment_login));
  }
  </code></pre>
  
  <p>But it doesn't work. It always show <strong>R.string.fragment_login</strong> on the title.</p>
  
  <p>I'm using FragmentTransaction for the fragment transition:</p>
  
  <pre><code>btnLogin.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              FragmentTransaction ft = getFragmentManager().beginTransaction();
              ft.setCustomAnimations(android.R.anim.slide_in_left, android.R.anim.slide_out_right);
              HomeFragment homeFragment = (HomeFragment) getFragmentManager().findFragmentById(R.id.fragmentHome);
              LoginFragment loginFragment = (LoginFragment) getFragmentManager().findFragmentById(R.id.fragmentLogin);
              ft.hide(homeFragment).addToBackStack(null);
              ft.show(loginFragment).addToBackStack(null).commit();
          }
      });
  </code></pre>
  
  <p>Additionally if i could make appear an Arrow Button (Back) on ActionBar depending of the fragment would be great.</p>
  
  <p>Thanks for your time! Regards.</p>