Android-SetSupportProgressBarInDeterminateVibility(true)不工作

Android-SetSupportProgressBarInDeterminateVibility(true)不工作,android,android-progressbar,Android,Android Progressbar,我正在使用supportRequestWindowFeature(Window.FEATURE\u Undeterminate\u PROGRESS),要显示或隐藏进度栏,我正在使用SetSupportProgressBarIndeterminateVibility()。 其动机是,电子邮件地址一经验证即发送到服务器,同时等待服务器的响应并显示ProgressBar。获得响应后,ProgressBar将隐藏。 我的代码应该是有效的。请看下面。 }更换: setSupportProgr

我正在使用
supportRequestWindowFeature(Window.FEATURE\u Undeterminate\u PROGRESS)
,要显示或隐藏进度栏,我正在使用
SetSupportProgressBarIndeterminateVibility()

其动机是,电子邮件地址一经验证即发送到服务器,同时等待服务器的响应并显示ProgressBar。获得响应后,ProgressBar将隐藏。
我的代码应该是有效的。请看下面。

}

更换:

   setSupportProgressBarIndeterminateVisibility(true);
而不是

setProgressBarIndeterminateVisibility(true);

因为你扩展了ActionBarActivity。(因为您使用的是supportRequestWindowFeature而不是requestWindowFeature)

我已经尝试了
setProgressBarInDeterminateVibility(true)
失败,我切换到
setSupportProgressBarInDeterminateVibility(true)
。您还将supportRequestWindowFeature替换为requestWindowFeature?是的!我甚至做到了。
setProgressBarIndeterminateVisibility(true);