panwrona / DownloadProgressBar

DownloadProgressBar is an android library that delivers awesome custom progress bar. You can manipulate it's state in every way.
974 stars 167 forks source link

When start download,how can i know this will be success or fail? #1

Closed brucetoo closed 9 years ago

brucetoo commented 9 years ago

downloadProgressView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { downloadProgressView.playToSuccess(); } });

panwrona commented 9 years ago

Yeah, I know that. It was created for other project and I think that today I will add some callbacks for users to interact with the view.

brucetoo commented 9 years ago

That will be nice ,Thank u. By the way,add some annotation in ur code will be perfect

panwrona commented 9 years ago

Great, thanks for suggestions, I apprecieate it ;) When I update the code, I will close this issue, so you know this is fixed

brucetoo commented 9 years ago

Yup,thank u again.

panwrona commented 9 years ago

Hello again, I've added method setProgress(value) for this issue. But to use this method you have to run animation with method playManualProgressAnimation() . It is originally set to result with Success State, but you can change the result with setErrorResultState() and setSuccessResultState . Also you can run the animation and immediately end progress with error state by using abortDownload() method. If something's not clear just re-open the issue