I\'m using a SearchView in my Activity. As the user types, I am performing search requests to a server. I want to indicate that some activity is happening. Is it possible to
I know that it is not within the SearchView, but this is by far the simplest method to provide progress indication in the ActionBar found here http://blog.denevell.org/android-progress-spinner.html:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setContentView(R.layout.activity_main);
// Turn it on
setProgressBarIndeterminateVisibility(true);
// And when you want to turn it off
setProgressBarIndeterminateVisibility(false);
}
If you really want the progress to appear inside the SearchView, I would assume that you could use a FrameLayout instead of LinearLayout (or atleast as a parent), putting the progress in bottom of the XML (which will place it on top of the SearchView).