I\'m doing a search and populating a listview with results as they come. On top there\'s a bar with the text \"Search in progress... \" I\'d like to add a small spinning whe
You need to call requestWindowFeature
in onCreate
before setContentView
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setContentView(R.layout.search_screen);
And Assuming you're using AsyncTask
for Populating the list
onPreExecute()
will call setProgressBarIndeterminateVisibility(true);
onPostExecute()
will call setProgressBarIndeterminateVisibility(false);