two Bars which shows the progress of a game. If the user get points or time is up etc the progressBars should be updated:
private TextView tv;
private Progre
I have tried in many ways by calling setProgress in Thread, runOnUiThread, Handler, Runnable. All of them dont work.
So finally, set value of dialog.setIndeterminate(false); will work.
Once you set dialog.setIndeterminate(true); the progress WONT UPDATE AT ALL.
public static ProgressDialog createProgressDialog(Activity activity, int messageID, boolean cancelable) {
ProgressDialog dialog = new ProgressDialog(activity, R.style.DialogButtonTint);
dialog.setMessage(activity.getString(messageID));
dialog.setIndeterminate(false);
dialog.setMax(100);
dialog.setSecondaryProgress(0);
dialog.setProgress(0);
dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
dialog.setCancelable(cancelable);
dialog.show();
return dialog;
}