I populate my AutoCompleteTextView with data received from the web server. It takes 3-5 seconds. If it is not indicated that no one is waiting for its autocomplete. Therefore, I want to show such an indicator:

I tried this:
private class getAutoCompletes extends AsyncTask<String, Void, String> { private String response; @Override protected String doInBackground(String... params) {
R.drawable.rotating_drawable
<animation-list xmlns:android="http://schemas.android.com/apk/res/android" > <item android:drawable="@drawable/spinner1" android:duration="50"/> <item android:drawable="@drawable/spinner2" android:duration="50"/> <item android:drawable="@drawable/spinner3" android:duration="50"/> <item android:drawable="@drawable/spinner4" android:duration="50"/> </animation-list>
But that did not work. Proper extension is stationary.
Also the above view of the image of the layout having the ImageView , AutoCompleteTextView , ProgressBar and go Button search all on the background without borders ? So, the ProgressBar looks like inside an AutoCompleteTextView .
Thanks.
source share