英文:
How to implement a tap-to-zoom animation in Jetpack Compose?
问题
当我第一次点击图像时,我想要增加它的缩放,当我再次点击它时,我希望它恢复到原始缩放比例。
我想要的效果与此相同,我在Android网站上找到了它,但我希望在Jetpack Compose中实现:
https://developer.android.com/develop/ui/views/animations/zoom
谢谢帮助。
英文:
When I click on an image for the first time I want to increase its scale and when I click on it again I want it to return to its original scale.
What I want is exactly like this, I found it on the Android website but I want it in Jetpack Compose:
https://developer.android.com/develop/ui/views/animations/zoom
Thanks for help
答案1
得分: 1
你可以使用这个库来实现类似以下功能:
使用这个库,你可以声明具有相同键的元素,并在两个屏幕中使用它们,然后元素会以缩放动画显示。
希望对你有帮助。
英文:
you can use this library for do something like that :
Shared Elements Transition for Jetpack Compose
with this library you can declare element with same key and use in two screen then elements show with zoom animation
hope helps you
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论