例如,我想点击图片进行放大,可缩放。找到一个现成的库:
https://github.com/stfalcon-studio/StfalconImageViewer/
settings.gradle
maven { url "https://jitpack.io" }
build.gradle
implementation 'com.github.stfalcon-studio:StfalconImageViewer:v1.0.1'
click listener
imageView.setOnClickListener {
val images = listOf(url)
StfalconImageViewer.Builder(this, images) { view, image ->
Picasso.get().load(image).into(view)
}.show()
}
微信关注我哦 👍
我是来自山东烟台的一名开发者,有感兴趣的话题,或者软件开发需求,欢迎加微信 zhongwei 聊聊, 查看更多联系方式