从 ProgressDialog 获取 ProgressBar 对象

Get ProgressBar object from ProgressDialog

有什么方法可以从 ProgressDialog.java class 中获取 "mProgress" 对象?

我想将不确定微调器的颜色设置为白色,并为其保持相同的 android 样式。我见过使用样式的解决方案,但 none 确实符合标准。我希望一切都和它一模一样,只是颜色是白色。

我想要 mProgress 对象的原因是我可以在上面使用下面的代码:

mProgressBar.getIndeterminateDrawable().setColorFilter(new LightingColorFilter(0xFF000000, 0xFFFFFF));

找到了!

ProgressDialog progress = new ProgressDialog(this);
AlertDialog alert = progress; // not sure if you need this bit, required for what I do 

ProgressBar prog = (ProgressBar)progress.findViewById(android.R.id.progress);
prog.getIndeterminateDrawable().setColorFilter(new LightingColorFilter(0xFF000000, 0xFFFFFF));