Question: ```
#include<stdio.h>
main()
{
  printf("%c\n",1-3+2["nexus"]);
}

```

The result is **v**. How does it turn out?  

What does the indentation (square ones) do?

Answer: 
use addOnBackStackChangedListener method in your BaseActivity, which will be called any time backstack changes

```
getSupportFragmentManager().addOnBackStackChangedListener(
            new FragmentManager.OnBackStackChangedListener() {
                public void onBackStackChanged() {
                    FragmentManager fm = getSupportFragmentManager();

                    if (fm != null) {
                        int backStackCount = fm.getBackStackEntryCount();
                        if (backStackCount == 0) {
                            if (getSupportActionBar() != null) {
                                getSupportActionBar().setHomeAsUpIndicator(R.drawable.ic_menu);
                            }
                            setToolbarTittle(R.string.app_name);
                        } else {
                            if (getSupportActionBar() != null) {
                                getSupportActionBar().setHomeAsUpIndicator(R.drawable.back);
                            }
                        }
                    }
                }
            });

```
My workaround is to get the current title of the actionbar in the Fragment before setting it to the new title. This way, once the Fragment is popped, I can change back to that title.

```
@Override
public void onResume() {
    super.onResume();
    // Get/Backup current title
    mTitle = ((ActionBarActivity) getActivity()).getSupportActionBar()
            .getTitle();
    // Set new title
    ((ActionBarActivity) getActivity()).getSupportActionBar()
        .setTitle(R.string.this_fragment_title);
}

@Override
public void onDestroy() {
    // Set title back
    ((ActionBarActivity) getActivity()).getSupportActionBar()
        .setTitle(mTitle);

    super.onDestroy();
}

```