I have two Spinners in Android. A user selects from the first one and then the second Spinner's adapter is populated depending on the selection in the first. The data has to come from a REST server (which is not very fast) and thus the second Spinner takes a long time to load.
What is the best approach for this from a UI point of view? I could do several things, e.g.: show a loading circle where the Spinner is, or disable the second Spinner until the new data is loaded.
These don't seem very optimal solutions and I'd be interested to know if there is a better way to do it.
Note that caching all possible values for all possible selections of the first Spinner before the page is displayed is not really an option as this would require multiple calls to the server and it takes several seconds per call. I have no control over the server or the endpoints provided.
I would recommend skeleton style loading. Only show real controls that are ready to use. So if the first spinner forces an API call. I would use a "cancelable coroutine job" this way it's able to be canceled if they select again.
Then create a skeleton flashing of the second dropdown animating until it's ready. Busy Indicator circles are played out and people hate seeing them.
However, if you are sure you want to do busy indicators circles then I would personally overlay a small busy indicator over the spinner control and make the spinner control not focusable until it is ready.
Also if you implement a repository and MVVM pattern you can hand back cached data while you fetch the updated data if that fits your model.
https://uxdesign.cc/what-you-should-know-about-skeleton-screens-a820c45a571a