David
David

Reputation: 414

Alternative to ProgressDialog for loading data?

I have an App with retrofit and I make some calls to an Api (like a LogIn in this case), some of them take a few seconds to load, so I want to know when I should make a loading screen and lock the interaction with the user. I see that ProgressDialog is deprecated now, and they don't display it but they lock the interaction with the view. What should be better?

Upvotes: 0

Views: 225

Answers (1)

Sumit Shukla
Sumit Shukla

Reputation: 4504

  • First of all it is not ProgressBar but it is ProgressDialog because it locks down user interaction until it hides.
  • You can use a progress indicator like ProgressBar, which can be embedded in your app's UI. Alternatively, you can use a notification to inform the user of the task's progress.Here

  • A skeleton screen helps load a user interface gradually, a little at a time. This means that the barebones UI displays first. Then the loaded content is gradually populated on-screen.

  • Shimmer effect was created by Facebook to indicate a loading status, so instead of using ProgressBar or usual loader use Shimmer for a better design and user interface.

Upvotes: 3

Related Questions