+ inRoot = (
+ chosenFile == null ||
+ (chosenFile.isFolder() && chosenFile.getParentId() == FileDataStorageManager.ROOT_PARENT_ID)
+ );
+ if (!inRoot) {
+ title = chosenFile.getFileName();
+ }
+
+ /// set the chosen title
+ ActionBar actionBar = getSupportActionBar();
+ actionBar.setTitle(title);
+ /// also as content description
+ View actionBarTitleView = getWindow().getDecorView().findViewById(
+ getResources().getIdentifier("action_bar_title", "id", "android")
+ );
+ if (actionBarTitleView != null) { // it's null in Android 2.x
+ actionBarTitleView.setContentDescription(title);
+ }
+
+ /// set home button properties
+ mDrawerToggle.setDrawerIndicatorEnabled(inRoot);
+ actionBar.setDisplayHomeAsUpEnabled(true);
+ actionBar.setDisplayShowTitleEnabled(true);
+