【发布时间】:2019-01-11 10:38:55
【问题描述】:
我已经在我的项目中实现了从图库中添加多个图像选择。但是,我想限制用户,以便他/她只能从图库中选择 3 张图片。
我已经实现了从图库中选择多个图像,如下所示:
`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);`
我怎样才能做到这一点?
谢谢。
【问题讨论】:
标签: java android android-gallery