1:修改飘屏问题,在BaseActivity中进行监听
2:修改礼物问题
This commit is contained in:
@@ -405,9 +405,14 @@ public class AvatarFrameView extends FrameLayout implements IAnimListener {
|
||||
playQueue.add(new PlayItem(url, type2));
|
||||
Logger.d("AvatarFrameView", "Added to queue, queue size: " + playQueue.size() + ", url: " + url);
|
||||
|
||||
// 如果当前没有在播放,则开始播放
|
||||
if (!isPlaying || !isActuallyPlaying()) {
|
||||
if (type2==3){
|
||||
playNextFromQueue();
|
||||
}else {
|
||||
|
||||
// 如果当前没有在播放,则开始播放
|
||||
if (!isPlaying || !isActuallyPlaying()) {
|
||||
playNextFromQueue();
|
||||
}
|
||||
}
|
||||
|
||||
// 异步处理URL解析等耗时操作
|
||||
@@ -765,7 +770,7 @@ public class AvatarFrameView extends FrameLayout implements IAnimListener {
|
||||
}
|
||||
});
|
||||
// 设置循环次数
|
||||
if (mType == 1) {
|
||||
if (mType == 1|| mType == 3) {
|
||||
svgaSurface.setLoops(0); // 无限循环
|
||||
} else {
|
||||
svgaSurface.setLoops(1); // 播放一次
|
||||
@@ -817,6 +822,12 @@ public class AvatarFrameView extends FrameLayout implements IAnimListener {
|
||||
}
|
||||
}
|
||||
});
|
||||
// 设置循环次数
|
||||
if (mType == 1|| mType == 3) {
|
||||
svgaSurface.setLoops(0); // 无限循环
|
||||
} else {
|
||||
svgaSurface.setLoops(1); // 播放一次
|
||||
}
|
||||
svgaSurface.startAnimation();
|
||||
} catch (Exception e) {
|
||||
LogUtils.e(TAG, "Error playing cached SVGA: " + e.getMessage());
|
||||
|
||||
@@ -70,7 +70,7 @@ public abstract class BaseWheatView extends ConstraintLayout implements IBaseWhe
|
||||
public String pitNumber;
|
||||
public int pitImageVId;
|
||||
|
||||
// public ImageView iv_on_line;
|
||||
public ImageView iv_on_line;
|
||||
private boolean showGiftAnim = true;//显示麦位动画
|
||||
private ImageView iv_tag_type;
|
||||
|
||||
@@ -99,7 +99,7 @@ public abstract class BaseWheatView extends ConstraintLayout implements IBaseWhe
|
||||
tvTime = findViewById(R.id.tv_time);
|
||||
tv_time_pk = findViewById(R.id.tv_time_pk);
|
||||
mTvNo = findViewById(R.id.tv_no);
|
||||
// iv_on_line = findViewById(R.id.iv_online);
|
||||
iv_on_line = findViewById(R.id.iv_online);/**/
|
||||
iv_tag_type = findViewById(R.id.iv_tag_type);
|
||||
tv_zhul=findViewById(R.id.tv_zhul);
|
||||
setClipChildren(false);
|
||||
@@ -272,20 +272,20 @@ public abstract class BaseWheatView extends ConstraintLayout implements IBaseWhe
|
||||
public void userJoined(int userId, int elapsd) {
|
||||
if (pitBean != null && pitBean.getUser_id() != null && !pitBean.getUser_id().equals("0")) {
|
||||
if (pitBean.getUser_id().equals(userId + "")) {
|
||||
// iv_on_line.setVisibility(GONE);
|
||||
iv_on_line.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void userOffline(int userId, int reason) {
|
||||
if (pitBean != null && pitBean.getUser_id() != null && !pitBean.getUser_id().equals("0")) {
|
||||
if (pitBean.getUser_id().equals(userId + "")) {
|
||||
// iv_on_line.setVisibility(VISIBLE);
|
||||
}
|
||||
}else if (pitBean.getUser_id()==null || pitBean.getUser_id().equals("0") || pitBean.getUser_id().equals("")){
|
||||
// iv_on_line.setVisibility(GONE);
|
||||
}
|
||||
// if (pitBean != null && pitBean.getUser_id() != null && !pitBean.getUser_id().equals("0")) {
|
||||
// if (pitBean.getUser_id().equals(userId + "")) {
|
||||
//// iv_on_line.setVisibility(VISIBLE);
|
||||
// }
|
||||
// }else if (pitBean.getUser_id()==null || pitBean.getUser_id().equals("0") || pitBean.getUser_id().equals("")){
|
||||
//// iv_on_line.setVisibility(GONE);
|
||||
// }
|
||||
}
|
||||
|
||||
});
|
||||
@@ -346,9 +346,9 @@ public abstract class BaseWheatView extends ConstraintLayout implements IBaseWhe
|
||||
if (pitBean.getUser_id() != null && !pitBean.getUser_id().equals("0") && !pitBean.getUser_id().isEmpty()) {
|
||||
if (pitBean.getUser_id().equals(isOnline.getUser_id())) {
|
||||
if (isOnline.getIs_online() == 1) {
|
||||
// iv_on_line.setVisibility(GONE);
|
||||
iv_on_line.setVisibility(GONE);
|
||||
} else {
|
||||
// iv_on_line.setVisibility(VISIBLE);
|
||||
iv_on_line.setVisibility(VISIBLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@ public class PiaoPingManager {
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
// 动画结束后移除悬浮窗
|
||||
FloatingX.uninstallAll();
|
||||
// windowManager.removeView(floatingView);
|
||||
windowManager.removeView(floatingView);
|
||||
// 处理下一个消息
|
||||
processNextMessage();
|
||||
}
|
||||
@@ -212,7 +212,7 @@ public class PiaoPingManager {
|
||||
XLHisAnimating = false;
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
// @Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onMessageReceived(MqttBean mqttBean) {
|
||||
showPiaoPingMessage(mqttBean);
|
||||
ToastUtils.show("飘屏");
|
||||
|
||||
@@ -69,7 +69,7 @@ public class RoomDefaultWheatView extends BaseWheatView {
|
||||
mIvFrame.setVisibility(INVISIBLE);
|
||||
} else {
|
||||
mIvFrame.setVisibility(VISIBLE);
|
||||
mIvFrame.setSource(pitBean.getDress(), 1);
|
||||
mIvFrame.setSource(pitBean.getDress(), 3);
|
||||
// ImageUtils.loadDecorationAvatar(pitBean.getDress_picture(), mIvFrame);
|
||||
}
|
||||
if (showBoss && WHEAT_BOSS.equals(pitNumber)) {
|
||||
|
||||
@@ -84,10 +84,11 @@ public class RoomFriendshipWheatView extends BaseWheatView {
|
||||
mIvRipple.setVisibility(VISIBLE);
|
||||
mTvName.setText(bean.getNickname());
|
||||
ImageUtils.loadCenterCrop(bean.getAvatar(), mRiv);
|
||||
if (TextUtils.isEmpty(pitBean.getDress_picture())) {
|
||||
if (TextUtils.isEmpty(pitBean.getDress())) {
|
||||
mIvFrame.setVisibility(INVISIBLE);
|
||||
} else {
|
||||
mIvFrame.setVisibility(VISIBLE);
|
||||
mIvFrame.setSource(pitBean.getDress(), 3);
|
||||
}
|
||||
if (showBoss && WHEAT_BOSS.equals(pitNumber)) {
|
||||
mIvTagBoss.setVisibility(GONE);
|
||||
|
||||
@@ -65,7 +65,7 @@ public class RoomKtvWheatView extends BaseWheatView {
|
||||
mIvFrame.setVisibility(INVISIBLE);
|
||||
} else {
|
||||
mIvFrame.setVisibility(VISIBLE);
|
||||
mIvFrame.setSource(pitBean.getDress(), 1);
|
||||
mIvFrame.setSource(pitBean.getDress(), 3);
|
||||
// ImageUtils.loadDecorationAvatar(pitBean.getDress_picture(), mIvFrame);
|
||||
}
|
||||
if (showBoss && WHEAT_BOSS.equals(pitNumber)) {
|
||||
|
||||
@@ -72,10 +72,11 @@ public class RoomMakeWheatView extends BaseWheatView {
|
||||
mIvRipple.setVisibility(VISIBLE);
|
||||
mTvName.setText(bean.getNickname());
|
||||
ImageUtils.loadHeadCC(bean.getAvatar(), mRiv);
|
||||
if (TextUtils.isEmpty(pitBean.getDress_picture())) {
|
||||
if (TextUtils.isEmpty(pitBean.getDress())) {
|
||||
mIvFrame.setVisibility(INVISIBLE);
|
||||
} else {
|
||||
mIvFrame.setVisibility(VISIBLE);
|
||||
mIvFrame.setSource(pitBean.getDress(), 3);
|
||||
}
|
||||
if (showBoss && WHEAT_BOSS.equals(pitNumber)) {
|
||||
mIvTagBoss.setVisibility(GONE);
|
||||
|
||||
@@ -87,7 +87,7 @@ public class RoomSingSongWheatView extends BaseWheatView {
|
||||
mIvFrame.setVisibility(INVISIBLE);
|
||||
} else {
|
||||
mIvFrame.setVisibility(VISIBLE);
|
||||
mIvFrame.setSource(bean.getDress(), 1);
|
||||
mIvFrame.setSource(bean.getDress(), 3);
|
||||
}
|
||||
|
||||
if (showBoss && TextUtils.equals(WHEAT_BOSS, pitNumber)) {
|
||||
|
||||
@@ -124,7 +124,7 @@ public class RoomSingWheatView extends LinearLayout {
|
||||
} else {
|
||||
if (mIvFrame != null) {
|
||||
mIvFrame.setVisibility(VISIBLE);
|
||||
mIvFrame.setSource(pitBean.getDress(), 1);
|
||||
mIvFrame.setSource(pitBean.getDress(), 3);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user