title: Skipped frames! The application may be doing too much work on its main thread
body: <p>The issue is causing the app to screen freeze a bit.</p>
  
  <p>I am using loaders to populate the listView which contains imageView and textView.</p>
  
  <p>When the loaders parse the JSON and extract the image URL to object aswell as the title, populating the listView begins.</p>
  
  <p>I did a little of searching inside the code what might cause the problems of skipping frames and i figured out when i populate pictures to listView the lagg comes.</p>
  
  <p>So i'll be posting the code which I use to present pictures to app and if someone can tell me if it can be better and why actually my code is bad?</p>
  
  <pre><code>   ImageView album = (ImageView) listItemView.findViewById(R.id.albumID);
     StrictMode.ThreadPolicy policy = new 
     StrictMode.ThreadPolicy.Builder().permitAll().build();
     StrictMode.setThreadPolicy(policy);
  
     try {
  
         Bitmap bitmap = BitmapFactory.decodeStream((InputStream) new URL(currentSong.getImage_url()).getContent());
  
  
         album.setImageBitmap(bitmap);
  
     } catch (MalformedURLException e) {
         e.printStackTrace();
     } catch (IOException e) {
         e.printStackTrace();
     }
  </code></pre>