1:修改卡顿问题,

2:修改玄镜的动画
3:修改转盘获取数据
4:修改排行榜
This commit is contained in:
2025-09-15 18:22:36 +08:00
parent 572967ca16
commit e87a368862
40 changed files with 1752 additions and 911 deletions

View File

@@ -589,8 +589,8 @@ public class AvatarFrameView extends FrameLayout {
if (file != null && file.exists()) {
// 设置循环次数根据mType决定
if (mType == 1) {
mBinding.playView.setLoop(0); // 无限循环
if (mType == 1 || mType == 3) {
mBinding.playView.setLoop(Integer.max(1, 999999999)); // 无限循环
} else {
mBinding.playView.setLoop(1); // 播放一次
}
@@ -767,7 +767,9 @@ public class AvatarFrameView extends FrameLayout {
public void onRepeat() {
// 循环播放处理
if (mType != 1) { // 非循环播放
svgaSurface.stopAnimation(true);
svgaSurface.stopAnimation();
svgaSurface.clearAnimation();
svgaSurface.setImageDrawable(null);
onPlaybackComplete();
}
}
@@ -811,6 +813,22 @@ public class AvatarFrameView extends FrameLayout {
}
}
public void stopAll(){
if (svgaSurface != null){
svgaSurface.stopAnimation();
svgaSurface.clearAnimation();
svgaSurface.setImageDrawable( null);
}
if (svgaSurface2 != null){
svgaSurface2.stopAnimation();
svgaSurface2.clearAnimation();
svgaSurface.setImageDrawable( null);
}
if (mBinding.playView!=null){
mBinding.playView.stopPlay();
}
}
private void playCachedSVGA(SVGAVideoEntity videoItem) {
// if (isDestroyed || svgaSurface == null) return;
@@ -1196,6 +1214,8 @@ public class AvatarFrameView extends FrameLayout {
// svgaSurface.setImageDrawable(null);
svgaSurface.stopAnimation(true);
svgaSurface.clear();
svgaSurface.clearAnimation();
svgaSurface.setImageDrawable( null);
} catch (Exception e) {
Logger.e(TAG, "Error releasing SVGA resources: " + e.getMessage());
}

View File

@@ -91,7 +91,7 @@ public class GiftAnimView extends FrameLayout implements GiftSvgaView.OnAnimatio
@Override
public void onVideoRender(int i, @Nullable AnimConfig animConfig) {
LogUtils.e("onVideoRender", i, animConfig);
// LogUtils.e("onVideoRender", i, animConfig);
}
@Override

View File

@@ -218,6 +218,8 @@ public class GiftSvgaView extends FrameLayout implements SVGACallback {
public void stopEffectSvgaPlay() {
if (player != null) {
player.stopAnimation();
player.clearAnimation();
player.setImageDrawable( null);
}
}

View File

@@ -95,9 +95,11 @@ public class RoomFriendshipWheatView extends BaseWheatView {
mTvName.setText(bean.getNickname());
ImageUtils.loadCenterCrop(bean.getAvatar(), mRiv);
if (TextUtils.isEmpty(pitBean.getDress())) {
mIvFrame.stopAll();
mIvFrame.setVisibility(INVISIBLE);
} else {
mIvFrame.setVisibility(VISIBLE);
mIvFrame.stopAll();
mIvFrame.setSource(pitBean.getDress(), 3);
}
if (showBoss && WHEAT_BOSS.equals(pitNumber)) {
@@ -121,7 +123,7 @@ public class RoomFriendshipWheatView extends BaseWheatView {
if (isMute()) {
ImageUtils.loadRes(R.mipmap.room_microphone_off, mIvSex);
}
mIvFrame.stopSvga();
mIvFrame.stopAll();
mIvFrame.setVisibility(INVISIBLE);
mIvFace.remove();
//停止声浪

View File

@@ -79,6 +79,7 @@ public class RoomKtvWheatView extends BaseWheatView {
mTvName.setText(bean.getNickname());
ImageUtils.loadHeadCC(bean.getAvatar(), mRiv);
if (TextUtils.isEmpty(pitBean.getDress())) {
mIvFrame.stopAll();
mIvFrame.setVisibility(INVISIBLE);
} else {
mIvFrame.setVisibility(VISIBLE);
@@ -110,6 +111,7 @@ public class RoomKtvWheatView extends BaseWheatView {
if (isMute()) {
ImageUtils.loadRes(R.mipmap.room_microphone_off, mIvSex);
}
mIvFrame.stopAll();
mIvFrame.setVisibility(INVISIBLE);
mIvFace.remove();
//停止声浪

View File

@@ -103,6 +103,7 @@ public class RoomMakeWheatView extends BaseWheatView {
mTvName.setText(bean.getNickname());
ImageUtils.loadHeadCC(bean.getAvatar(), mRiv);
if (TextUtils.isEmpty(pitBean.getDress())) {
mIvFrame.stopAll();
mIvFrame.setVisibility(INVISIBLE);
} else {
mIvFrame.setVisibility(VISIBLE);
@@ -124,7 +125,7 @@ public class RoomMakeWheatView extends BaseWheatView {
if (isMute()){
ImageUtils.loadRes(R.mipmap.room_microphone_off, mIvSex);
}
mIvFrame.stopSvga();
mIvFrame.stopAll();
mIvFrame.setVisibility(INVISIBLE);
mIvFace.remove();
//停止声浪

View File

@@ -84,6 +84,7 @@ public class RoomSingSongWheatView extends BaseWheatView {
ImageUtils.loadHeadCC(bean.getAvatar(), mRiv);
if (TextUtils.isEmpty(bean.getDress())) {
mIvFrame.stopAll();
mIvFrame.setVisibility(INVISIBLE);
} else {
mIvFrame.setVisibility(VISIBLE);
@@ -109,7 +110,7 @@ public class RoomSingSongWheatView extends BaseWheatView {
if (isMute()) {
ImageUtils.loadRes(R.mipmap.room_microphone_off, mIvSex);
}
mIvFrame.stopSvga();
mIvFrame.stopAll();
mIvFrame.setVisibility(INVISIBLE);
mIvFace.remove();
mIvRipple.setVisibility(GONE);