PleaseWait
PleaseWait copied to clipboard
PleaseWait Dialog Message and Title not updating in onProgressUpdate
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]);
}