Code example for Movie

Methods: drawdurationheightsetTimewidth

0
        if (mMovie == null)
        	return; 
         
        canvas.translate(getWidth() / 2, getHeight() / 2);
       	float s;
       	s = (float)getWidth() / (float)mMovie.width();
       	if ((float)getHeight() / (float)mMovie.height() < s)
           	s =  (float)getHeight() / (float)mMovie.height();
       	if (s < 1.0f)
       		canvas.scale(s, s);
         
        final long now = SystemClock.uptimeMillis();
 
        if (mMoviestart == 0) { 
            mMoviestart = now;
        } 
 
        int relTime = 0;
        if (mMovie.duration() > 0) 
        	relTime = (int)((now - mMoviestart) % mMovie.duration());
         
        mMovie.setTime(relTime);
        mMovie.draw(canvas, -mMovie.width() / 2, -mMovie.height() / 2);
         
        /* limit animations to 20fps */ 
        this.postInvalidateDelayed(1000 / 20);
    } 
} 
Connect your IDE to all the code out there  Get Codota for Java