From: masensio Date: Tue, 2 Jun 2015 13:26:42 +0000 (+0200) Subject: fix, in a tablet, the title is not correct when menu is shown and rotating X-Git-Tag: oc-android-1.7.2~1^2~23^2~15^2 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/5f4752486479d738e5187bdd0493b2b0fbf738f8 fix, in a tablet, the title is not correct when menu is shown and rotating --- diff --git a/src/com/owncloud/android/ui/activity/FileActivity.java b/src/com/owncloud/android/ui/activity/FileActivity.java index 382019f8..13bad2ed 100644 --- a/src/com/owncloud/android/ui/activity/FileActivity.java +++ b/src/com/owncloud/android/ui/activity/FileActivity.java @@ -393,13 +393,18 @@ public class FileActivity extends ActionBarActivity } protected void updateActionBarTitleAndHomeButton(){ - if (mFile.getParentId() == 0) { + if (mFile.getParentId() == 0 || + (!mFile.isFolder() && mFile.getParentId() == 1)) { getSupportActionBar().setTitle(getString( R.string.default_display_name_for_root_folder)); mDrawerToggle.setDrawerIndicatorEnabled(true); - } else { + } else if (mFile.isFolder()) { getSupportActionBar().setTitle(mFile.getFileName().toString()); mDrawerToggle.setDrawerIndicatorEnabled(false); + } else { + getSupportActionBar().setTitle(getStorageManager().getFileById(mFile.getParentId()) + .getFileName().toString()); + mDrawerToggle.setDrawerIndicatorEnabled(false); } } /**