心愿单修改,

This commit is contained in:
18401019693 2023-04-07 16:07:08 +08:00
parent af164f549f
commit 63c2891650
2 changed files with 5 additions and 0 deletions

View File

@ -584,6 +584,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
private Runnable xydCompleteRunnable = new Runnable() { private Runnable xydCompleteRunnable = new Runnable() {
@Override @Override
public void run() { public void run() {
xydSvg.setVisibility(View.GONE);
if (xydCompleteModels.size() > 0) if (xydCompleteModels.size() > 0)
showXydComplete(xydCompleteModels.get(0)); showXydComplete(xydCompleteModels.get(0));
} }
@ -608,6 +609,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
} else { } else {
try { try {
xydSvg.setLoops(1); xydSvg.setLoops(1);
xydSvg.setVisibility(View.VISIBLE);
new SVGAParser(Contexts).parse(new URL(model.getSvg()), new SVGAParser.ParseCompletion() { new SVGAParser(Contexts).parse(new URL(model.getSvg()), new SVGAParser.ParseCompletion() {
@Override @Override
public void onComplete(SVGAVideoEntity videoItem) { public void onComplete(SVGAVideoEntity videoItem) {
@ -615,11 +617,13 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
xydSvg.setImageDrawable(drawable); xydSvg.setImageDrawable(drawable);
SVGAViewUtils.playEndClear(xydSvg); SVGAViewUtils.playEndClear(xydSvg);
} }
@Override @Override
public void onError() { public void onError() {
} }
}); });
} catch (MalformedURLException e) { } catch (MalformedURLException e) {
e.printStackTrace(); e.printStackTrace();

View File

@ -2358,6 +2358,7 @@
<com.opensource.svgaplayer.SVGAImageView <com.opensource.svgaplayer.SVGAImageView
android:id="@+id/xyd_svg" android:id="@+id/xyd_svg"
android:visibility="gone"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:scaleType="fitCenter" /> android:scaleType="fitCenter" />