import com.owncloud.android.files.services.FileDownloader.FileDownloaderBinder;
import com.owncloud.android.files.services.FileUploader.FileUploaderBinder;
import com.owncloud.android.lib.common.network.OnDatatransferProgressListener;
+import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.services.observer.FileObserverService;
import com.owncloud.android.ui.activity.FileActivity;
import com.owncloud.android.ui.activity.FileDisplayActivity;
import com.owncloud.android.ui.dialog.RemoveFileDialogFragment;
import com.owncloud.android.ui.dialog.RenameFileDialogFragment;
import com.owncloud.android.utils.DisplayUtils;
-import com.owncloud.android.utils.Log_OC;
/**
// configure UI for depending upon local state of the file
FileDownloaderBinder downloaderBinder = mContainerActivity.getFileDownloaderBinder();
FileUploaderBinder uploaderBinder = mContainerActivity.getFileUploaderBinder();
- if (transferring || (downloaderBinder != null && downloaderBinder.isDownloading(mAccount, file)) || (uploaderBinder != null && uploaderBinder.isUploading(mAccount, file))) {
+ if (transferring ||
+ (downloaderBinder != null && downloaderBinder.isDownloading(mAccount, file)) ||
+ (uploaderBinder != null && uploaderBinder.isUploading(mAccount, file))
+ ) {
setButtonsForTransferring();
} else if (file.isDown()) {
}
ImageView iv = (ImageView) getView().findViewById(R.id.fdIcon);
if (iv != null) {
- iv.setImageResource(DisplayUtils.getResourceId(mimetype, filename));
+ iv.setImageResource(DisplayUtils.getFileTypeIconId(mimetype, filename));
}
}
progressText.setVisibility(View.VISIBLE);
FileDownloaderBinder downloaderBinder = mContainerActivity.getFileDownloaderBinder();
FileUploaderBinder uploaderBinder = mContainerActivity.getFileUploaderBinder();
+ //if (getFile().isDownloading()) {
if (downloaderBinder != null && downloaderBinder.isDownloading(mAccount, getFile())) {
progressText.setText(R.string.downloader_download_in_progress_ticker);
} else if (uploaderBinder != null && uploaderBinder.isUploading(mAccount, getFile())) {