Merge branch 'branch_new_dev' into branch_new
This commit is contained in:
@@ -161,7 +161,7 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
||||
//设置mqtt环境 false 测试环境 true 正式环境
|
||||
// ExternalResConstants.INSTANCE.setIS_MQTT_RELEASE(false);
|
||||
//设置http环境 false 测试环境 true 正式环境
|
||||
ExternalResConstants.INSTANCE.setIS_HTTP_RELEASE(false);
|
||||
ExternalResConstants.INSTANCE.setIS_HTTP_RELEASE(true);
|
||||
currentEnvironment = ExternalResConstants.INSTANCE.HTTP_PATH();
|
||||
|
||||
initialization();
|
||||
|
||||
@@ -2,6 +2,9 @@ package com.xscm.moduleutil.dialog.giftLottery;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.blankj.utilcode.util.ActivityUtils;
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.xscm.moduleutil.base.CommonAppContext;
|
||||
import com.xscm.moduleutil.bean.GiftBean;
|
||||
import com.xscm.moduleutil.bean.WalletBean;
|
||||
import com.xscm.moduleutil.bean.blindboxwheel.BlindBoxBean;
|
||||
@@ -134,6 +137,12 @@ public class GiftLotteryPresenter extends BasePresenter<GiftLotteryContacts.View
|
||||
public void xlh(String room_id) {
|
||||
// api.xlh(room_id, new BaseObserver<String>() {)
|
||||
|
||||
if (room_id == null ||room_id.isEmpty()){
|
||||
LogUtils.e("xlh room_id is null" + CommonAppContext.getInstance().playId);
|
||||
room_id = CommonAppContext.getInstance().playId;
|
||||
}
|
||||
|
||||
|
||||
api.getBoxGiftListXLH(room_id, new BaseObserver<BlindBoxBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
@@ -155,6 +164,12 @@ public class GiftLotteryPresenter extends BasePresenter<GiftLotteryContacts.View
|
||||
if (api==null){
|
||||
api= RetrofitClient.getInstance();
|
||||
}
|
||||
|
||||
if (room_id == null ||room_id.isEmpty()){
|
||||
LogUtils.e("xlhChou room_id is null" + CommonAppContext.getInstance().playId);
|
||||
room_id = CommonAppContext.getInstance().playId;
|
||||
}
|
||||
|
||||
api.xlhChou(room_id,num, new BaseObserver<List<XlhDrawBean>>() {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -80,9 +80,6 @@ public class GiftDisplayManager {
|
||||
}
|
||||
|
||||
public void receiveGift(GiftBean gift) {
|
||||
if (isInBackground){
|
||||
return;
|
||||
}
|
||||
if (gift == null) return;
|
||||
|
||||
LogUtils.e("GiftDisplayManager", "Received gift: " + gift.getSenderName() +
|
||||
@@ -112,7 +109,7 @@ public class GiftDisplayManager {
|
||||
// 有可用视图,立即显示
|
||||
String key = gift.getGiftKey();
|
||||
accumulatedGifts.put(key, gift.clone());
|
||||
availableView.showGift(gift);
|
||||
availableView.showGift(availableView,gift);
|
||||
LogUtils.e("GiftDisplayManager", "Immediately display gift on view: " + gift);
|
||||
} else {
|
||||
// 没有可用视图,加入队列
|
||||
@@ -206,20 +203,6 @@ public class GiftDisplayManager {
|
||||
// 立即处理队列,而不是延迟
|
||||
mainHandler.post(this::processGiftQueue);
|
||||
}
|
||||
private boolean isInBackground=false;
|
||||
public void isBackGround(){
|
||||
for (GiftDisplayView view : displayViews) {
|
||||
view.finishAnimationImmediately();
|
||||
}
|
||||
giftQueue.clear();
|
||||
accumulatedGifts.clear();
|
||||
isProcessingQueue = false;
|
||||
isInBackground=true;
|
||||
}
|
||||
|
||||
public void becomeFront(){
|
||||
isInBackground=false;
|
||||
}
|
||||
|
||||
public void clearAll() {
|
||||
LogUtils.e("GiftDisplayManager", "Clear all gifts and queue");
|
||||
@@ -234,19 +217,6 @@ public class GiftDisplayManager {
|
||||
isProcessingQueue = false;
|
||||
}
|
||||
|
||||
// 调试方法
|
||||
public void printDebugInfo() {
|
||||
LogUtils.e("GiftDisplayManager", "=== Gift Display Manager Status ===");
|
||||
LogUtils.e("GiftDisplayManager", "Queue size: " + giftQueue.size());
|
||||
LogUtils.e("GiftDisplayManager", "Accumulated records: " + accumulatedGifts.size());
|
||||
|
||||
for (int i = 0; i < displayViews.size(); i++) {
|
||||
GiftDisplayView view = displayViews.get(i);
|
||||
LogUtils.e("GiftDisplayManager", "View " + i + ": Animating=" + view.isAnimating() +
|
||||
", Gift=" + (view.getCurrentGift() != null ? view.getCurrentGift().getGift_name() : "None"));
|
||||
}
|
||||
LogUtils.e("GiftDisplayManager", "===================================");
|
||||
}
|
||||
|
||||
private int dpToPx(int dp) {
|
||||
if (containerRef == null || containerRef.get() == null) return dp;
|
||||
|
||||
@@ -62,12 +62,59 @@ public class GiftDisplayView extends FrameLayout {
|
||||
// setBackgroundResource(R.drawable.gift_background);
|
||||
setAlpha(0f);
|
||||
}
|
||||
|
||||
public void showGift(GiftBean gift) {
|
||||
if (isAnimating) {
|
||||
LogUtils.e("GiftDisplayView", "View is animating, cannot show new gift");
|
||||
return;
|
||||
}
|
||||
// 更新UI
|
||||
if (gift == null)
|
||||
return;
|
||||
|
||||
this.currentGift = gift;
|
||||
this.isAnimating = true;
|
||||
|
||||
LogUtils.e("GiftDisplayView", "Start showing gift: " + gift.getGift_name());
|
||||
senderTextView.setText(gift.getNickname() != null ? gift.getNickname() : "未知用户");
|
||||
|
||||
// 更新礼物信息
|
||||
giftTextView.setText("送给 " + (gift.getSenderName() != null ? gift.getSenderName() : "未知用户") + (gift.getGift_name() != null ? gift.getGift_name() : "礼物"));
|
||||
|
||||
// 更新礼物数量
|
||||
countTextView.setText("x" + gift.getNumber());
|
||||
|
||||
// 加载头像图片(这里可以使用Glide、Picasso等图片加载库)
|
||||
loadAvatarImage(avatarImageView, gift.getUserAvatar());
|
||||
|
||||
// 加载礼物图片
|
||||
loadGiftImage(giftImageView, gift.getBase_image());
|
||||
|
||||
LogUtils.e("GiftDisplayView", "Update UI: " + gift.getSenderName() + " - " +
|
||||
gift.getGift_name() + " x" + gift.getNumber());
|
||||
|
||||
// 重置位置
|
||||
setTranslationX(-getWidth());
|
||||
setAlpha(1f);
|
||||
|
||||
// 从左往右进入动画
|
||||
animate()
|
||||
.translationX(0)
|
||||
.setDuration(500)
|
||||
.setInterpolator(new AccelerateDecelerateInterpolator())
|
||||
.setListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
LogUtils.e("GiftDisplayView", "Enter animation completed: " + gift.getGift_name());
|
||||
startHideTimer();
|
||||
}
|
||||
})
|
||||
.start();
|
||||
}
|
||||
public void showGift(GiftDisplayView reuseView, GiftBean gift) {
|
||||
if (isAnimating) {
|
||||
LogUtils.e("GiftDisplayView", "View is animating, cannot show new gift");
|
||||
return;
|
||||
}
|
||||
|
||||
this.currentGift = gift;
|
||||
this.isAnimating = true;
|
||||
@@ -75,7 +122,7 @@ public class GiftDisplayView extends FrameLayout {
|
||||
LogUtils.e("GiftDisplayView", "Start showing gift: " + gift.getGift_name());
|
||||
|
||||
// 更新UI
|
||||
updateUIWithGift(gift);
|
||||
updateUIWithGift(reuseView, gift);
|
||||
|
||||
// 重置位置
|
||||
setTranslationX(-getWidth());
|
||||
@@ -96,54 +143,47 @@ public class GiftDisplayView extends FrameLayout {
|
||||
.start();
|
||||
}
|
||||
|
||||
private void updateUIWithGift(GiftBean gift) {
|
||||
if (gift == null) return;
|
||||
|
||||
senderTextView.setText(gift.getNickname()!=null ? gift.getNickname() : "未知用户");
|
||||
// 更新发送者名称
|
||||
// senderTextView.setText(gift.getSenderName() != null ? gift.getSenderName() : "未知用户");
|
||||
private void updateUIWithGift(GiftDisplayView reuseView, GiftBean gift) {
|
||||
if (gift == null || reuseView == null)
|
||||
return;
|
||||
ImageView avatarImageView = reuseView.findViewById(R.id.iv_avatar);
|
||||
TextView senderTextView = reuseView.findViewById(R.id.tv_sender);
|
||||
TextView giftTextView = reuseView.findViewById(R.id.tv_gift);
|
||||
TextView countTextView = reuseView.findViewById(R.id.tv_count);
|
||||
ImageView giftImageView = reuseView.findViewById(R.id.iv_gift);
|
||||
senderTextView.setText(gift.getNickname() != null ? gift.getNickname() : "未知用户");
|
||||
|
||||
// 更新礼物信息
|
||||
giftTextView.setText("送给 "+(gift.getSenderName() != null ? gift.getSenderName() : "未知用户") + (gift.getGift_name() != null ? gift.getGift_name() : "礼物"));
|
||||
giftTextView.setText("送给 " + (gift.getSenderName() != null ? gift.getSenderName() : "未知用户") + (gift.getGift_name() != null ? gift.getGift_name() : "礼物"));
|
||||
|
||||
// 更新礼物数量
|
||||
countTextView.setText("x" + gift.getNumber());
|
||||
|
||||
// 加载头像图片(这里可以使用Glide、Picasso等图片加载库)
|
||||
loadAvatarImage(gift.getUserAvatar());
|
||||
loadAvatarImage(avatarImageView, gift.getUserAvatar());
|
||||
|
||||
// 加载礼物图片
|
||||
loadGiftImage(gift.getBase_image());
|
||||
loadGiftImage(giftImageView, gift.getBase_image());
|
||||
|
||||
LogUtils.e("GiftDisplayView", "Update UI: " + gift.getSenderName() + " - " +
|
||||
gift.getGift_name() + " x" + gift.getNumber());
|
||||
}
|
||||
|
||||
private void loadAvatarImage(String avatarUrl) {
|
||||
private void loadAvatarImage(ImageView imageView, String avatarUrl) {
|
||||
if (avatarUrl != null && !avatarUrl.isEmpty()) {
|
||||
// 使用图片加载库,例如:
|
||||
// Glide.with(getContext()).load(avatarUrl).into(avatarImageView);
|
||||
|
||||
// 临时用颜色代替
|
||||
// avatarImageView.setBackgroundColor(getRandomColor());
|
||||
if (avatarImageView!=null&&avatarImageView.getContext()!=null) {
|
||||
ImageUtils.loadHeadCC(avatarUrl, avatarImageView);
|
||||
if (imageView != null && imageView.getContext() != null) {
|
||||
ImageUtils.loadHeadCC(avatarUrl, imageView);
|
||||
}
|
||||
} else {
|
||||
avatarImageView.setBackgroundColor(Color.LTGRAY);
|
||||
imageView.setBackgroundColor(Color.LTGRAY);
|
||||
}
|
||||
}
|
||||
|
||||
private void loadGiftImage(String giftImageUrl) {
|
||||
private void loadGiftImage(ImageView imageView, String giftImageUrl) {
|
||||
if (giftImageUrl != null && !giftImageUrl.isEmpty()) {
|
||||
// 使用图片加载库
|
||||
// Glide.with(getContext()).load(giftImageUrl).into(giftImageView);
|
||||
|
||||
// 临时用颜色代替
|
||||
// giftImageView.setBackgroundColor(getRandomColor());
|
||||
ImageUtils.loadHeadCC(giftImageUrl, giftImageView);
|
||||
ImageUtils.loadHeadCC(giftImageUrl, imageView);
|
||||
} else {
|
||||
giftImageView.setBackgroundColor(Color.parseColor("#FFA500"));
|
||||
imageView.setBackgroundColor(Color.parseColor("#FFA500"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,12 +203,12 @@ public class GiftDisplayView extends FrameLayout {
|
||||
// 更新数量显示
|
||||
countTextView.setText("x" + gift.getNumber());
|
||||
|
||||
if (senderTextView.getText().toString().isEmpty()){
|
||||
senderTextView.setText(gift.getNickname()!=null ? gift.getNickname() : "未知用户");
|
||||
if (senderTextView.getText().toString().isEmpty()) {
|
||||
senderTextView.setText(gift.getNickname() != null ? gift.getNickname() : "未知用户");
|
||||
}
|
||||
|
||||
if (giftTextView.getText().toString().isEmpty()){
|
||||
giftTextView.setText("送给 "+(gift.getSenderName() != null ? gift.getSenderName() : "未知用户") + (gift.getGift_name() != null ? gift.getGift_name() : "礼物"));
|
||||
if (giftTextView.getText().toString().isEmpty()) {
|
||||
giftTextView.setText("送给 " + (gift.getSenderName() != null ? gift.getSenderName() : "未知用户") + (gift.getGift_name() != null ? gift.getGift_name() : "礼物"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -277,6 +277,8 @@ public abstract class BaseWheatView extends ConstraintLayout implements IBaseWhe
|
||||
|
||||
@Override
|
||||
public void onComplete(@NotNull SVGAVideoEntity svgaVideoEntity) {
|
||||
if (mIvRipple == null)
|
||||
return;
|
||||
SVGADrawable drawable = new SVGADrawable(svgaVideoEntity);
|
||||
mIvRipple.setImageDrawable(drawable);
|
||||
mIvRipple.startAnimation();
|
||||
@@ -322,6 +324,8 @@ public abstract class BaseWheatView extends ConstraintLayout implements IBaseWhe
|
||||
|
||||
@Override
|
||||
public void onComplete(@NotNull SVGAVideoEntity svgaVideoEntity) {
|
||||
if (mIvRipple == null)
|
||||
return;
|
||||
SVGADrawable drawable = new SVGADrawable(svgaVideoEntity);
|
||||
mIvRipple.setImageDrawable(drawable);
|
||||
mIvRipple.startAnimation();
|
||||
@@ -354,6 +358,8 @@ public abstract class BaseWheatView extends ConstraintLayout implements IBaseWhe
|
||||
@Override
|
||||
public void pkOffSide(int uid) {
|
||||
if (String.valueOf(uid).equals(pitBean.getUser_id())) {
|
||||
if (mIvRipple == null)
|
||||
return;
|
||||
mIvRipple.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,8 +61,10 @@ public class RoomDefaultWheatView extends BaseWheatView {
|
||||
sex = bean.getSex();
|
||||
if (isOn()) {
|
||||
//开启声浪
|
||||
mIvRipple.stopAnimation(true);
|
||||
mIvRipple.setVisibility(VISIBLE);
|
||||
if (mIvRipple != null) {
|
||||
mIvRipple.stopAnimation(true);
|
||||
mIvRipple.setVisibility(VISIBLE);
|
||||
}
|
||||
mTvName.setText(bean.getNickname());
|
||||
ImageUtils.loadHeadCC(bean.getAvatar(), mRiv);
|
||||
if (TextUtils.isEmpty(pitBean.getDress())) {
|
||||
@@ -100,8 +102,10 @@ public class RoomDefaultWheatView extends BaseWheatView {
|
||||
mIvFrame.setVisibility(INVISIBLE);
|
||||
mIvFace.remove();
|
||||
//停止声浪
|
||||
mIvRipple.stopAnimation( true);
|
||||
mIvRipple.setVisibility(GONE);
|
||||
if (mIvRipple != null) {
|
||||
mIvRipple.stopAnimation(true);
|
||||
mIvRipple.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
if (showSexIcon) {
|
||||
checkSex();
|
||||
@@ -236,6 +240,7 @@ public class RoomDefaultWheatView extends BaseWheatView {
|
||||
|
||||
@Override
|
||||
public void onLocalSoundLevelUpdate(int volume) {
|
||||
if (mIvRipple == null) return;
|
||||
if (volume == 0) {
|
||||
mIvRipple.stopAnimation( true);
|
||||
} else {
|
||||
|
||||
@@ -91,8 +91,10 @@ public class RoomFriendshipWheatView extends BaseWheatView {
|
||||
sex = bean.getSex();
|
||||
if (isOn()) {
|
||||
//开启声浪
|
||||
mIvRipple.stopAnimation(true);
|
||||
mIvRipple.setVisibility(VISIBLE);
|
||||
if (mIvRipple != null) {
|
||||
mIvRipple.stopAnimation(true);
|
||||
mIvRipple.setVisibility(VISIBLE);
|
||||
}
|
||||
mTvName.setText(bean.getNickname());
|
||||
ImageUtils.loadHeadCC(bean.getAvatar(), mRiv);
|
||||
if (TextUtils.isEmpty(pitBean.getDress())) {
|
||||
@@ -129,8 +131,10 @@ public class RoomFriendshipWheatView extends BaseWheatView {
|
||||
mIvFrame.setVisibility(INVISIBLE);
|
||||
mIvFace.remove();
|
||||
//停止声浪
|
||||
mIvRipple.stopAnimation( true);
|
||||
mIvRipple.setVisibility(GONE);
|
||||
if (mIvRipple != null) {
|
||||
mIvRipple.stopAnimation(true);
|
||||
mIvRipple.setVisibility(GONE);
|
||||
}
|
||||
mCharmView.setVisibility(GONE);
|
||||
}
|
||||
if (showSexIcon) {
|
||||
|
||||
@@ -74,8 +74,10 @@ public class RoomKtvWheatView extends BaseWheatView {
|
||||
sex = bean.getSex();
|
||||
if (isOn()) {
|
||||
//开启声浪
|
||||
mIvRipple.stopAnimation(true);
|
||||
mIvRipple.setVisibility(VISIBLE);
|
||||
if (mCharmView != null) {
|
||||
mIvRipple.stopAnimation(true);
|
||||
mIvRipple.setVisibility(VISIBLE);
|
||||
}
|
||||
mTvName.setText(bean.getNickname());
|
||||
ImageUtils.loadHeadCC(bean.getAvatar(), mRiv);
|
||||
if (TextUtils.isEmpty(pitBean.getDress())) {
|
||||
@@ -115,8 +117,10 @@ public class RoomKtvWheatView extends BaseWheatView {
|
||||
mIvFrame.setVisibility(INVISIBLE);
|
||||
mIvFace.remove();
|
||||
//停止声浪
|
||||
mIvRipple.stopAnimation(true);
|
||||
mIvRipple.setVisibility(GONE);
|
||||
if (mIvRipple != null) {
|
||||
mIvRipple.stopAnimation(true);
|
||||
mIvRipple.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
if (showSexIcon) {
|
||||
checkSex();
|
||||
@@ -236,6 +240,7 @@ public class RoomKtvWheatView extends BaseWheatView {
|
||||
|
||||
@Override
|
||||
public void onLocalSoundLevelUpdate(int volume) {
|
||||
if (mIvRipple == null) return;
|
||||
if (volume==0){
|
||||
mIvRipple.stopAnimation(true);
|
||||
} else {
|
||||
|
||||
@@ -20,7 +20,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;//显示老板标识
|
||||
@@ -44,12 +44,12 @@ public class RoomMakeWheatView extends BaseWheatView {
|
||||
protected void initPit(Context context, AttributeSet attrs) {
|
||||
TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.RoomMakeWheatView);
|
||||
pitNumber = typedArray.getString(R.styleable.RoomMakeWheatView_room_make_wheat_number);
|
||||
pitImageVId=typedArray.getResourceId(R.styleable.RoomMakeWheatView_room_make_pic, 0);
|
||||
pitImageVId = typedArray.getResourceId(R.styleable.RoomMakeWheatView_room_make_pic, 0);
|
||||
typedArray.recycle();
|
||||
mIvTagBoss = findViewById(R.id.iv_tag_boos);
|
||||
mTvTime = findViewById(R.id.tv_time);
|
||||
// iv_on_line=findViewById(R.id.iv_online);
|
||||
iv_tag_type=findViewById(R.id.iv_tag_type);
|
||||
iv_tag_type = findViewById(R.id.iv_tag_type);
|
||||
mCharmView = findViewById(R.id.charm_view);
|
||||
mRiv.setImageResource(pitImageVId);
|
||||
|
||||
@@ -83,7 +83,9 @@ public class RoomMakeWheatView extends BaseWheatView {
|
||||
|
||||
|
||||
}
|
||||
|
||||
private OnClickListener onWholeViewClickListener;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.room_view_make_wheat;
|
||||
@@ -94,13 +96,16 @@ public class RoomMakeWheatView extends BaseWheatView {
|
||||
iv_zhul.setVisibility(show ? VISIBLE : GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setPitData(RoomPitBean bean) {
|
||||
sex = bean.getSex();
|
||||
if (isOn()) {
|
||||
//开启声浪
|
||||
mIvRipple.stopAnimation(true);
|
||||
mIvRipple.setVisibility(VISIBLE);
|
||||
if (mIvRipple != null) {
|
||||
mIvRipple.stopAnimation(true);
|
||||
mIvRipple.setVisibility(VISIBLE);
|
||||
}
|
||||
mTvName.setText(bean.getNickname());
|
||||
ImageUtils.loadHeadCC(bean.getAvatar(), mRiv);
|
||||
if (TextUtils.isEmpty(pitBean.getDress())) {
|
||||
@@ -114,24 +119,26 @@ public class RoomMakeWheatView extends BaseWheatView {
|
||||
mIvTagBoss.setVisibility(GONE);
|
||||
}
|
||||
} else {
|
||||
mTvName.setText((!"8".equals(pitBean.getPit_number()) && !"9".equals(pitBean.getPit_number()))? pitBean.getPit_number() : "");
|
||||
mTvName.setText((!"8".equals(pitBean.getPit_number()) && !"9".equals(pitBean.getPit_number())) ? pitBean.getPit_number() : "");
|
||||
//麦位上锁
|
||||
//麦位上锁
|
||||
if (showBoss && WHEAT_BOSS.equals(pitNumber)) {
|
||||
mIvTagBoss.setVisibility(VISIBLE);
|
||||
ImageUtils.loadRes(isLocked() ? R.mipmap.room_ic_wheat_default_suo : R.mipmap.room_ic_wheat_default, mRiv);
|
||||
} else {
|
||||
mRiv.setImageResource(bean.getIs_lock()==1 ? R.mipmap.room_ic_wheat_default_suo : R.mipmap.room_ic_wheat_default);
|
||||
mRiv.setImageResource(bean.getIs_lock() == 1 ? R.mipmap.room_ic_wheat_default_suo : R.mipmap.room_ic_wheat_default);
|
||||
}
|
||||
if (isMute()){
|
||||
if (isMute()) {
|
||||
ImageUtils.loadRes(R.mipmap.room_microphone_off, mIvSex);
|
||||
}
|
||||
mIvFrame.stopAll();
|
||||
mIvFrame.setVisibility(INVISIBLE);
|
||||
mIvFace.remove();
|
||||
//停止声浪
|
||||
mIvRipple.stopAnimation(true);
|
||||
mIvRipple.setVisibility(GONE);
|
||||
if (mIvRipple != null) {
|
||||
mIvRipple.stopAnimation(true);
|
||||
mIvRipple.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
if (showSexIcon) {
|
||||
checkSex();
|
||||
@@ -141,25 +148,25 @@ public class RoomMakeWheatView extends BaseWheatView {
|
||||
// }else {
|
||||
// iv_on_line.setVisibility(GONE);
|
||||
// }
|
||||
if (pitBean.getPit_number().equals("888")){
|
||||
if (pitBean.getPit_number().equals("888")) {
|
||||
iv_tag_type.setVisibility(GONE);
|
||||
mCharmView.setVisibility(GONE);
|
||||
mTvName.setText(pitBean.getNickname()!=null && !pitBean.getNickname().equals("")?pitBean.getNickname():"拍卖者");
|
||||
mTvName.setText(pitBean.getNickname() != null && !pitBean.getNickname().equals("") ? pitBean.getNickname() : "拍卖者");
|
||||
mTvName.setBackgroundResource(com.xscm.moduleutil.R.mipmap.za_maiw_b);
|
||||
}else if (pitBean.getPit_number().equals("9")){
|
||||
} else if (pitBean.getPit_number().equals("9")) {
|
||||
iv_tag_type.setVisibility(VISIBLE);
|
||||
mCharmView.setVisibility(GONE);
|
||||
}else if (pitBean.getPit_number().equals("111") || pitBean.getPit_number().equals("222")|| pitBean.getPit_number().equals("333")){
|
||||
} else if (pitBean.getPit_number().equals("111") || pitBean.getPit_number().equals("222") || pitBean.getPit_number().equals("333")) {
|
||||
iv_tag_type.setVisibility(GONE);
|
||||
mTvName.setVisibility(GONE);
|
||||
mCharmView.setVisibility(GONE);
|
||||
if (pitBean.getUser_id()==null || pitBean.getUser_id().equals("0") ||pitBean.getUser_id().isEmpty()){
|
||||
if (pitBean.getUser_id() == null || pitBean.getUser_id().equals("0") || pitBean.getUser_id().isEmpty()) {
|
||||
mTvTime.setVisibility(GONE);
|
||||
}else {
|
||||
} else {
|
||||
mTvTime.setVisibility(VISIBLE);
|
||||
}
|
||||
mTvTime.setText(StringUtil.toWan2(pitBean.getCharm(),1));
|
||||
}else if (pitBean.getPit_number().equals("000")){
|
||||
mTvTime.setText(StringUtil.toWan2(pitBean.getCharm(), 1));
|
||||
} else if (pitBean.getPit_number().equals("000")) {
|
||||
iv_tag_type.setVisibility(GONE);
|
||||
mCharmView.setVisibility(GONE);
|
||||
}
|
||||
@@ -176,20 +183,23 @@ public class RoomMakeWheatView extends BaseWheatView {
|
||||
|
||||
}
|
||||
|
||||
public void setmTvTime(String charm){
|
||||
mTvTime.setText(StringUtil.toWan2(pitBean.getCharm(),1));
|
||||
public void setmTvTime(String charm) {
|
||||
mTvTime.setText(StringUtil.toWan2(pitBean.getCharm(), 1));
|
||||
}
|
||||
|
||||
private onCharmClickListener mOnCharmClickListener;
|
||||
//
|
||||
|
||||
//
|
||||
public void setmOnCharmClickListener(onCharmClickListener mOnCharmClickListener) {
|
||||
this.mOnCharmClickListener = mOnCharmClickListener;
|
||||
}
|
||||
//
|
||||
public interface onCharmClickListener{
|
||||
|
||||
//
|
||||
public interface onCharmClickListener {
|
||||
void onCharmClick(RoomMakeWheatView view, RoomPitBean pitBean);
|
||||
}
|
||||
public void setChe(String che){
|
||||
|
||||
public void setChe(String che) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -109,7 +109,9 @@ public class RoomSingSongWheatView extends BaseWheatView {
|
||||
mIvFrame.stopAll();
|
||||
mIvFrame.setVisibility(INVISIBLE);
|
||||
mIvFace.remove();
|
||||
mIvRipple.setVisibility(GONE);
|
||||
if (mIvRipple != null) {
|
||||
mIvRipple.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
|
||||
private String getPitNumberText() {
|
||||
|
||||
@@ -23,6 +23,7 @@ import com.hjq.toast.ToastUtils;
|
||||
import com.xscm.moduleutil.R;
|
||||
import com.xscm.moduleutil.adapter.GiftTwoDetailsFragment;
|
||||
import com.xscm.moduleutil.base.BaseMvpDialogFragment;
|
||||
import com.xscm.moduleutil.base.CommonAppContext;
|
||||
import com.xscm.moduleutil.bean.GiftLabelBean;
|
||||
import com.xscm.moduleutil.bean.GiftNumBean;
|
||||
import com.xscm.moduleutil.bean.GiftPackBean;
|
||||
@@ -112,7 +113,7 @@ public class RewardGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPr
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
mBinding.recycleView.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false));
|
||||
mBinding.recycleView.setLayoutManager(new LinearLayoutManager(CommonAppContext.getInstance(), LinearLayoutManager.HORIZONTAL, false));
|
||||
adapter = new BaseQuickAdapter<RewardUserBean, BaseViewHolder>(com.xscm.moduleutil.R.layout.item_reward1, null) {
|
||||
@Override
|
||||
protected void convert(BaseViewHolder helper, RewardUserBean item) {
|
||||
|
||||
@@ -1,80 +1,76 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
>
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_45"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:src="@drawable/gift_background"
|
||||
android:scaleType="fitCenter"/>
|
||||
android:id="@+id/im"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_45"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/gift_background"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.xscm.moduleutil.widget.GifAvatarOvalView
|
||||
android:id="@+id/iv_avatar"
|
||||
android:layout_width="@dimen/dp_30"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:layout_margin="@dimen/dp_4"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_constraintStart_toStartOf="@+id/im"
|
||||
app:layout_constraintTop_toTopOf="@+id/im"
|
||||
app:layout_constraintBottom_toBottomOf="@id/im"
|
||||
tools:src="@drawable/ic_launcher_background"/>
|
||||
android:id="@+id/iv_avatar"
|
||||
android:layout_width="@dimen/dp_30"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:layout_margin="@dimen/dp_4"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_constraintBottom_toBottomOf="@id/im"
|
||||
app:layout_constraintStart_toStartOf="@+id/im"
|
||||
app:layout_constraintTop_toTopOf="@+id/im"
|
||||
tools:src="@drawable/ic_launcher_background" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_sender"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textStyle="bold"
|
||||
tools:text="1111111"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_avatar"
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_avatar"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
/>
|
||||
android:id="@+id/tv_sender"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_avatar"
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_avatar"
|
||||
tools:text="1111111" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_gift"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#fff"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_sender"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_sender"
|
||||
tools:text="1111111"
|
||||
/>
|
||||
android:id="@+id/tv_gift"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#fff"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_sender"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_sender"
|
||||
tools:text="1111111" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_gift"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_sender"
|
||||
app:layout_constraintEnd_toEndOf="@id/im"
|
||||
/>
|
||||
android:id="@+id/iv_gift"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_constraintEnd_toEndOf="@id/im"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_sender" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:gravity="center"
|
||||
android:textColor="#FFF49F"
|
||||
android:fontFamily="@font/semibold"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/im"
|
||||
tools:text="X14"/>
|
||||
android:id="@+id/tv_count"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="40dp"
|
||||
android:fontFamily="@font/semibold"
|
||||
android:gravity="start|center_vertical"
|
||||
android:textColor="#FFF49F"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/im"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="X14" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
Reference in New Issue
Block a user