How to use indeterminate progress bar in appcompat-v7 r21 library?

Using the new r21 appcompat library, I wanted to show an indeterminate (spinning) progress bar in the Toolbar.

Previously, using the < r21 appcompat library, it worked, but it seems that there is no implementation of the progress bar in r21. Am I right? Is there a way for this without creating a custom progress bar?

My onCreate method starts with:

    supportRequestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
    super.onCreate(savedInstanceState);
    setSupportProgressBarIndeterminate(true);
    setSupportProgressBarIndeterminateVisibility(true);

Upvotes: 6

Views: 2127

Answers (1)

Diolor
Diolor

Reputation: 13450

In short: no, you have to create a custom progress bar in your Toolbar. Progress is not supported in action bars for 21+

Upvotes: 1

Related Questions