PleaseWait icon indicating copy to clipboard operation
PleaseWait copied to clipboard

PleaseWait Dialog Message and Title not updating in onProgressUpdate

Open kalpesh2804 opened this issue 8 months ago • 0 comments

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

kalpesh2804 avatar Jun 20 '24 19:06 kalpesh2804