From 112125bd69a65a7bf9242b07ef5fb185fb806fa6 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Wed, 24 Aug 2022 14:27:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=9D=90=E9=AA=91=E7=89=B9=E6=95=88=E7=9A=84=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presenter/LiveEnterRoomAnimPresenter.java | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/live/src/main/java/com/yunbao/live/presenter/LiveEnterRoomAnimPresenter.java b/live/src/main/java/com/yunbao/live/presenter/LiveEnterRoomAnimPresenter.java index 4442d32ba..71090e1d6 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveEnterRoomAnimPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveEnterRoomAnimPresenter.java @@ -24,6 +24,7 @@ import android.widget.MediaController; import android.widget.RelativeLayout; import android.widget.TextView; +import com.opensource.svgaplayer.SVGACallback; import com.opensource.svgaplayer.SVGAImageView; import com.opensource.svgaplayer.SVGAParser; import com.opensource.svgaplayer.SVGAVideoEntity; @@ -313,10 +314,35 @@ public class LiveEnterRoomAnimPresenter { } } else { if (mSVGImageView != null) { + mSVGImageView.setVisibility(View.VISIBLE); SVGARect rect = svgaVideoEntity.getVideoSize(); mSVGImageView.setVideoItem(svgaVideoEntity); mSVGImageView.setLoops(1); mSVGImageView.startAnimation(); + mSVGImageView.setCallback(new SVGACallback() { + @Override + public void onPause() { + + } + + @Override + public void onFinished() { + mSVGImageView.clear(); + mSVGImageView.setVisibility(View.GONE); + mIsAnimating = false; + + } + + @Override + public void onRepeat() { + + } + + @Override + public void onStep(int i, double v) { + + } + }); } } mIsAnimating = false; @@ -414,8 +440,10 @@ public class LiveEnterRoomAnimPresenter { colocNow = "#" + car.getCar_colour(); playText = car.getUser_nicename() + mContext.getResources().getString(R.string.enter_room); } - if (IMLoginManager.get(mContext).isMountEffect()){ + if (IMLoginManager.get(mContext).isMountEffect()) { GifCacheUtil.getFile(Constants.GIF_CAR_PREFIX + id, url1, "0", mDownloadGifCallback); + } else { + mIsAnimating = false; } }