How to limit multiple image selection from gallery in android?

I have implemented adding multiple image selection from the gallery in my project. However, I want to limit the user so he/she can select only 3 images from the gallery.

I have implemented selecting multiple images from the gallery like this:

`Intent intent = new Intent();

intent.setType("image/*");

intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);

intent.setAction(Intent.ACTION_GET_CONTENT);

startActivityForResult(Intent.createChooser(intent, "Select Picture"), 1);`

How can I achieve this?

Thanks....

Read More »

By: StackOverFlow - 6 days ago

Related Posts