我最近更新了我的应用程序,可以在几乎所有的手机上运行。我通过让第一个屏幕检测屏幕大小,然后更改所有图像(有很多图像)来做到这一点。因此,在非基础型号的手机上启动大约15秒,看起来手机冻结了,但它只是改变了图像。每次我打开应用程序时,它都会这样做。我能做些什么来解决这个问题呢?
发布于 2012-03-04 12:17:32
编辑过的
关于如何使用持久化存储的一些链接:
用于使Bitmap对象可持久化的示例代码片段:
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;
}
}https://stackoverflow.com/questions/9552029
复制相似问题