-2

How do I open gallery images into image view in new activity android.

b1.setOnClickListener(new OnClickListener() {
    public void onClick(View v) {
        Intent i = new Intent(
        Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
        startActivityForResult(i, RESULT_LOAD_IMAGE);
    }
});
Jeff B
  • 8,572
  • 17
  • 61
  • 140
amanjain4all
  • 103
  • 1
  • 1
  • 5

1 Answers1

0

You need to implement onActivityResult

Check out this answer: https://stackoverflow.com/a/14978710/2065418 and set the Bitmap to your ImageView with yourImageView.setImageBitmap(yourBitmap);

Community
  • 1
  • 1
Damien R.
  • 3,383
  • 1
  • 21
  • 32