We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
onSelectFilter
v3.11.2
override onSelectFilter function is not working, my plan is to create limit assets for image and video separately.
PictureSelector.create(activity) .openGallery(if (mediaType == "video") SelectMimeType.ofVideo() else if (mediaType == "image") SelectMimeType.ofImage() else SelectMimeType.ofAll()) .setImageEngine(imageEngine) .setSelectFilterListener(object : OnSelectFilterListener { override fun onSelectFilter(media: LocalMedia?): Boolean { Log.d("MultipleImagePicker", "media: ${media?.isChecked} ${media?.mimeType}") return false } }) .setMaxSelectNum(maxSelectedAssets) .setImageSpanCount(numberOfColumn) .setCropEngine(onSetCropEngine()) .isDirectReturnSingle(true) .isSelectZoomAnim(true) .isPageStrategy(true, 50) .isWithSelectVideoImage(true) .setRecordVideoMaxSecond(maxVideoDuration) .setMaxVideoSelectNum(if (maxVideo != 20) maxVideo else maxSelectedAssets) .isMaxSelectEnabledMask(true) .setSelectedData(selectedAssets) .setSelectorUIStyle(style) .isPreviewImage(isPreview) .isPreviewVideo(isPreview) .isDisplayCamera(isCamera) .setAttachViewLifecycle(customAttachViewLifecycle) .setInjectLayoutResourceListener(customLayoutResourceListener) .setSelectionMode(if (singleSelectedMode) SelectModeConfig.SINGLE else SelectModeConfig.MULTIPLE) .forResult(object : OnResultCallbackListener<LocalMedia?> { override fun onResult(result: ArrayList<LocalMedia?>?) { val localMedia: WritableArray = WritableNativeArray() if (result?.size == 0) { promise.resolve(localMedia) return } if (result?.size == selectedAssets.size && (result[result.size - 1] as LocalMedia).id == (selectedAssets[selectedAssets.size - 1].id)) { return } if (result != null) { for (i in 0 until result.size) { val item: LocalMedia = result[i] as LocalMedia val media: WritableMap = createAttachmentResponse(item) localMedia.pushMap(media) } } promise.resolve(localMedia) } override fun onCancel() { promise.reject("PICKER_CANCELLED", "User has canceled", null) } })
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Current use version?
当前使用的版本是多少?
Will this problem occur in demo?
Demo能否复现这问题?
override
onSelectFilter
function is not working, my plan is to create limit assets for image and video separately.Describe the problem or provide an error log?
描述问题或提供错误log?
The text was updated successfully, but these errors were encountered: