I can load images that came with the phone in the gallery. But when I try loading an image from the camera album(which is inside the same gallery), it doesn't show up.
But what's really weird is that it takes up space as if the image was successfully loaded. So it takes up space, but it's invisible. (Confirmed this by giving the ImageButton appears/visible.)
Code:
Intent galleryImagePick = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
galleryImagePick.setType("image/*");
startActivityForResult(galleryImagePick, GALLERY_IMAGE_ONE);
Inside switch case ResultCode:
case GALLERY_IMAGE_ONE:
if (resultCode == RESULT_OK)
{
Uri selectedImageOne = data.getData();
imageViewOne.setImageURI(selectedImageOne);
imageButtonOne.setVisibility(View.VISIBLE);
}
break;
Uri imageUri = data.getData();
Bitmap bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), imageUri);
imageViewOne.setImageBitmap(bitmap);