public void setImageResource(int imageResource, int imageWidth, int imageHeight) {
        bitmap = extractBitmapFromDrawable(getResources().getDrawable(imageResource));
        bitmapSrcRect = bitmapRect(bitmap);

        this.imageWidth = imageWidth;
        this.imageHeight = imageHeight;

        rebuildFitter();
    }
public void setImageResource ( int imageResource , int imageWidth , int imageHeight ) { bitmap = extractBitmapFromDrawable ( getResources ( ) . getDrawable ( imageResource ) ) ; bitmapSrcRect = bitmapRect ( bitmap ) ; this . imageWidth = imageWidth ; this . imageHeight = imageHeight ; rebuildFitter ( ) ; }
Changes the background image and its layout dimensions.