AndroidL预览版ActionBar中的ProgressBar

Jor*_*tín 8 android android-progressbar android-actionbar android-5.0-lollipop

今天我开始将应用程序移植到Android L预览版,以便在最终产品发布时几乎准备就绪.我发现的一个问题是我不能在ActionBar上有一个不确定的进度条.它根本不显示并在logcat上抛出此错误:

E/PhoneWindow? Circular progress bar not located in current window decor
Run Code Online (Sandbox Code Playgroud)

我正在使用此代码,该代码适用于<4.4:

requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setProgressBarIndeterminateVisibility(true);
Run Code Online (Sandbox Code Playgroud)

有没有办法让它在Android L中再次运行,还是应该使用外部ProgressBar?

hat*_*ata 2

我刚刚发现这个问题并检查了错误报告

开发团队似乎已经得出结论,该问题不会得到解决。

那是:

目的是因为 Material 操作栏不支持进度条功能。

“材质操作栏”应该是指4.4(API19)或更高版本的操作栏。