Skip to main content
3 of 3
edited tags
JohnGB
  • 68.6k
  • 26
  • 185
  • 297

For mobile apps, is it "best" to load data before transitioning screens?

In a mobile application you almost always make some sort of api call to fetch data to populate view elements on a screen. Say I am on a home screen (screen A) and want to transition to a profile screen (screen B). Should I load the data for screen B on screen A (fetch data for B on button tap on screen A... loading dialog would be displayed)? Or should I transition to B, show a loading dialog, populate data, and dismiss loading dialog.

I've always done the latter, but my only reasoning for doing so is to keep screens and data modular (disclaimer: only Android experience here). This saves me from the headache of passing the fetched data to the screen that's actually using it or saving it in a globally accessible class.

Thoughts?

loeschg
  • 173
  • 2
  • 8