X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/69fa5b9185d693d7887ea09ac06733dcaa21c3e6..ff82b51e49f40155e7c340090f5ee759af2bf3ad:/src/com/owncloud/android/ui/fragment/FileFragment.java diff --git a/src/com/owncloud/android/ui/fragment/FileFragment.java b/src/com/owncloud/android/ui/fragment/FileFragment.java index fa69491d..fd5aeefa 100644 --- a/src/com/owncloud/android/ui/fragment/FileFragment.java +++ b/src/com/owncloud/android/ui/fragment/FileFragment.java @@ -1,5 +1,8 @@ -/* ownCloud Android client application - * Copyright (C) 2012-2013 ownCloud Inc. +/** + * ownCloud Android client application + * + * @author David A. Velasco + * Copyright (C) 2015 ownCloud Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, @@ -21,7 +24,6 @@ import android.accounts.Account; import android.app.Activity; import android.support.v4.app.Fragment; -import com.actionbarsherlock.app.SherlockFragment; import com.owncloud.android.datamodel.OCFile; import com.owncloud.android.files.services.FileDownloader.FileDownloaderBinder; import com.owncloud.android.files.services.FileUploader.FileUploaderBinder; @@ -30,11 +32,8 @@ import com.owncloud.android.ui.activity.ComponentsGetter; /** * Common methods for {@link Fragment}s containing {@link OCFile}s - * - * @author David A. Velasco - * */ -public class FileFragment extends SherlockFragment { +public class FileFragment extends Fragment { private OCFile mFile; @@ -44,7 +43,8 @@ public class FileFragment extends SherlockFragment { /** * Creates an empty fragment. * - * It's necessary to keep a public constructor without parameters; the system uses it when tries to reinstantiate a fragment automatically. + * It's necessary to keep a public constructor without parameters; the system uses it when + * tries to reinstantiate a fragment automatically. */ public FileFragment() { mFile = null; @@ -84,7 +84,8 @@ public class FileFragment extends SherlockFragment { mContainerActivity = (ContainerActivity) activity; } catch (ClassCastException e) { - throw new ClassCastException(activity.toString() + " must implement " + ContainerActivity.class.getSimpleName()); + throw new ClassCastException(activity.toString() + " must implement " + + ContainerActivity.class.getSimpleName()); } } @@ -102,8 +103,6 @@ public class FileFragment extends SherlockFragment { /** * Interface to implement by any Activity that includes some instance of FileListFragment * Interface to implement by any Activity that includes some instance of FileFragment - * - * @author David A. Velasco */ public interface ContainerActivity extends ComponentsGetter { @@ -115,11 +114,13 @@ public class FileFragment extends SherlockFragment { public void showDetails(OCFile file); - ///// TO UNIFY IN A SINGLE CALLBACK METHOD - EVENT NOTIFICATIONs -> something happened inside the fragment, MAYBE activity is interested --> unify in notification method + ///// TO UNIFY IN A SINGLE CALLBACK METHOD - EVENT NOTIFICATIONs -> something happened + // inside the fragment, MAYBE activity is interested --> unify in notification method /** - * Callback method invoked when a the user browsed into a different folder through the list of files + * Callback method invoked when a the user browsed into a different folder through the + * list of files * - * @param file + * @param folder */ public void onBrowsedDownTo(OCFile folder); @@ -128,11 +129,13 @@ public class FileFragment extends SherlockFragment { * * This happens when a download or upload is started or ended for a file. * - * This method is necessary by now to update the user interface of the double-pane layout in tablets - * because methods {@link FileDownloaderBinder#isDownloading(Account, OCFile)} and {@link FileUploaderBinder#isUploading(Account, OCFile)} + * This method is necessary by now to update the user interface of the double-pane layout + * in tablets because methods {@link FileDownloaderBinder#isDownloading(Account, OCFile)} + * and {@link FileUploaderBinder#isUploading(Account, OCFile)} * won't provide the needed response before the method where this is called finishes. * - * TODO Remove this when the transfer state of a file is kept in the database (other thing TODO) + * TODO Remove this when the transfer state of a file is kept in the database + * (other thing TODO) * * @param file OCFile which state changed. * @param downloading Flag signaling if the file is now downloading. @@ -141,21 +144,6 @@ public class FileFragment extends SherlockFragment { public void onTransferStateChanged(OCFile file, boolean downloading, boolean uploading); -// /** -// * Callback method invoked when the detail fragment wants to notice its container -// * activity about a relevant state the file shown by the fragment. -// * -// * Added to notify to FileDisplayActivity about the need of refresh the files list. -// * -// * Currently called when: -// * - a download is started; -// * - a rename is completed; -// * - a deletion is completed; -// * - the 'inSync' flag is changed; -// */ -// public void onFileStateChanged(); - - } }