Code example for Matrix

Methods: createBitmap, postScale, postTranslate, setRotate

0
    private Drawable[] mThumbs;
    private TransitionDrawable mThumbTransition;
    private boolean mShouldAnimateThumb;
    private final Resources mResources;
 
    // The "frame" is a drawable we want to put on top of the thumbnail. 
    public ThumbnailController(Resources resources,
            ImageView button, ContentResolver contentResolver) {
        mResources = resources;
        mButton = button;
        mContentResolver = contentResolver;
    } 
 
    public void setData(Uri uri, Bitmap original) {
        // Make sure uri and original are consistently both null or both 
        // non-null. 
        if (uri == null || original == null) {
            uri = null;
            original = null;
        } 
        mUri = uri;
        updateThumb(original);
    } 
 
    public void setUri(Uri uri) {
    	mUri = uri;
    }