- actionBar.setDisplayHomeAsUpEnabled(currentDir != null && currentDir.getParentId() != 0);
- actionBar.setDisplayShowTitleEnabled(false);
- actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
+ boolean noRoot = (currentDir != null && currentDir.getParentId() != 0);
+ actionBar.setDisplayHomeAsUpEnabled(noRoot);
+ actionBar.setDisplayShowTitleEnabled(!noRoot);
+ if (!noRoot) {
+ actionBar.setTitle(getString(R.string.default_display_name_for_root_folder));
+ }
+ actionBar.setNavigationMode(!noRoot ? ActionBar.NAVIGATION_MODE_STANDARD : ActionBar.NAVIGATION_MODE_LIST);