use of com.owncloud.android.ui.fragment.OCFileListFragment in project android by owncloud.
the class UploadPathActivity method onAccountSet.
/**
* Called when the ownCloud {@link Account} associated to the Activity was
* just updated.
*/
@Override
protected void onAccountSet(boolean stateWasRecovered) {
super.onAccountSet(stateWasRecovered);
if (getAccount() != null) {
updateFileFromDB();
OCFile folder = getFile();
if (folder == null || !folder.isFolder()) {
// fall back to root folder
setFile(getStorageManager().getFileByPath(OCFile.ROOT_PATH));
folder = getFile();
}
onBrowsedDownTo(folder);
if (!stateWasRecovered) {
OCFileListFragment listOfFolders = getListOfFilesFragment();
// TODO Enable when "On Device" is recovered ?
listOfFolders.listDirectory(folder);
startSyncFolderOperation(folder, false);
}
updateNavigationElementsInActionBar();
}
}
use of com.owncloud.android.ui.fragment.OCFileListFragment in project android by owncloud.
the class FileDisplayActivity method getListOfFilesFragment.
private OCFileListFragment getListOfFilesFragment() {
Fragment listOfFiles = getSupportFragmentManager().findFragmentByTag(FileDisplayActivity.TAG_LIST_OF_FILES);
if (listOfFiles != null) {
return (OCFileListFragment) listOfFiles;
}
Log_OC.e(TAG, "Access to unexisting list of files fragment!!");
return null;
}
use of com.owncloud.android.ui.fragment.OCFileListFragment in project android by owncloud.
the class FolderPickerActivity method browseToRoot.
public void browseToRoot() {
OCFileListFragment listOfFiles = getListOfFilesFragment();
if (listOfFiles != null) {
// should never be null, indeed
OCFile root = getStorageManager().getFileByPath(OCFile.ROOT_PATH);
listOfFiles.listDirectory(root);
// TODO Enable when "On Device" is recovered ?
// listOfFiles.listDirectory(root, false);
setFile(listOfFiles.getCurrentFile());
updateNavigationElementsInActionBar();
startSyncFolderOperation(root, false);
}
}
use of com.owncloud.android.ui.fragment.OCFileListFragment in project android by owncloud.
the class FolderPickerActivity method getListOfFilesFragment.
protected OCFileListFragment getListOfFilesFragment() {
Fragment listOfFiles = getSupportFragmentManager().findFragmentByTag(FolderPickerActivity.TAG_LIST_OF_FOLDERS);
if (listOfFiles != null) {
return (OCFileListFragment) listOfFiles;
}
Log_OC.e(TAG, "Access to unexisting list of files fragment!!");
return null;
}
use of com.owncloud.android.ui.fragment.OCFileListFragment in project android by owncloud.
the class FolderPickerActivity method onBackPressed.
@Override
public void onBackPressed() {
OCFileListFragment listOfFiles = getListOfFilesFragment();
if (listOfFiles != null) {
// should never be null, indeed
int levelsUp = listOfFiles.onBrowseUp();
if (levelsUp == 0) {
finish();
return;
}
setFile(listOfFiles.getCurrentFile());
updateNavigationElementsInActionBar();
}
}
Aggregations