projects
/
pub
/
Android
/
ownCloud.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix, in a tablet, the title is not correct when menu is shown and rotating
[pub/Android/ownCloud.git]
/
src
/
com
/
owncloud
/
android
/
ui
/
activity
/
FileActivity.java
diff --git
a/src/com/owncloud/android/ui/activity/FileActivity.java
b/src/com/owncloud/android/ui/activity/FileActivity.java
index
382019f
..
13bad2e
100644
(file)
--- 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(){
}
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);
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);
getSupportActionBar().setTitle(mFile.getFileName().toString());
mDrawerToggle.setDrawerIndicatorEnabled(false);
+ } else {
+ getSupportActionBar().setTitle(getStorageManager().getFileById(mFile.getParentId())
+ .getFileName().toString());
+ mDrawerToggle.setDrawerIndicatorEnabled(false);
}
}
/**
}
}
/**