Skip to content
New issue

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

升级到最新版本遇到的问题 #23

Closed
wlwoon opened this issue Jun 28, 2023 · 5 comments
Closed

升级到最新版本遇到的问题 #23

wlwoon opened this issue Jun 28, 2023 · 5 comments

Comments

@wlwoon
Copy link

wlwoon commented Jun 28, 2023

最新版本的图片加载引擎怎么变必传的了
data class Matisse(
val maxSelectable: Int,
val mimeTypes: List,
val imageEngine: ImageEngine,
val captureStrategy: CaptureStrategy = NothingCaptureStrategy
) : Parcelable {

init {
    assert(value = maxSelectable >= 1)
    assert(value = mimeTypes.isNotEmpty())
}

}

@wlwoon
Copy link
Author

wlwoon commented Jun 28, 2023

我用的kotlin并非compose开发,这个ImageEngine没法传,有办法解决吗

@wlwoon
Copy link
Author

wlwoon commented Jun 28, 2023

另外能否添加一个打开相机的策略,打开拍照时是默认打开前置还是后置摄像头

@leavesCZY
Copy link
Owner

@wlwoon
1、因为考虑到引用方大概率已经集成了某个图片加载框架,因此 Matisse 通过 ImageEngine 接口将图片的加载逻辑交由引用方来实现,避免重复集成多个图片加载框架,这样你就可以自由选择要使用 Glide、Coil、还是其它图片框架了
2、你在项目中开启 compose 开关,然后导入一些必要的 compose 依赖,就可以实现 ImageEngine 了。这部分内容在 wiki 里都有详细介绍
3、后续我可以补充上

@leavesCZY
Copy link
Owner

@wlwoon 目前 1.0.0-beta04 版本应该可以满足你的需求了,CaptureStrategy 接口新增了一个 getCaptureExtra 方法,可用于为相机设置启动参数,在接入指南中有介绍到

@wlwoon
Copy link
Author

wlwoon commented Jun 30, 2023

感谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants