When trying to connect to a server, my app does not have a very appealing interface. I don’t want to display progress because it doesn’t really make sense to me but I want to show the user the app has not frozen. Using other apps I have seen the interface say ‘connecting’ and a spinning wheel to show it is working. How do I show the user that the app is working on establishing the connection and has not frozen?
Share
I think what you’re after is a progress dialog with indeterminate progress. This can be achieved with a single line of code:
and, when you’re done,
This will show a dialog like this over your activity. Remember, that you should do the time-consuming communication asynchronously, otherwise your app will look frozen. If you do the communication on the main UI thread, the dialog will not be shown.