From: masensio Date: Tue, 2 Jun 2015 12:48:56 +0000 (+0200) Subject: Fix, the correct navigation not shown in the action bar X-Git-Tag: oc-android-1.7.2~1^2~23^2~15^2~1 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/bad83f956d15f5fbeb97bca2b9a8e6a123189c63 Fix, the correct navigation not shown in the action bar --- diff --git a/src/com/owncloud/android/ui/activity/FileDisplayActivity.java b/src/com/owncloud/android/ui/activity/FileDisplayActivity.java index 8a64bcec..ebf20f53 100644 --- a/src/com/owncloud/android/ui/activity/FileDisplayActivity.java +++ b/src/com/owncloud/android/ui/activity/FileDisplayActivity.java @@ -1139,7 +1139,6 @@ public class FileDisplayActivity extends HookActivity cleanSecondFragment(); // Sync Folder startSyncFolderOperation(directory, false); - } /** @@ -1176,13 +1175,14 @@ public class FileDisplayActivity extends HookActivity actionBar.setDisplayHomeAsUpEnabled(true); actionBar.setDisplayShowTitleEnabled(true); mDrawerToggle.setDrawerIndicatorEnabled(!noRoot); - if (!noRoot) { - actionBar.setTitle(getString(R.string.default_display_name_for_root_folder)); - View actionBarTitleView = getWindow().getDecorView().findViewById(actionBarTitleId); - if (actionBarTitleView != null) { // it's null in Android 2.x - actionBarTitleView.setContentDescription( - getString(R.string.default_display_name_for_root_folder)); - } + String title = getString(R.string.default_display_name_for_root_folder); + if (noRoot) { + title = currentDir.getFileName(); + } + actionBar.setTitle(title); + View actionBarTitleView = getWindow().getDecorView().findViewById(actionBarTitleId); + if (actionBarTitleView != null) { // it's null in Android 2.x + actionBarTitleView.setContentDescription(title); } actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);