I've created an android app, which chooses a picture from Gallery and displays a preview.
@Override
public void onClick(View v) {
if (v.getId()== R.id.button){
Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_PICK);
startActivityForResult(Intent.createChooser(intent,
"Select Picture"), SELECT_PICTURE);
}
After the image is selected, the preview should be shown.
Yet, it works only for the first time. And later when I click back, it shows outOfMemoryException