麦位光圈svga 循环模式修改

This commit is contained in:
huangjian
2022-04-01 14:54:05 +08:00
parent 60cd378471
commit ae1025fd16

View File

@@ -312,7 +312,6 @@ public class MicroView extends FrameLayout implements View.OnLayoutChangeListene
} else { } else {
if (speakState.isAnimating()) continue; if (speakState.isAnimating()) continue;
try { try {
speakState.setLoops(-1);
speakState.setFillMode(SVGAImageView.FillMode.Clear); speakState.setFillMode(SVGAImageView.FillMode.Clear);
SVGAParser.ParseCompletion parseCompletion = new SVGAParser.ParseCompletion() { SVGAParser.ParseCompletion parseCompletion = new SVGAParser.ParseCompletion() {
@Override @Override
@@ -328,8 +327,10 @@ public class MicroView extends FrameLayout implements View.OnLayoutChangeListene
} }
}; };
if (isSingleAnchor) { if (isSingleAnchor) {
speakState.setLoops(-1);
SVGAParser.Companion.shareParser().decodeFromAssets("svga/single_headware.svga", parseCompletion, null); SVGAParser.Companion.shareParser().decodeFromAssets("svga/single_headware.svga", parseCompletion, null);
} else { } else {
speakState.setLoops(1);
SVGAParser.Companion.shareParser().decodeFromURL(new URL(micCircle), parseCompletion, null); SVGAParser.Companion.shareParser().decodeFromURL(new URL(micCircle), parseCompletion, null);
} }
} catch (MalformedURLException e) { } catch (MalformedURLException e) {