ElasticProgressBar icon indicating copy to clipboard operation
ElasticProgressBar copied to clipboard

How to event when progressBar is finish success?

Open AndroidLTG opened this issue 8 years ago • 3 comments

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 ..

AndroidLTG avatar Feb 24 '16 03:02 AndroidLTG

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);

michelelacorte avatar Feb 24 '16 18:02 michelelacorte

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 . :(

AndroidLTG avatar Feb 25 '16 08:02 AndroidLTG

Could you add full code? Or send me by email a copy of project

michelelacorte avatar Feb 25 '16 10:02 michelelacorte