Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to event when progressBar is finish success? #5

Open
AndroidLTG opened this issue Feb 24, 2016 · 3 comments
Open

How to event when progressBar is finish success? #5

AndroidLTG opened this issue Feb 24, 2016 · 3 comments

Comments

@AndroidLTG
Copy link

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

@michelelacorte
Copy link
Owner

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

@AndroidLTG
Copy link
Author

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

@michelelacorte
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants