更新SVGA库:新增获取动画持续时间方法
This commit is contained in:
@@ -66,16 +66,6 @@ public class SVGAViewUtils {
|
||||
* 获取svga动画播放时间
|
||||
*/
|
||||
public static long getPlayTimer(SVGAImageView svga){
|
||||
try {
|
||||
Field mAnimator = svga.getClass().getDeclaredField("mAnimator");
|
||||
mAnimator.setAccessible(true);
|
||||
ValueAnimator animator = (ValueAnimator) mAnimator.get(svga);
|
||||
if(animator!=null) {
|
||||
return animator.getDuration();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return 0;
|
||||
return svga.getPlayDuration();
|
||||
}
|
||||
}
|
||||
|
||||
BIN
libs/svgaplayer-release-v1.2.1.aar
Normal file
BIN
libs/svgaplayer-release-v1.2.1.aar
Normal file
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'com.android.library'
|
||||
@@ -66,7 +66,7 @@ dependencies {
|
||||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
compileOnly files('../libs/beautysdk-202202241203.aar')
|
||||
compileOnly files('../libs/svgaplayer-release-v1.2.aar')
|
||||
compileOnly files('../libs/svgaplayer-release-v1.2.1.aar')
|
||||
//直播
|
||||
api project(':live')
|
||||
//短视频
|
||||
|
||||
Reference in New Issue
Block a user