@Override public void onConfigurationChanged(Configuration newConfig){
  super.onConfigurationChanged(newConfig);
  setTitle(shortenTitle(mCurrentDirPath));
}

@ Override public void onConfigurationChanged ( Configuration newConfig ) { super . onConfigurationChanged ( newConfig ) ; setTitle ( shortenTitle ( mCurrentDirPath ) ) ; }
prevents the activity from recreating on change of orientation . the title needs to be recalculated .
