Search code examples
androidandroid-actionbarsearchview

ProgressBar in ActionBar


When trying to show the ProgressBar in the ActionBar it doesn't work. This is what I've done. Is there something else I need to do that people aren't mentioning because it's so simple? Is there something I need to do with my ActionBar?

In the activity:

super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setContentView(R.layout.activity_movie_grid);

As far as I know, that alone should display the ProgressBar. Then to toggle it I can run one of these commands from the fragment:

getActivity().setProgressBarIndeterminate(true);
getActivity().setProgressBarIndeterminate(false);

I've looked at other posts but there's nothing else mentioned. I'm not using the support version.

The only other things in the ActionBar are an up arrow, title, and searchView; there's plenty of space.

I'm assuming I don't need to create an ActionBar in XML or pragmatically and that this one command is all that's required. Is there anything else I'm supposed to do? Any other info you want me to provide?


Solution

  • This feature is not supported anymore. If you closely observe the logs you will notice that it is not supported "Progress display unsupported". You can search for more details on the internet posted by Chris Banes a DPE at Google.