ElasticProgressBar
ElasticProgressBar copied to clipboard
How to event when progressBar is finish success?
With a progressBar normal i can use:
setOnDismissListener(new ..)
but with ElasticProgressBar i can't see that.
How to do that?
i tried if( mProgressDialog.isAnimationFinished()) in loop to check but when it run to 27% then event ..
it look strange, but i suggest you to follow example app
Here is the code:
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
while (progressStatus < 100) {
progressStatus = downloadFile(); //See that in MainActivity of app
handler.post(new Runnable() {
public void run() {
//Set progress dinamically
mElasticDownloadView.setProgress(progressStatus);
Log.d("Progress:", "" + mElasticDownloadView.getProgress());
}
});
}
if (progressStatus >= 100) {
//Success
mElasticDownloadView.success();
}
}
}, 1000);
Yes. I see that, but my app is structure:
in MainActivity: ElasticDownloadView mElasticDownloadView; .... setContentView(..) Mymethod.event(context,mElasticDownloadView)
in MyMethod: new Handler().postDelayed(new Runnable() {..}
i want check it over in MainActivity when i check it on MyMethod i can't event more view in MainActivity . :(
Could you add full code? Or send me by email a copy of project