Closed ahmadplero closed 8 years ago
Yes it is possible to do so. In the ImageSelectActivity class, in the toggleSelection(int position) make the following changes:
private void toggleSelection(int position) {
if (!images.get(position).isSelected && countSelected == Constants.limit) {
Toast.makeText(getApplicationContext(), String.format(getString(R.string.limit_exceeded), Constants.limit), Toast.LENGTH_LONG).show();
return;
}
images.get(position).isSelected = !images.get(position).isSelected;
if (images.get(position).isSelected) {
countSelected++;
} else {
countSelected--;
}
customImageSelectAdapter.notifyDataSetChanged();
}
I'll add this soon. Thanks for this feature suggestion.
Hi darsh,
For now, we have an option to set a limit for user image selection. In this case, user can select no of images more than limit but toast show to user to unselect images that are more than limit but I want to make user unable to select images more than limit. Is it possible?
thanks..