Code example for Movie

Methods: height, width

0
        mContext = context;
        Resources res = mContext.getResources();
        mMovie = Movie.decodeStream(res.openRawResource(resourceId));
        if ( mMovie != null )
        { 
            mRect = new Rect(0, 0, mMovie.width(), mMovie.height());
            mBitmap = Bitmap.createBitmap(getIntrinsicWidth(), getIntrinsicHeight(), Config.ARGB_8888);
            mCanvas = new Canvas(mBitmap);
        } 
        else 
        { 
            mRect = new Rect(0, 0, 0, 0);
        } 
    } 
 
    public void start() 
    { 
        if ( mMovie != null && mMovie.duration() > 0 )
        { 
            mRunning = true;
            mLastUpdate = SystemClock.uptimeMillis();