mirror of
https://github.com/nextcloud/android.git
synced 2024-11-24 06:05:42 +03:00
Merge remote-tracking branch 'origin/navigationDrawer_basic' into navigationDrawer_basic
This commit is contained in:
commit
4d7b5a1e50
4 changed files with 31 additions and 16 deletions
|
@ -206,7 +206,16 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
|||
protected void onCreate(Bundle savedInstanceState) {
|
||||
//Log_OC.wtf(TAG, "onCreate init");
|
||||
super.onCreate(savedInstanceState);
|
||||
getWindow().requestFeature(Window.FEATURE_NO_TITLE);
|
||||
|
||||
// Workaround, for fixing a problem with Android Library Suppor v7 19
|
||||
//getWindow().requestFeature(Window.FEATURE_NO_TITLE);
|
||||
if (getSupportActionBar() != null) {
|
||||
getSupportActionBar().hide();
|
||||
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(false);
|
||||
getSupportActionBar().setDisplayShowHomeEnabled(false);
|
||||
getSupportActionBar().setDisplayShowTitleEnabled(false);
|
||||
}
|
||||
|
||||
mIsFirstAuthAttempt = true;
|
||||
|
||||
|
@ -1898,5 +1907,4 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
|||
mIsFirstAuthAttempt = true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
|
|
@ -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));
|
||||
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(
|
||||
getString(R.string.default_display_name_for_root_folder));
|
||||
}
|
||||
actionBarTitleView.setContentDescription(title);
|
||||
}
|
||||
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ public class PreviewImageActivity extends FileActivity implements
|
|||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
requestWindowFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
|
||||
//requestWindowFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
|
||||
setContentView(R.layout.preview_image_activity);
|
||||
|
||||
// Navigation Drawer
|
||||
|
@ -105,6 +105,8 @@ public class PreviewImageActivity extends FileActivity implements
|
|||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
actionBar.hide();
|
||||
|
||||
updateActionBarTitleAndHomeButton();
|
||||
|
||||
// Make sure we're running on Honeycomb or higher to use FullScreen and
|
||||
// Immersive Mode
|
||||
if (isHoneycombOrHigher()) {
|
||||
|
|
Loading…
Reference in a new issue