title: can't show the thumbnail from youtube?
body: <p>this app should show thumbnail , title, and the duration of each video in the playlist selected , but   thumbnail remain white
  the application works but It don't show the thumbnail of the video in the playlist</p>
  
  <p>how can I do ? you have any solution?</p>
  
  <p>THIS IS MY CODE</p>
  
  <pre><code>public class MainActivity extends Activity {
  
  ImageView mainThumb;
  TextView mainTitle;
  TextView mainTime;
  LinearLayout videos;
  ArrayList&lt;String&gt; links;
  
  /** Called when the activity is first created. */
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      this.requestWindowFeature(Window.FEATURE_NO_TITLE);
      setContentView(R.layout.videos);
  
      new ParseVideoDataTask().execute();
      mainThumb = (ImageView) findViewById(R.id.mainThumb);
      mainTitle = (TextView) findViewById(R.id.mainTitle);
      mainTime = (TextView) findViewById(R.id.mainTime);
      videos = (LinearLayout) findViewById(R.id.videos);
  
  }
  
  private class ParseVideoDataTask extends AsyncTask&lt;String, String, String&gt; {
      int count = 0;
  
      @Override
      protected String doInBackground(String... params) {
          URL jsonURL;
          URLConnection jc;
          links = new ArrayList&lt;String&gt;();
          try {
              jsonURL = new URL("http://gdata.youtube.com/feeds/api/playlists/" +
                      "PL-7t9DoIELCRF7F7bZvvBwO1yvHRFsJiu" +  
                  "?v=2&amp;alt=jsonc");
              //PL_VGbflD64WSR1MBcpWlNwsY0lRNVuJ3r
               jc = jsonURL.openConnection(); 
               InputStream is = jc.getInputStream(); 
              String jsonTxt = IOUtils.toString(is);
               JSONObject jj = new JSONObject(jsonTxt); 
               JSONObject jdata = jj.getJSONObject("data"); 
               JSONArray aitems = jdata.getJSONArray("items"); 
               for (int i=0;i&lt;aitems.length();i++) {
                   JSONObject item = aitems.getJSONObject(i); 
                   JSONObject video = item.getJSONObject("video"); 
                   String title = video.getString("title");
                   JSONObject player = video.getJSONObject("player");
                   String link = player.getString("default");
                   String length = video.getString("duration");
                   JSONObject thumbnail = video.getJSONObject("thumbnail"); 
                   String thumbnailUrl = thumbnail.getString("hqDefault");
                   String[] deets = new String[4];
                   deets[0] = title;
                   deets[1] = thumbnailUrl;
                   deets[2] = length;
                   links.add(link);
                   publishProgress(deets);
               }
          } catch (MalformedURLException e) {
              e.printStackTrace();
          } catch (IOException e) {
              e.printStackTrace();
          } catch (JSONException e) {
              e.printStackTrace();
          }       
          return null;
      }       
  
      @Override
      protected void onProgressUpdate(final String... deets) {
          count++;
          if (count == 1) {
              MainActivity.setImageFromUrl(deets[1], mainThumb, MainActivity.this);
              mainTitle.setText(deets[0]);
              mainTime.setText(formatLength(deets[2]));
              mainThumb.setOnClickListener(new OnClickListener() {
                  @Override
                  public void onClick(View v) {
                      Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(links.get(1)));
                      startActivity(i);
                  }
              });
          } else {
              LayoutInflater layoutInflater = (LayoutInflater)MainActivity.this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
              View video = layoutInflater.inflate(R.layout.video, null);
              ImageView thumb = (ImageView) video.findViewById(R.id.thumb);
              TextView title = (TextView) video.findViewById(R.id.title);
              TextView time = (TextView) video.findViewById(R.id.time);
              MainActivity.setImageFromUrl(deets[1], thumb, MainActivity.this);
              title.setText(deets[0]);
              time.setText(formatLength(deets[2]));
              video.setPadding(20, 20, 20, 20);
              videos.addView(video);
              video.setId(count-1);
              video.setOnClickListener(new OnClickListener() {
                  @Override
                  public void onClick(View v) {
                      Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(links.get(v.getId())));
                      startActivity(i);
                  }
              });
          }
      }
  }
  
  private CharSequence formatLength(String secs) {
      int secsIn = Integer.parseInt(secs);
      int hours = secsIn / 3600,
              remainder = secsIn % 3600,
              minutes = remainder / 60,
              seconds = remainder % 60;
  
              return ((minutes &lt; 10 ? "0" : "") + minutes
              + ":" + (seconds&lt; 10 ? "0" : "") + seconds );
  }
  
  
  
  public static void setImageFromUrl(String string, ImageView mainThumb2,
          MainActivity mainActivity) {
  
  }
  
  
  
  @Override
  public void onDestroy() {
      super.onDestroy();
      for (int i=0;i&lt;videos.getChildCount();i++) {
          View v = videos.getChildAt(i);
          if (v instanceof ImageView) {
              ImageView iv = (ImageView) v;           
              ((BitmapDrawable)iv.getDrawable()).getBitmap().recycle();   
          }
      }
  }
  </code></pre>
  
  <p>}</p>