修改BUG
修改飘屏,飘屏不合适
This commit is contained in:
@@ -126,7 +126,7 @@ public class AvatarFrameView extends FrameLayout implements IAnimListener {
|
||||
currentProcessingCount = Math.max(0, currentProcessingCount - 1);
|
||||
|
||||
// 内存检查和清理
|
||||
if (playQueue.size() % 10 == 0) { // 每处理10个动画检查一次内存
|
||||
if (playQueue.size() % 1 == 0) { // 每处理10个动画检查一次内存
|
||||
performLightCleanup();
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
@@ -242,22 +242,11 @@ public abstract class BaseWheatView extends ConstraintLayout implements IBaseWhe
|
||||
if (!mIvRipple.isAnimating()) {
|
||||
mIvRipple.startAnimation();
|
||||
}
|
||||
iv_on_line.setVisibility(GONE);
|
||||
// mIvRipple.setSource(getResources().getResourceName(R.raw.ripple3695), 2);
|
||||
// iv_on_line.setVisibility(GONE);
|
||||
|
||||
});
|
||||
}
|
||||
// if (pitBean.getUser_id().equals(SpUtil.getUserId()) && closePhone) {
|
||||
// mIvRipple.post(() -> {
|
||||
// mIvRipple.setVisibility(GONE);
|
||||
// });
|
||||
// }
|
||||
}
|
||||
// else {
|
||||
// mIvRipple.post(() -> {
|
||||
// mIvRipple.setVisibility(GONE);
|
||||
// });
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@@ -273,8 +262,7 @@ public abstract class BaseWheatView extends ConstraintLayout implements IBaseWhe
|
||||
if (!mIvRipple.isAnimating()) {
|
||||
mIvRipple.startAnimation();
|
||||
}
|
||||
iv_on_line.setVisibility(GONE);
|
||||
// mIvRipple.setSource(getResources().getResourceName(R.raw.ripple3695), 2);
|
||||
// iv_on_line.setVisibility(GONE);
|
||||
|
||||
});
|
||||
}
|
||||
@@ -284,7 +272,7 @@ 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -293,16 +281,16 @@ public abstract class BaseWheatView extends ConstraintLayout implements IBaseWhe
|
||||
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);
|
||||
// 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);
|
||||
// iv_on_line.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
if (pitBean.getUser_id()==null || pitBean.getUser_id().equals("0") || pitBean.getUser_id().equals("") ){
|
||||
iv_on_line.setVisibility(GONE);
|
||||
// iv_on_line.setVisibility(GONE);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -358,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,6 +78,16 @@ public class CenterScrollHelper {
|
||||
smoothScroller.setTargetPosition(totalItems);
|
||||
recyclerView.getLayoutManager().startSmoothScroll(smoothScroller);
|
||||
}
|
||||
|
||||
// 在 CenterScrollHelper 类中添加
|
||||
public void reset() {
|
||||
// 清理可能存在的回调或状态
|
||||
if (recyclerView != null) {
|
||||
recyclerView.stopScroll();
|
||||
recyclerView.getHandler().removeCallbacksAndMessages(null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 使用缓动函数计算滚动时间,实现加速减速效果
|
||||
* @param dx 滚动距离
|
||||
|
||||
@@ -1,12 +1,21 @@
|
||||
package com.xscm.moduleutil.widget;
|
||||
|
||||
import static com.liulishuo.okdownload.OkDownloadProvider.context;
|
||||
|
||||
import static android.app.PendingIntent.getActivity;
|
||||
import static android.content.Context.WINDOW_SERVICE;
|
||||
import static androidx.core.content.ContextCompat.getSystemService;
|
||||
|
||||
import static com.blankj.utilcode.util.ActivityUtils.startActivityForResult;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.AnimatorListenerAdapter;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.PixelFormat;
|
||||
import android.os.Build;
|
||||
import android.provider.Settings;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
@@ -17,10 +26,12 @@ import android.widget.TextView;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.petterp.floatingx.FloatingX;
|
||||
import com.petterp.floatingx.assist.FxGravity;
|
||||
import com.petterp.floatingx.assist.helper.FxAppHelper;
|
||||
import com.xscm.moduleutil.R;
|
||||
import com.xscm.moduleutil.activity.BaseAppCompatActivity;
|
||||
import com.xscm.moduleutil.bean.XLHBean;
|
||||
import com.xscm.moduleutil.event.MqttBean;
|
||||
import com.xscm.moduleutil.utils.ARouteConstants;
|
||||
@@ -47,13 +58,19 @@ public class PiaoPingManager {
|
||||
private Queue<XLHBean> XLHmessageQueue = new ConcurrentLinkedQueue<>(); // 消息队列
|
||||
private boolean isAnimating = false; // 动画状态标记
|
||||
private boolean XLHisAnimating = false; // 动画状态标记
|
||||
|
||||
private Context mContext; // 添加成员变量
|
||||
View floatingView;
|
||||
|
||||
private PiaoPingManager(Context context) {
|
||||
windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
|
||||
this.mContext = context;
|
||||
windowManager = (WindowManager) context.getSystemService(WINDOW_SERVICE);
|
||||
if (windowManager == null) return;
|
||||
|
||||
// 创建飘屏消息的布局
|
||||
LayoutInflater inflater = LayoutInflater.from(context);
|
||||
piaoPingView = inflater.inflate(R.layout.item_piaoping, null);
|
||||
|
||||
}
|
||||
|
||||
public static synchronized PiaoPingManager getInstance(Context context) {
|
||||
@@ -68,11 +85,12 @@ public class PiaoPingManager {
|
||||
// 添加到队列
|
||||
messageQueue.offer(mqttBean);
|
||||
// 如果当前没有动画正在进行,则开始处理
|
||||
if (!isAnimating) {
|
||||
processNextMessage();
|
||||
}
|
||||
// if (!isAnimating) {
|
||||
processNextMessage();
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
private void processNextMessage() {
|
||||
if (messageQueue.isEmpty()) {
|
||||
isAnimating = false;
|
||||
@@ -81,65 +99,91 @@ public class PiaoPingManager {
|
||||
|
||||
isAnimating = true;
|
||||
MqttBean mqttBean = messageQueue.poll();
|
||||
|
||||
displayMessage(mqttBean);
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void displayMessage(MqttBean mqttBean) {
|
||||
// 获取悬浮窗视图并设置内容
|
||||
View floatingView = LayoutInflater.from(context).inflate(R.layout.item_piaoping, new FrameLayout(context), false);
|
||||
TextView textView = floatingView.findViewById(R.id.tv_name);
|
||||
TextView textView2 = floatingView.findViewById(R.id.tv_to_name);
|
||||
textView2.setText("送给" + mqttBean.getList().getToUserName());
|
||||
textView.setText(mqttBean.getList().getFromUserName());
|
||||
ImageUtils.loadHeadCC(mqttBean.getList().getGift_picture(), floatingView.findViewById(R.id.iv_piaoping));
|
||||
TextView tv_time = floatingView.findViewById(R.id.tv_num);
|
||||
tv_time.setText("x" + mqttBean.getList().getNumber());
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
WindowManager.LayoutParams params = new WindowManager.LayoutParams(
|
||||
WindowManager.LayoutParams.WRAP_CONTENT,
|
||||
WindowManager.LayoutParams.WRAP_CONTENT,
|
||||
WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY,
|
||||
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
|
||||
PixelFormat.TRANSLUCENT
|
||||
);
|
||||
|
||||
|
||||
ToastUtils.show("飘屏开始");
|
||||
// 获取悬浮窗视图并设置内容
|
||||
floatingView = LayoutInflater.from(mContext).inflate(R.layout.item_piaoping, new FrameLayout(mContext), false);
|
||||
TextView textView = floatingView.findViewById(R.id.tv_name);
|
||||
TextView textView2 = floatingView.findViewById(R.id.tv_to_name);
|
||||
textView2.setText("送给" + mqttBean.getList().getToUserName());
|
||||
textView.setText(mqttBean.getList().getFromUserName());
|
||||
ImageUtils.loadHeadCC(mqttBean.getList().getGift_picture(), floatingView.findViewById(R.id.iv_piaoping));
|
||||
TextView tv_time = floatingView.findViewById(R.id.tv_num);
|
||||
tv_time.setText("x" + mqttBean.getList().getNumber());
|
||||
ToastUtils.show("飘屏创建");
|
||||
|
||||
WindowManager windowManager = (WindowManager) mContext.getSystemService(WINDOW_SERVICE);
|
||||
windowManager.addView(floatingView, params);
|
||||
}else {
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 先将视图放置在屏幕右侧外部,避免闪现问题
|
||||
floatingView.setTranslationX(10000); // 先放到屏幕外
|
||||
|
||||
FxAppHelper fxAppHelper = FxAppHelper.builder()
|
||||
.setContext(context)
|
||||
.setLayoutView(floatingView)
|
||||
.setGravity(FxGravity.RIGHT_OR_TOP)
|
||||
.setX(0)
|
||||
.setY(100)
|
||||
.build();
|
||||
|
||||
FloatingX.install(fxAppHelper).show();
|
||||
|
||||
// floatingView.setTranslationX(10000); // 先放到屏幕外
|
||||
// 在 FloatingX 配置中或者通过其他方式设置
|
||||
// FxAppHelper fxAppHelper = FxAppHelper.builder()
|
||||
// .setContext(mContext)
|
||||
// .setLayoutView(floatingView)
|
||||
// .setGravity(FxGravity.RIGHT_OR_TOP)
|
||||
// .setX(0)
|
||||
// .setY(100)
|
||||
// .build();
|
||||
//
|
||||
// FloatingX.install(fxAppHelper).show();
|
||||
ToastUtils.show("飘屏创建2");
|
||||
// 首先从右侧滑入到屏幕中央
|
||||
floatingView.post(() -> {
|
||||
// 确保初始位置在屏幕右侧外部
|
||||
floatingView.setTranslationX(floatingView.getWidth());
|
||||
|
||||
// 第一阶段:从右到屏幕右侧边缘(缓慢进入)
|
||||
ObjectAnimator animator1 = ObjectAnimator.ofFloat(floatingView, "translationX",
|
||||
floatingView.getWidth(), 0f);
|
||||
animator1.setDuration(1500); // 延长动画时间到1.5秒
|
||||
animator1.setInterpolator(new DecelerateInterpolator(2.0f)); // 更平缓的减速效果
|
||||
animator1.start();
|
||||
|
||||
// 第二阶段:延迟1秒后从当前位置向左滑出
|
||||
floatingView.postDelayed(() -> {
|
||||
ObjectAnimator animator2 = ObjectAnimator.ofFloat(floatingView, "translationX",
|
||||
0f, -floatingView.getWidth());
|
||||
animator2.setDuration(1500); // 延长动画时间到1.5秒
|
||||
animator2.setInterpolator(new DecelerateInterpolator(2.0f)); // 更平缓的减速效果
|
||||
animator2.addListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
// 动画结束后移除悬浮窗
|
||||
FloatingX.uninstallAll();
|
||||
// 处理下一个消息
|
||||
processNextMessage();
|
||||
}
|
||||
});
|
||||
animator2.start();
|
||||
}, 1000); // 停留1秒
|
||||
});
|
||||
// floatingView.post(() -> {
|
||||
// // 确保初始位置在屏幕右侧外部
|
||||
// floatingView.setTranslationX(floatingView.getWidth());
|
||||
//
|
||||
// // 第一阶段:从右到屏幕右侧边缘(缓慢进入)
|
||||
// ObjectAnimator animator1 = ObjectAnimator.ofFloat(floatingView, "translationX",
|
||||
// floatingView.getWidth(), 0f);
|
||||
// animator1.setDuration(1500); // 延长动画时间到1.5秒
|
||||
// animator1.setInterpolator(new DecelerateInterpolator(2.0f)); // 更平缓的减速效果
|
||||
// animator1.start();
|
||||
// ToastUtils.show("飘屏创建2第一阶段");
|
||||
// // 第二阶段:延迟1秒后从当前位置向左滑出
|
||||
// floatingView.postDelayed(() -> {
|
||||
// ObjectAnimator animator2 = ObjectAnimator.ofFloat(floatingView, "translationX",
|
||||
// 0f, -floatingView.getWidth());
|
||||
// animator2.setDuration(1500); // 延长动画时间到1.5秒
|
||||
// animator2.setInterpolator(new DecelerateInterpolator(2.0f)); // 更平缓的减速效果
|
||||
// animator2.addListener(new AnimatorListenerAdapter() {
|
||||
// @Override
|
||||
// public void onAnimationEnd(Animator animation) {
|
||||
// // 动画结束后移除悬浮窗
|
||||
// FloatingX.uninstallAll();
|
||||
// windowManager.removeView(floatingView);
|
||||
// // 处理下一个消息
|
||||
// processNextMessage();
|
||||
// }
|
||||
// });
|
||||
// animator2.start();
|
||||
// }, 3000); // 停留1秒
|
||||
// ToastUtils.show("飘屏创建2第er阶段");
|
||||
// });
|
||||
ToastUtils.show("飘屏结束");
|
||||
}
|
||||
|
||||
|
||||
public void subscribe() {
|
||||
try {
|
||||
if (!EventBus.getDefault().isRegistered(this)) {
|
||||
@@ -169,7 +213,7 @@ public class PiaoPingManager {
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onMessageReceived(MqttBean mqttBean) {
|
||||
showPiaoPingMessage(mqttBean);
|
||||
|
||||
ToastUtils.show("飘屏");
|
||||
// FxAppHelper fxAppHelper = FxAppHelper.builder().setContext( context).setLayout(R.layout.item_piaoping).build();
|
||||
// FloatingX.install(fxAppHelper).show();
|
||||
}
|
||||
@@ -199,10 +243,11 @@ public class PiaoPingManager {
|
||||
XLHBean xlhBean = XLHmessageQueue.poll();
|
||||
displayMessageXlh(xlhBean);
|
||||
}
|
||||
|
||||
@SuppressLint({"MissingInflatedId", "LocalSuppress"})
|
||||
private void displayMessageXlh(XLHBean xlhBean) {
|
||||
// 获取悬浮窗视图并设置内容
|
||||
View floatingView = LayoutInflater.from(context).inflate(R.layout.item_piaoping_xlh, new FrameLayout(context), false);
|
||||
View floatingView = LayoutInflater.from(mContext).inflate(R.layout.item_piaoping_xlh, new FrameLayout(mContext), false);
|
||||
TextView textView = floatingView.findViewById(R.id.tv_name);
|
||||
ImageView xlh_image = floatingView.findViewById(R.id.im_xlh);
|
||||
// if (xlhBean.getFrom_type() == 1){
|
||||
@@ -211,7 +256,7 @@ public class PiaoPingManager {
|
||||
// xlh_image.setImageResource(R.mipmap.xlh_zsks);
|
||||
// }
|
||||
|
||||
xlh_image.setImageDrawable(xlhBean.getFrom_type() == 1 ? context.getResources().getDrawable(R.mipmap.xlh_jjks) : context.getResources().getDrawable(R.mipmap.xlh_zsks));
|
||||
xlh_image.setImageDrawable(xlhBean.getFrom_type() == 1 ? mContext.getResources().getDrawable(R.mipmap.xlh_jjks) : mContext.getResources().getDrawable(R.mipmap.xlh_zsks));
|
||||
|
||||
textView.setText(xlhBean.getText());
|
||||
|
||||
@@ -219,7 +264,7 @@ public class PiaoPingManager {
|
||||
floatingView.setTranslationX(10000); // 先放到屏幕外
|
||||
|
||||
FxAppHelper fxAppHelper = FxAppHelper.builder()
|
||||
.setContext(context)
|
||||
.setContext(mContext)
|
||||
.setLayoutView(floatingView)
|
||||
.setGravity(FxGravity.RIGHT_OR_TOP)
|
||||
.setX(0)
|
||||
|
||||
@@ -22,7 +22,7 @@ public class RoomFriendshipWheatView extends BaseWheatView {
|
||||
|
||||
public ImageView mIvTagBoss;
|
||||
public TextView mTvTime;
|
||||
public ImageView iv_on_line;
|
||||
// public ImageView iv_on_line;
|
||||
private ImageView iv_tag_type;
|
||||
public WheatCharmView mCharmView;
|
||||
public TextView tv_zhul;
|
||||
@@ -51,7 +51,7 @@ public class RoomFriendshipWheatView extends BaseWheatView {
|
||||
typedArray.recycle();
|
||||
mIvTagBoss = findViewById(R.id.iv_tag_boos);
|
||||
mTvTime = findViewById(R.id.tv_time);
|
||||
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);
|
||||
mCharmView = findViewById(R.id.charm_view);
|
||||
mRiv.setImageResource(pitImageVId);
|
||||
@@ -281,9 +281,9 @@ public class RoomFriendshipWheatView extends BaseWheatView {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -237,7 +237,7 @@ public class RoomKtvWheatView extends BaseWheatView {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -246,7 +246,7 @@ public class RoomKtvWheatView extends BaseWheatView {
|
||||
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);
|
||||
// iv_on_line.setVisibility(VISIBLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ public class RoomMakeWheatView extends BaseWheatView {
|
||||
public ImageView mIvTagBoss;
|
||||
public TextView mTvTime;
|
||||
public ImageView iv_zhul;
|
||||
public ImageView iv_on_line;
|
||||
// public ImageView iv_on_line;
|
||||
private ImageView iv_tag_type;
|
||||
public WheatCharmView mCharmView;
|
||||
private boolean showBoss;//显示老板标识
|
||||
@@ -47,7 +47,7 @@ public class RoomMakeWheatView extends BaseWheatView {
|
||||
typedArray.recycle();
|
||||
mIvTagBoss = findViewById(R.id.iv_tag_boos);
|
||||
mTvTime = findViewById(R.id.tv_time);
|
||||
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);
|
||||
mCharmView = findViewById(R.id.charm_view);
|
||||
mRiv.setImageResource(pitImageVId);
|
||||
@@ -204,9 +204,9 @@ public class RoomMakeWheatView extends BaseWheatView {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public class RoomSingWheatView extends LinearLayout {
|
||||
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;
|
||||
|
||||
@@ -82,7 +82,7 @@ public class RoomSingWheatView extends LinearLayout {
|
||||
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);
|
||||
|
||||
|
||||
@@ -243,17 +243,17 @@ public class RewardGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPr
|
||||
}
|
||||
}
|
||||
|
||||
if (currentItem == 0) {
|
||||
// if (currentItem == 0) {
|
||||
//礼物打赏
|
||||
giftNumber = num;
|
||||
MvpPre.reward_zone(circle_id, roonGiftModel.getGift_id(), num, "1");
|
||||
} else {
|
||||
// } else {
|
||||
//背包礼物打赏
|
||||
// giftNumber = num;
|
||||
// roomGiftGiveEvent = new RoomGiftGiveEvent(userId, roomId, pit, num, 1, giftModel, null);
|
||||
//
|
||||
// MvpPre.giveBackGift(userId, giftModel.getGift_id(), roomId, pit, num, giftModel, 1);
|
||||
}
|
||||
// }
|
||||
}
|
||||
@Override
|
||||
public void setGiftList(List<RoonGiftModel> roonGiftModels,int type) {
|
||||
@@ -273,7 +273,7 @@ public class RewardGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPr
|
||||
@Override
|
||||
public void reward_zone() {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("打赏成功");
|
||||
EventBus.getDefault().post(new GiftRewardEvent(point));
|
||||
EventBus.getDefault().post(new GiftRewardEvent(point,circle_id));
|
||||
dismiss();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user