title: Show array of URI as GIF Android using AnimationDrawble
body: <p>So I basically have a List of URIs, each has a .jpeg file, and I want to show this list like a GIF file (not necessesary to make a gif, only to display).</p>
  
  <p>So after a research I found the AnimationDrawble object, converted each URI into Drawable and added it as a frame to AnimationDrawable.</p>
  
  <p>This is my code:</p>
  
  <pre><code>AnimationDrawable ad = new AnimationDrawable();
              Drawable[] dr = new Drawable[position+1];
              ProgressItem pi;
  
              try {
                  for (int i = 0; i &lt;= position; i++) {
                      pi = progress.get(i);
  
                      try {
                          dr[i] = drawableFromUrl(pi.getImage());
                      } catch (IOException ios) {
                          Toast.makeText(activity, ios.getMessage(), Toast.LENGTH_SHORT).show();
                      }
  
  
                  }
              }
              catch(Exception ex)
              {
                  Toast.makeText(activity, ex.getMessage(), Toast.LENGTH_SHORT).show();
              }
              Intent i = new Intent(activity,ProgressImage.class);
              DataWraper.setItems(dr);
  </code></pre>
  
  <p>drawableFromUrl:</p>
  
  <pre><code> public Drawable drawableFromUrl(String url) throws IOException {
      Bitmap x;
      HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection();
      MyDownloadTask mdt = new MyDownloadTask();
      try{
         mdt.execute(connection);
      }
      catch(Exception ex)
      {
          Toast.makeText(activity, ex.getMessage(), Toast.LENGTH_SHORT).show();
      }
      InputStream input = mdt.getInputStream();
  
      x = BitmapFactory.decodeStream(input);
      return new BitmapDrawable(x);
  }
  </code></pre>
  
  <p>The implementation part:</p>
  
  <pre><code> Glide.with(this)
                      .load(ad)
                      .into(progressImage);
  </code></pre>
  
  <p>When I'm trying to Glide the AnimationDrawble into the ImageView I get the following exception:</p>
  
  <pre><code>java.lang.IllegalArgumentException: Unknown type class android.graphics.drawable.AnimationDrawable. 
  </code></pre>
  
  <p>This made me hesistate the way I'm trying to pull this off. Should this be this complicated?</p>
  
  <p>If this is the right way, what am I doing wrong? maybe there's another way of doing so? I'd love to get some details. Thanks in advance!</p>