I currently use code like this that works at refitting the bitmaps for different screen sizes:
A.back = GPATools.ResizeTransparentBitmap(A.back, 150, 37,
Bitmap.FILTER_LANCZOS, Bitmap.SCALE_TO_FIT);
However, every time I load the app, it takes the time to resize it again, so I've been told to use this code for that:
class PersistableBitmap implements Persistable {
int width;
int height;
int[] argbData;
public PersistableBitmap(Bitmap image){
width = image.getWidth();
height = image.getHeight();
argbData =new int[width * height];
image.getARGB(argbData,0, width,0,0, width, height);
}
public Bitmap getBitmapImage(){
Bitmap image =new Bitmap(width, height);
image.setARGB(argbData,0, width,0,0, width, height);
return image;
}
My problem is, I have no idea how to implement the two together! Please help guys/gals, thanks a lot!