Code example for Movie

Methods: draw, duration, height, setTime, width

0
        long now = android.os.SystemClock.uptimeMillis();
        if (mMovieStart == 0) {   // first time
            mMovieStart = now;
        } 
        if (mMovie != null) {
            int dur = mMovie.duration();
            if (dur == 0) {
                dur = 1000;
            } 
            int relTime = (int)((now - mMovieStart) % dur);
            mMovie.setTime(relTime);
//            canvas.scale( mMovie.width()/getWidth(),  mMovie.height()/getHeight()); 
            mMovie.draw(canvas, getWidth() - mMovie.width(),
                        getHeight() - mMovie.height());
//            canvas.scale(getWidth() / mMovie.width(), getHeight() / mMovie.height()); 
            invalidate();
        } 
    } 
}