1:添加背包一键全清功能
2:添加查看心动值列表 3:修改进入小黑屋出现不能收到消息的问题
This commit is contained in:
@@ -248,16 +248,11 @@ public class AvatarFrameView extends FrameLayout implements IAnimListener {
|
||||
private void playNextFromQueue() {
|
||||
// if (isDestroyed) return;
|
||||
// 确保在主线程中执行
|
||||
if (Looper.myLooper() != Looper.getMainLooper()) {
|
||||
mainHandler.post(this::playNextFromQueue);
|
||||
return;
|
||||
}
|
||||
// 再次检查内存状态
|
||||
// if (isMemoryLow()) {
|
||||
// LogUtils.w(TAG, "Low memory, clearing queue");
|
||||
// clearQueue();
|
||||
// if (Looper.myLooper() != Looper.getMainLooper()) {
|
||||
// mainHandler.post(this::playNextFromQueue);
|
||||
// return;
|
||||
// }
|
||||
|
||||
// 检查特效是否开启
|
||||
if (SpUtil.getOpenEffect() != 1) {
|
||||
clearQueue();
|
||||
@@ -986,16 +981,14 @@ public class AvatarFrameView extends FrameLayout implements IAnimListener {
|
||||
// }
|
||||
|
||||
private void clearPrevious() {
|
||||
// if (isDestroyed) return;
|
||||
// 确保在主线程中执行
|
||||
if (Looper.myLooper() != Looper.getMainLooper()) {
|
||||
mainHandler.post(() -> {
|
||||
// if (!isDestroyed) {
|
||||
clearPrevious();
|
||||
// }
|
||||
});
|
||||
return;
|
||||
}
|
||||
// if (Looper.myLooper() != Looper.getMainLooper()) {
|
||||
// mainHandler.post(() -> {
|
||||
// clearPrevious();
|
||||
//// }
|
||||
// });
|
||||
// return;
|
||||
// }
|
||||
try {
|
||||
// 停止并清理 ExoPlayer
|
||||
// if (exoPlayer != null) {
|
||||
|
||||
@@ -385,6 +385,7 @@ public class Constants {
|
||||
public static final String POST_XLH_ALL_RECORD = "/api/BlindBoxTurntable/get_xlh_all_record";///巡乐会榜单
|
||||
public static final String GET_XLH_MY_RECORD = "/api/BlindBoxTurntable/get_xlh_my_record";///巡乐会记录
|
||||
public static final String POST_GIFT_ALL_CLEAR = "/api/Room/room_gift_all_clear";///背包礼物全清
|
||||
public static final String POST_ROOM_USER_CHARM_LIST = "/api/Room/room_user_charm_list";///房间用户当前魅力值列表
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -68,6 +68,16 @@ public class RoomFriendshipWheatView extends BaseWheatView {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
mCharmView.setOnClickListener(new OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (mOnCharmClickListener != null && pitBean != null){
|
||||
mOnCharmClickListener.onCharmClick(RoomFriendshipWheatView.this, pitBean);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -303,6 +313,12 @@ public class RoomFriendshipWheatView extends BaseWheatView {
|
||||
this.mOnZhulClickListener = listener;
|
||||
}
|
||||
|
||||
private onCharmClickListener mOnCharmClickListener;
|
||||
|
||||
public void setmOnCharmClickListener(onCharmClickListener mOnCharmClickListener) {
|
||||
this.mOnCharmClickListener = mOnCharmClickListener;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unRegister(Object obj) {
|
||||
|
||||
@@ -311,4 +327,8 @@ public class RoomFriendshipWheatView extends BaseWheatView {
|
||||
public interface OnZhulClickListener {
|
||||
void onZhulClick(RoomFriendshipWheatView view, RoomPitBean pitBean);
|
||||
}
|
||||
|
||||
public interface onCharmClickListener{
|
||||
void onCharmClick(RoomFriendshipWheatView view, RoomPitBean pitBean);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,14 @@ public class RoomKtvWheatView extends BaseWheatView {
|
||||
public RoomKtvWheatView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
private onCharmClickListener mOnCharmClickListener;
|
||||
|
||||
public void setmOnCharmClickListener(onCharmClickListener mOnCharmClickListener) {
|
||||
this.mOnCharmClickListener = mOnCharmClickListener;
|
||||
}
|
||||
public interface onCharmClickListener{
|
||||
void onCharmClick(RoomKtvWheatView view, RoomPitBean pitBean);
|
||||
}
|
||||
@Override
|
||||
protected void initPit(Context context, AttributeSet attrs) {
|
||||
TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.RoomDefaultWheatView);
|
||||
@@ -45,6 +52,16 @@ public class RoomKtvWheatView extends BaseWheatView {
|
||||
mIvTagBoss = findViewById(R.id.iv_tag_boos);
|
||||
mTvTime = findViewById(R.id.tv_time);
|
||||
tv_time_pk = findViewById(R.id.tv_time_pk);
|
||||
|
||||
mCharmView.setOnClickListener(new OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (mOnCharmClickListener != null && pitBean != null){
|
||||
mOnCharmClickListener.onCharmClick(RoomKtvWheatView.this, pitBean);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -51,8 +51,38 @@ public class RoomMakeWheatView extends BaseWheatView {
|
||||
iv_tag_type=findViewById(R.id.iv_tag_type);
|
||||
mCharmView = findViewById(R.id.charm_view);
|
||||
mRiv.setImageResource(pitImageVId);
|
||||
|
||||
if (mTvTime != null) {
|
||||
mTvTime.setOnClickListener(v -> {
|
||||
// 处理魅力值点击
|
||||
if (mOnCharmClickListener != null && pitBean != null) {
|
||||
mOnCharmClickListener.onCharmClick(this, pitBean);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void setOnClickListener(OnClickListener l) {
|
||||
// // 保存外部设置的点击监听器
|
||||
// this.onWholeViewClickListener = l;
|
||||
// super.setOnClickListener(l);
|
||||
// }
|
||||
|
||||
// 为子组件设置点击监听器时,确保不会拦截父容器的点击事件
|
||||
public void setupChildClickListeners() {
|
||||
if (mRiv != null) {
|
||||
mRiv.setOnClickListener(v -> {
|
||||
// 处理头像点击
|
||||
if (onWholeViewClickListener != null) {
|
||||
onWholeViewClickListener.onClick(this);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
private OnClickListener onWholeViewClickListener;
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.room_view_make_wheat;
|
||||
@@ -130,8 +160,27 @@ public class RoomMakeWheatView extends BaseWheatView {
|
||||
iv_tag_type.setVisibility(GONE);
|
||||
mCharmView.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
|
||||
// mCharmView.setOnClickListener(new OnClickListener() {
|
||||
//
|
||||
// @Override
|
||||
// public void onClick(View v) {
|
||||
// if (mOnCharmClickListener != null && pitBean != null){
|
||||
// mOnCharmClickListener.onCharmClick(RoomMakeWheatView.this, pitBean);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
|
||||
}
|
||||
private onCharmClickListener mOnCharmClickListener;
|
||||
//
|
||||
public void setmOnCharmClickListener(onCharmClickListener mOnCharmClickListener) {
|
||||
this.mOnCharmClickListener = mOnCharmClickListener;
|
||||
}
|
||||
//
|
||||
public interface onCharmClickListener{
|
||||
void onCharmClick(RoomMakeWheatView view, RoomPitBean pitBean);
|
||||
}
|
||||
public void setChe(String che){
|
||||
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import android.widget.LinearLayout;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.xscm.moduleutil.R;
|
||||
import com.xscm.moduleutil.bean.UserOnlineStatusBean;
|
||||
import com.xscm.moduleutil.bean.room.RoomPitBean;
|
||||
@@ -36,6 +37,8 @@ public class WheatLayoutSingManager {
|
||||
|
||||
void onMakeWheatClick(RoomSingSongWheatView view, int pitNumber);
|
||||
|
||||
void onMeilingClick(RoomSingSongWheatView view, int pitNumber);
|
||||
|
||||
}
|
||||
|
||||
private @Nullable OnWheatClickListener wheatClickListener;
|
||||
@@ -101,14 +104,28 @@ public class WheatLayoutSingManager {
|
||||
params.setMargins(20, 20, 20, 20);
|
||||
singleWheatView.setLayoutParams(params);
|
||||
|
||||
// 添加点击事件
|
||||
singleWheatView.setOnClickListener(v -> {
|
||||
GifAvatarOvalView avatarView = (GifAvatarOvalView) singleWheatView.mRiv;
|
||||
avatarView.setOnClickListener(v -> {
|
||||
if (wheatClickListener != null) {
|
||||
wheatClickListener.onWheatClick(singleWheatView, pitNumber);
|
||||
}
|
||||
restoreMultiWheat();
|
||||
});
|
||||
|
||||
WheatCharmView charmView = singleWheatView.mCharmView;
|
||||
charmView.setOnClickListener(v -> {
|
||||
if (wheatClickListener != null) {
|
||||
wheatClickListener.onMeilingClick(singleWheatView, Integer.parseInt(singleWheatView.pitNumber));
|
||||
}
|
||||
});
|
||||
// // 添加点击事件
|
||||
singleWheatView.setOnClickListener(v -> {
|
||||
if (wheatClickListener != null) {
|
||||
wheatClickListener.onMakeWheatClick(singleWheatView, pitNumber);
|
||||
}
|
||||
restoreMultiWheat();
|
||||
});
|
||||
|
||||
container.addView(singleWheatView);
|
||||
isSingleMode = true;
|
||||
currentSinglePit = pitNumber;
|
||||
@@ -168,9 +185,26 @@ public class WheatLayoutSingManager {
|
||||
}
|
||||
|
||||
wheatView.setLayoutParams(params);
|
||||
|
||||
|
||||
GifAvatarOvalView avatarView = (GifAvatarOvalView) wheatView.mRiv;
|
||||
avatarView.setOnClickListener(v -> {
|
||||
if (wheatClickListener != null) {
|
||||
wheatClickListener.onWheatClick(wheatView, pitNumber);
|
||||
}
|
||||
});
|
||||
|
||||
WheatCharmView charmView = wheatView.mCharmView;
|
||||
charmView.setOnClickListener(v -> {
|
||||
if (wheatClickListener != null) {
|
||||
ToastUtils.show("点击了麦位");
|
||||
wheatClickListener.onMeilingClick(wheatView, pitNumber);
|
||||
}
|
||||
});
|
||||
|
||||
wheatView.setOnClickListener(v -> {
|
||||
if (wheatClickListener != null) {
|
||||
wheatClickListener.onWheatClick(wheatView, Integer.parseInt(wheatView.pitNumber));
|
||||
wheatClickListener.onMeilingClick(wheatView, Integer.parseInt(wheatView.pitNumber));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user