vaibhav3011/filemanager — pull request #1 by vaibhav3011 (2012-12-06 12:32:30+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 dr;
}