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

PleaseWait Dialog Message and Title not updating in onProgressUpdate #7

Open
kalpesh2804 opened this issue Jun 20, 2024 · 0 comments
Open

Comments

@kalpesh2804
Copy link

kalpesh2804 commented Jun 20, 2024

Hello,

I am trying to update Pleasewait Message and Title in OnProgressUpdate method but its not updating properly. It's displaying only first message. It was working fine in ProgressDialog.

code example

@Override
    protected void onPreExecute() {
        super.onPreExecute();

        pd = new PleaseWaitDialog(g);
        pd.setTitle("Please wait");
        pd.setMessage("Loading...");
        pd.setCancelable(false);
        pd.show();
        //pd.setTitle(mContext.getString(R.string.syncing_data));
        //pd.setMessage("Processing");

        pd.setTitle(mContext.getString(R.string.syncing_data));
        pd.setMessage("Processing");

        //pd = ProgressDialog.show(mContext, mContext.getString(R.string.syncing_data), "Processing", true, false);
        // Create and show Progress dialog
        //pd.getWindow().setBackgroundDrawable(new ColorDrawable(mContext.getResources().getColor(R.color.background_color, mContext.getResources().newTheme())));
    }

    /**
     * This callback method is invoked when publishProgress()
     * method is called
     */
    @Override
    protected void onProgressUpdate(String... values) {
        super.onProgressUpdate(values);
        pd.setMessage(values[0]);
}
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

1 participant