From: Bartek Przybylski Date: Mon, 2 Jul 2012 16:28:31 +0000 (+0200) Subject: disable download button while downloading X-Git-Tag: oc-android-1.4.3~323^2~2 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/54539939f3e2d8afd111e85f677e4624b2e77801?ds=inline disable download button while downloading --- diff --git a/src/eu/alefzero/owncloud/ui/fragment/FileDetailFragment.java b/src/eu/alefzero/owncloud/ui/fragment/FileDetailFragment.java index 1ab92842..9850b652 100644 --- a/src/eu/alefzero/owncloud/ui/fragment/FileDetailFragment.java +++ b/src/eu/alefzero/owncloud/ui/fragment/FileDetailFragment.java @@ -152,6 +152,7 @@ public class FileDetailFragment extends SherlockFragment implements i.putExtra(FileDownloader.EXTRA_REMOTE_PATH, mFile.getRemotePath()); i.putExtra(FileDownloader.EXTRA_FILE_PATH, mFile.getURLDecodedRemotePath()); i.putExtra(FileDownloader.EXTRA_FILE_SIZE, mFile.getFileLength()); + v.setEnabled(false); getActivity().startService(i); } @@ -373,6 +374,7 @@ public class FileDetailFragment extends SherlockFragment implements private class DownloadFinishReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { + getView().findViewById(R.id.fdDownloadBtn).setEnabled(true); if (intent.getAction().equals(FileDownloader.BAD_DOWNLOAD_MESSAGE)) { Toast.makeText(context, R.string.downloader_download_failed , Toast.LENGTH_SHORT).show();