简体   繁体   中英

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:

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

The 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. Anyone can give me an hint why this happen ?

I also have the problem in the Emulator running 2.2, no Progress ever shown. I looked again into FeatureToggles from the Sherlock Samples, same code, different result :/

PS: Using 4.01 of ActionBar Sherlock

Make sure you are using the com.actionbarsherlock.view.Window import instead of android.view.Window .

If you miss this import change the progress method calls will only ever work on ICS and newer devices.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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