title: Android ProgressBar skipping frames
body: <p>I'm loading twenty items (WebViews) into a LinearLayout and while they are loading I'm showing a ProgressBar that hides that LinearLayout to provide feedback to the user that I'm doing work.</p>
  
  <p>The problem is that the progress wheel freezes and I get warning in LogCat from Choreographer saying "Skipped  frames!  The application may be doing too much work on its main thread."</p>
  
  <p>To avoid this problem I actually tried to change from using a LinearLayout with all 20 items and using a ListView with an Adapter. I ran into WebView recycling problems, so I eliminated the recycling and actually used an array of 20 items and every time the ListView needs to load an item, it loads from that array if it was already inflated before.</p>
  
  <p>Then I got into the problem that I can't scroll to a specified item because the ListView only loads the WebViews when necessary so it can't calculate the amount of scrolling that needs to be done since the heights of the WebViews vary.</p>
  
  <p>Conclusion, I had to get back to my LinearLayout implementation adding all the WebViews to it.</p>
  
  <p>Is there a solution to this problem?
  If there isn't, I'm thinking about only showing a "Loading..." TextView instead of an animated ProgressBar.</p>
  
  <p>By the way, before someone asks, I'm using a Nexus 4 to test the app and not the emulator and I'm not doing database accesses in the UI thread.</p>
  
  <p>Thanks in advance.</p>