进度在动作条上的Andr​​oid大号preVIEW [英] ProgressBar in ActionBar on Android L Preview

查看:179
本文介绍了进度在动作条上的Andr​​oid大号preVIEW的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天,我就开始为了移植一个应用程序到Android大号preVIEW有它几乎可以最终产品发布的时候。我发现一个问题是,我不能有一个不确定的进度上的动作条。它不会在所有的显示和logcat中抛出这个错误:

Today I started porting an app to Android L preview in order to have it almost ready when the final product launches. One problem I found is that I can't have an indeterminate progressbar on the ActionBar. It doesn't show at all and throws this error on logcat:

E/PhoneWindow﹕ Circular progress bar not located in current window decor

我用这个code,它的工作原理与< 4.4:

I'm using this code, which works in <4.4:

requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setProgressBarIndeterminateVisibility(true);

有没有办法得到它的工作又在Android的L或我应该使用一个外部的进度?

Is there any way to get it working again in Android L or should I use an external ProgressBar?

推荐答案

我只是有相同的问题,因为你。你用在动作条的进度怎么样呢?我找不到一个正式声明使用,而不是它是什么。你可以使用是一个进度条对话框,但它可能不适合所有需求。

I just have the same problem as you. What do you use instead of the progressbar in the Actionbar? I can't find a official statement what to use instead of it. What you can use is a dialog with a progress bar, but it maybe dont fit all needs.

这篇关于进度在动作条上的Andr​​oid大号preVIEW的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆