title: Show ProgressDialog while other activity is loading
body: <p>This question has been asked before, but the answers I've found weren't useful in my case.</p>
  
  <p>When the user presses a button in Activity 1, Activity 2 is opened. Activity 2 has to load some data that has been stored in the SharedPreferences. Activity 2 has to do quite a lot in the onCreate(), so that's why it takes a little while to open it (especially on slower devices). Unlike the other cases I've seen, the Activity doesn't have to download data from the internet, so using an AsyncTask isn't an option for me, because the reason why it takes long to open the Activity isn't internet, but the reason is that is has to load 5 listviews and it has to do a lot of calculations to process the data properly.</p>
  
  <p>So how do you display a ProgressDialog in this case, while Activity 2 is loading?</p>