以前有人问过这个问题,但恐怕答案可能已经过时了。 我如何使用原生图库应用程序(比如 API 14 on)来实现像 WhatsApp 一样的多图像选择?
最佳答案
你的意思是:
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);
注意:EXTRA_ALLOW_MULTIPLE 选项仅在 Android API 18 及更高版本中可用。
关于Android 画廊选择像 Whatsapp,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25698815/