Android 如何在kotlin中使用intent设置图像选择限制
我只想从库中选择5幅图像。这里我分享了我的代码。有人能帮忙吗Android 如何在kotlin中使用intent设置图像选择限制,android,kotlin,Android,Kotlin,我只想从库中选择5幅图像。这里我分享了我的代码。有人能帮忙吗 val intent = Intent(Intent.ACTION_GET_CONTENT) // var intent = Intent(Intent.CATEGORY_APP_GALLERY) intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true) intent.action = Intent.ACTION_GET_CONTENT intent.putExtra(Intent.CATE
val intent = Intent(Intent.ACTION_GET_CONTENT)
// var intent = Intent(Intent.CATEGORY_APP_GALLERY)
intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true)
intent.action = Intent.ACTION_GET_CONTENT
intent.putExtra(Intent.CATEGORY_APP_GALLERY,true)
intent.addCategory(Intent.CATEGORY_OPENABLE)
intent.type = "image/*"
startActivityForResult(Intent.createChooser(intent, "Select Picture"), PICK_IMAGE_MULTIPLE)
好问题好问题。。