Loading Indicator
In this lesson, we will look at how to add a loading indicator when blog data is loading.
Loading data from the network can take time, especially with a weak internet connection. Currently, while data is loading, the user sees a blank screen, which may be confusing. That’s why we need to introduce some kind of loading indicator.
We can show a simple ProgressBar
, similar to what we did on the login screen, in the middle of the screen while data is loading.
Let’s start by declaring ProgressBar
in the activity_blog_details
file and constrain it to the middle of the screen. Leave the ProgressBar
visible by default.
Create a free account to view this lesson.
Continue your learning journey with a 14-day free trial.
By signing up, you agree to Educative's Terms of Service and Privacy Policy