There are different ways you can do this. There are many different waitFor methods in Robotium that you can use. In your case, you can use:
solo.waitForDialogToClose() //waits for the dialog to close solo.waitForActivity() // if there is a activity change solo.waitForText() //if a certain text appears after the loading is done solo.waitForView() //if a certain view is shown after the load screen is done.
Please see Robotium API documentation for more highly anticipated methods in Robotium.
Renas source share