简体   繁体   English

ActionBar Sherlock Progressbar没有在3.1上显示但在4.0+上显示

[英]ActionBar Sherlock Progressbar not showing on 3.1 but on 4.0+

looks like i have a smaller Problem but cant find why. 看起来我有一个较小的问题,但无法找到原因。 In my SherlockFragmentActivity onCreate i do the following: 在我的SherlockFragmentActivity onCreate中,我执行以下操作:

@Override
public void onCreate(final Bundle savedInstanceState)
{
    requestWindowFeature(Window.FEATURE_PROGRESS);
    requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
    super.onCreate(savedInstanceState);

The AndroidManifest.xml AndroidManifest.xml

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="15" />

In an Fragment which loads some Data i do a simple: 在加载一些数据的片段中,我做了一个简单的事情:

    getSherlockActivity().setSupportProgressBarIndeterminateVisibility(true);

All working great on ICS, but same code running on my 3.1 Tablet never show an ProgressBar when requested. 所有在ICS上工作都很好,但在我的3.1平板电脑上运行的相同代码在请求时从不显示ProgressBar。 Anyone can give me an hint why this happen ? 任何人都可以给我一个提示,为什么会这样?

I also have the problem in the Emulator running 2.2, no Progress ever shown. 我在运行2.2的模拟器中也遇到了问题,没有显示进度。 I looked again into FeatureToggles from the Sherlock Samples, same code, different result :/ 我再次查看Sherlock Samples中的FeatureToggles ,相同的代码,不同的结果:/

PS: Using 4.01 of ActionBar Sherlock PS:使用ActionBar Sherlock 4.01

Make sure you are using the com.actionbarsherlock.view.Window import instead of android.view.Window . 确保使用com.actionbarsherlock.view.Window导入而不是android.view.Window

If you miss this import change the progress method calls will only ever work on ICS and newer devices. 如果您错过了此导入更改,则进度方法调用将仅适用于ICS和更新的设备。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM