Code for take your picture from gallery in Android.

Total Post:14

Points:98
 449  View(s)
Ratings:
Rate this:
How to take your picture from the gallery and add in your android project.
  1. Post:14

    Points:98
    Re: Code for take your picture from gallery in Android.

     /* Create object of ImageView */

    ImageView editImage = (ImageView) findViewById(R.id.edit_image);

    /* Take your picture from gallery */

            editImage.setOnClickListener(new View.OnClickListener() {

                @Override

                public void onClick(View view) {

                    Intent gallery = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI);

                    startActivityForResult(gallery, PICK_IMAGE);

                }

            });

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!