修复:

修改坐骑特效的设置
This commit is contained in:
18401019693 2022-08-24 14:27:32 +08:00
parent c1ee03ccbd
commit 112125bd69

View File

@ -24,6 +24,7 @@ import android.widget.MediaController;
import android.widget.RelativeLayout; import android.widget.RelativeLayout;
import android.widget.TextView; import android.widget.TextView;
import com.opensource.svgaplayer.SVGACallback;
import com.opensource.svgaplayer.SVGAImageView; import com.opensource.svgaplayer.SVGAImageView;
import com.opensource.svgaplayer.SVGAParser; import com.opensource.svgaplayer.SVGAParser;
import com.opensource.svgaplayer.SVGAVideoEntity; import com.opensource.svgaplayer.SVGAVideoEntity;
@ -313,10 +314,35 @@ public class LiveEnterRoomAnimPresenter {
} }
} else { } else {
if (mSVGImageView != null) { if (mSVGImageView != null) {
mSVGImageView.setVisibility(View.VISIBLE);
SVGARect rect = svgaVideoEntity.getVideoSize(); SVGARect rect = svgaVideoEntity.getVideoSize();
mSVGImageView.setVideoItem(svgaVideoEntity); mSVGImageView.setVideoItem(svgaVideoEntity);
mSVGImageView.setLoops(1); mSVGImageView.setLoops(1);
mSVGImageView.startAnimation(); 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; mIsAnimating = false;
@ -414,8 +440,10 @@ public class LiveEnterRoomAnimPresenter {
colocNow = "#" + car.getCar_colour(); colocNow = "#" + car.getCar_colour();
playText = car.getUser_nicename() + mContext.getResources().getString(R.string.enter_room); 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); GifCacheUtil.getFile(Constants.GIF_CAR_PREFIX + id, url1, "0", mDownloadGifCallback);
} else {
mIsAnimating = false;
} }
} }