SpringX:Android动画库
SpringX是一个用于Android的库,为开发者使用SpringAnimation提供了便捷途径。
安装方法:
1. 在根目录的build.gradle文件中添加jcenter仓库:
repositories {
jcenter()
}
- 在模块的build.gradle文件中添加依赖项:
dependencies {
implementation 'com.github.lcdsmao:springx:0.0.2'
}
用法:
您可以手动创建ViewPropertySpringAnimator,或使用扩展功能:
val spring = ViewPropertySpringAnimator(view) // 总会新建一个
// 或
val spring = view.spring() // 重用与view关联的spring
2.51MB
文件大小:
评论区