从我原来的question后续。ImageView Android内存
有没有办法在android应用程序中使用ImageViews而不使用大量RAM?
在原来的question我发现我的应用程序使用了大量的RAM,并且发现它是我用过的所有RAM的ImageViews。
以获取图像我用
public void addPictureOnClick(View view){
Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(Intent.createChooser(intent, "Select Picture"),1);
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode == RESULT_OK) {
if (requestCode == 1) {
// currImageURI is the global variable I'm using to hold the content:// URI of the image
Uri currImageURI = data.getData();
image.setImageURI(currImageURI);
}
我想知道是否有另一种方式来显示图片,而不是URI?
有多大你加载图像,有多少,以及什么是内存使用,当你使用它们相比,当你不? – DMags 2011-03-17 14:59:08
@DMags:我不知道大小。这是用手机拍摄的照片。 RAM的使用量是4Mb,没有一张图片,24Mb的图片是 – Bastaix 2011-03-17 15:05:47