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

Use fancy sync dialouge with progress bar as soon as minimal API level is raised #158

Open
obilodeau opened this issue Aug 23, 2016 · 0 comments

Comments

@obilodeau
Copy link
Member

obilodeau commented Aug 23, 2016

Something like this was already implemented, but we wanted to support android 1.5 and 1.6, therefore we replaced it with an ugly one :-)

Dialog dialog;
AlertDialog alertDialog;
private static ProgressDialog syncProgressDialog;

            syncProgressDialog = new ProgressDialog(this);
            syncProgressDialog.setTitle(String.format(getString(R.string.syncing),serviceDescription));
            syncProgressDialog.setMessage(getString(R.string.syncing_connect));
            syncProgressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
            syncProgressDialog.setButton(ProgressDialog.BUTTON_NEGATIVE, getString(R.string.cancel), new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int which) {
                    syncProgressDialog.cancel();
                }
            });
            syncProgressDialog.setOnCancelListener(new DialogInterface.OnCancelListener() {

                public void onCancel(DialogInterface dialog) {
                    SyncManager.getInstance().cancel();
                }
                dialogString
            });
            syncProgressDialog.setIndeterminate(true);
            syncProgressDialog.dismiss();

Imported from Launchpad using lp2gh.

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

No branches or pull requests

1 participant