From: David A. Velasco Date: Tue, 14 Jul 2015 09:28:47 +0000 (+0200) Subject: Added icon for files synchronizing; folders use it whenever downloading or uploading... X-Git-Tag: oc-android-1.9^2~37^2~22 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/e885c78dc77c9909e5d7c3ce0acf612ea94aa0cd?ds=inline Added icon for files synchronizing; folders use it whenever downloading or uploading any file inside --- diff --git a/res/drawable/synchronizing_file_indicator.png b/res/drawable/synchronizing_file_indicator.png new file mode 100644 index 00000000..947cba73 Binary files /dev/null and b/res/drawable/synchronizing_file_indicator.png differ diff --git a/src/com/owncloud/android/ui/adapter/FileListListAdapter.java b/src/com/owncloud/android/ui/adapter/FileListListAdapter.java index 5e94e0f2..8d057146 100644 --- a/src/com/owncloud/android/ui/adapter/FileListListAdapter.java +++ b/src/com/owncloud/android/ui/adapter/FileListListAdapter.java @@ -249,24 +249,38 @@ public class FileListListAdapter extends BaseAdapter implements ListAdapter { mTransferServiceGetter.getFileDownloaderBinder(); FileUploaderBinder uploaderBinder = mTransferServiceGetter.getFileUploaderBinder(); - boolean downloading = (downloaderBinder != null && - downloaderBinder.isDownloading(mAccount, file)); OperationsServiceBinder opsBinder = mTransferServiceGetter.getOperationsServiceBinder(); - downloading |= (opsBinder != null && + boolean downloading = (downloaderBinder != null && + downloaderBinder.isDownloading(mAccount, file)); + boolean uploading = (uploaderBinder != null && + uploaderBinder.isUploading(mAccount, file)); + boolean synchronizing = (opsBinder != null && opsBinder.isSynchronizing(mAccount, file.getRemotePath())); - if (downloading) { + + localStateView.setVisibility(View.INVISIBLE); // default first + + if (file.isFolder()) { + if (synchronizing || downloading || uploading) { + localStateView.setImageResource(R.drawable.synchronizing_file_indicator); + localStateView.setVisibility(View.VISIBLE); + } + + } else if (synchronizing) { + localStateView.setImageResource(R.drawable.synchronizing_file_indicator); + localStateView.setVisibility(View.VISIBLE); + + } else if (downloading) { localStateView.setImageResource(R.drawable.downloading_file_indicator); localStateView.setVisibility(View.VISIBLE); - } else if (uploaderBinder != null && - uploaderBinder.isUploading(mAccount, file)) { + + } else if (uploading) { localStateView.setImageResource(R.drawable.uploading_file_indicator); localStateView.setVisibility(View.VISIBLE); + } else if (file.isDown()) { localStateView.setImageResource(R.drawable.local_file_indicator); localStateView.setVisibility(View.VISIBLE); - } else { - localStateView.setVisibility(View.INVISIBLE); } // share with me icon