openintents/filemanager — pull request #18 by vaibhav3011 (2012-12-07 10:17:38+00:00)
Title: changes in OI filemanager

package org.openintents.filemanager.util;
In ImageUtils.java

Update ResizeDrawable to

public static Drawable resizeDrawable(Drawable drawable, int desireWidth,
int desireHeight) {
Drawable dr = null;
int width = drawable.getIntrinsicWidth();
int height = drawable.getIntrinsicHeight();

if (width > 0 && height > 0
&& (desireWidth < width || desireHeight < height)) {

- drawable = new BitmapDrawable(resizeBitmap( ((BitmapDrawable)
- drawable).getBitmap(), desireWidth, desireHeight));

+ Bitmap b = ((BitmapDrawable) drawable).getBitmap();
+ Bitmap resized = Bitmap.createScaledBitmap(b, desireWidth,
+ desireHeight, true);
+ dr = new BitmapDrawable(resized);

}
- return drawable;
+ return dr;
}