title: Android: Gif doesn't fill screen
body: <p>I have a gif that draws on a <code>Canvas</code> object using the <code>Movie</code> object. The gif has a resolution of 1920x1080 pixels however only fills about a quarter of the screen. How do I get it to expand to the screen, and why doesn't it already do this given that the size of the gif is 1920x1080?</p>
  
  <p>Here is the code where I draw the gif and initialize the <code>Movie</code> object.</p>
  
  <pre><code>public SplashEnvironment(Context context, Activity act) {
      super(context);
      getHolder().addCallback(this);
      this.act = act;
  
      InputStream is = context.getResources().openRawResource(+ R.drawable.resized);
      mMovie = Movie.decodeStream(is);
      System.out.println(mMovie.width() + "x" + mMovie.height());
      System.out.println(getWidth() + "x" + getHeight());
  }
  
  public void draw(Canvas canvas) {
      if(canvas != null) {
          super.draw(canvas);
          Paint p = new Paint();
          p.setAntiAlias(true);
  
          long now = android.os.SystemClock.uptimeMillis();
          if(mMovieStart == 0)
              mMovieStart = now;
          if(mMovie != null) {
              int dur = mMovie.duration();
              if(dur == 0)
                  dur = 3000;
              int relTime = (int)((now - mMovieStart) % dur);
              mMovie.setTime(relTime);
              mMovie.draw(canvas, 0, 0);
              act.runOnUiThread(new Runnable() {
                  public void run() {
                      invalidate();
                  }
              });
          }
      }
  }
  </code></pre>
  
  <p>Then I have another question albeit less important. When I view the gif in windows, it is a much faster and smoother speed but when it draws on the phone it is much slower and choppier. Why is that and can it be fixed?</p>