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()) {
|
||||
//开启声浪
|
||||
if (mIvRipple != null) {
|
||||
mIvRipple.stopAnimation(true);
|
||||
mIvRipple.setVisibility(VISIBLE);
|
||||
}
|
||||
mTvName.setText(bean.getNickname());
|
||||
ImageUtils.loadHeadCC(bean.getAvatar(), mRiv);
|
||||
if (TextUtils.isEmpty(pitBean.getDress())) {
|
||||
@@ -100,9 +102,11 @@ public class RoomDefaultWheatView extends BaseWheatView {
|
||||
mIvFrame.setVisibility(INVISIBLE);
|
||||
mIvFace.remove();
|
||||
//停止声浪
|
||||
mIvRipple.stopAnimation( true);
|
||||
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()) {
|
||||
//开启声浪
|
||||
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);
|
||||
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()) {
|
||||
//开启声浪
|
||||
if (mCharmView != null) {
|
||||
mIvRipple.stopAnimation(true);
|
||||
mIvRipple.setVisibility(VISIBLE);
|
||||
}
|
||||
mTvName.setText(bean.getNickname());
|
||||
ImageUtils.loadHeadCC(bean.getAvatar(), mRiv);
|
||||
if (TextUtils.isEmpty(pitBean.getDress())) {
|
||||
@@ -115,9 +117,11 @@ public class RoomKtvWheatView extends BaseWheatView {
|
||||
mIvFrame.setVisibility(INVISIBLE);
|
||||
mIvFace.remove();
|
||||
//停止声浪
|
||||
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()) {
|
||||
//开启声浪
|
||||
if (mIvRipple != null) {
|
||||
mIvRipple.stopAnimation(true);
|
||||
mIvRipple.setVisibility(VISIBLE);
|
||||
}
|
||||
mTvName.setText(bean.getNickname());
|
||||
ImageUtils.loadHeadCC(bean.getAvatar(), mRiv);
|
||||
if (TextUtils.isEmpty(pitBean.getDress())) {
|
||||
@@ -114,25 +119,27 @@ 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();
|
||||
//停止声浪
|
||||
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,8 +109,10 @@ public class RoomSingSongWheatView extends BaseWheatView {
|
||||
mIvFrame.stopAll();
|
||||
mIvFrame.setVisibility(INVISIBLE);
|
||||
mIvFace.remove();
|
||||
if (mIvRipple != null) {
|
||||
mIvRipple.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
|
||||
private String getPitNumberText() {
|
||||
if ("-1".equals(pitNumber)) return "";
|
||||
|
||||
@@ -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,20 +1,19 @@
|
||||
<?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"
|
||||
>
|
||||
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:scaleType="fitCenter"
|
||||
android:src="@drawable/gift_background"
|
||||
android:scaleType="fitCenter"/>
|
||||
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"
|
||||
@@ -22,23 +21,22 @@
|
||||
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"
|
||||
app:layout_constraintBottom_toBottomOf="@id/im"
|
||||
tools:src="@drawable/ic_launcher_background"/>
|
||||
tools:src="@drawable/ic_launcher_background" />
|
||||
|
||||
<TextView
|
||||
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"
|
||||
tools:text="1111111"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_avatar"
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_avatar"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
/>
|
||||
tools:text="1111111" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_gift"
|
||||
@@ -48,8 +46,7 @@
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_sender"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_sender"
|
||||
tools:text="1111111"
|
||||
/>
|
||||
tools:text="1111111" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_gift"
|
||||
@@ -58,23 +55,22 @@
|
||||
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"
|
||||
/>
|
||||
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: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_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/im"
|
||||
tools:text="X14"/>
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="X14" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -4027,8 +4027,6 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
GiftDisplayManager.getInstance().clearAll()
|
||||
mBinding!!.giftContainer.removeAllViews()
|
||||
CommonAppContext.getInstance().isMai = false
|
||||
CommonAppContext.getInstance().playId = null
|
||||
|
||||
// 确保父类的 onDestroy 被调用
|
||||
super.finish()
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import androidx.annotation.Nullable;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.xscm.modulemain.Application;
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.modulemain.adapter.RankingCharmListAdapter;
|
||||
import com.xscm.modulemain.databinding.RoomRankingChildBinding;
|
||||
@@ -215,7 +216,7 @@ public class RankingChildFragment extends BaseMvpFragment<DataListPresenter, Roo
|
||||
|
||||
for (String url : images) {
|
||||
if (url.contains("http")) {
|
||||
ImageView imageView1 = new ImageView(getContext());
|
||||
ImageView imageView1 = new ImageView(Application.getInstance());
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_57),
|
||||
getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_15)
|
||||
|
||||
@@ -11,6 +11,8 @@ import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.blankj.utilcode.util.ActivityUtils;
|
||||
import com.xscm.modulemain.Application;
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.modulemain.adapter.RelationshipAdapter;
|
||||
import com.xscm.modulemain.databinding.FragmentRelationshipBinding;
|
||||
@@ -84,7 +86,7 @@ public class RelationshipFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
private void queren(int type, int id, String num) {
|
||||
if (type == 1) {
|
||||
// 创建并显示确认对话框
|
||||
new ConfirmDialog(getActivity(),
|
||||
new ConfirmDialog(ActivityUtils.getTopActivity(),
|
||||
"提示",
|
||||
"您确定要置顶本关系吗?",
|
||||
"确认",
|
||||
|
||||
@@ -16,10 +16,12 @@ import android.view.View;
|
||||
|
||||
import androidx.core.app.NotificationManagerCompat;
|
||||
|
||||
import com.blankj.utilcode.util.ActivityUtils;
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.blankj.utilcode.util.TimeUtils;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.orhanobut.logger.Logger;
|
||||
import com.xscm.modulemain.Application;
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.modulemain.activity.room.activity.RoomActivity;
|
||||
import com.xscm.modulemain.activity.room.contacts.RoomCabinContacts;
|
||||
@@ -105,7 +107,7 @@ public class RoomCabinFragment extends BaseRoomFragment<RoomCabinPresenter, Room
|
||||
return;
|
||||
}
|
||||
Log.d("RoomCabinFragment", "Notifications not enable!");
|
||||
new AlertDialog.Builder(getActivity())
|
||||
new AlertDialog.Builder(ActivityUtils.getTopActivity())
|
||||
.setTitle("提示")
|
||||
.setMessage("请打开通知权限,防止后台共享屏幕中断")
|
||||
.setPositiveButton("设置", (dialog, which) -> {
|
||||
|
||||
@@ -315,8 +315,6 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
|
||||
/// 给子fragment传递参数
|
||||
public void updateFriendshipState(int status, int friend_id, long end_time, FriendUserBean friendshipUserBean) {
|
||||
// 保持 tag 使用一致性
|
||||
FriendshipRoomFragment friendshipRoomFragment = findFragmentByTag(FriendshipRoomFragment.class);
|
||||
if (friendshipRoomFragment != null && friendshipRoomFragment.isAdded()) {
|
||||
if (status == FriendshipRoomFragment.FriendshipPartType.WAIT.getValue())
|
||||
friendshipRoomFragment.upDataFriendship(FriendshipRoomFragment.FriendshipPartType.WAIT, friend_id, end_time, friendshipUserBean);
|
||||
|
||||
@@ -9,11 +9,15 @@ import com.xscm.moduleutil.bean.WalletBean;
|
||||
import com.xscm.moduleutil.http.BaseObserver;
|
||||
import com.xscm.moduleutil.presenter.BasePresenter;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
public class MyMoneyPresenter extends BasePresenter<MyMoneyConactos.View> implements MyMoneyConactos.IMePre {
|
||||
MyMoneyConactos.View mView;
|
||||
public MyMoneyPresenter(MyMoneyConactos.View view, Context context) {
|
||||
super(view, context);
|
||||
mView = view;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -26,6 +30,9 @@ public class MyMoneyPresenter extends BasePresenter<MyMoneyConactos.View> implem
|
||||
|
||||
@Override
|
||||
public void onNext(WalletBean walletBean) {
|
||||
if (MvpRef == null){
|
||||
MvpRef = new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().wallet(walletBean);
|
||||
}
|
||||
});
|
||||
@@ -41,6 +48,9 @@ public class MyMoneyPresenter extends BasePresenter<MyMoneyConactos.View> implem
|
||||
|
||||
@Override
|
||||
public void onNext(BindType bindType) {
|
||||
if (MvpRef == null){
|
||||
MvpRef = new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().bindType(bindType);
|
||||
}
|
||||
});
|
||||
@@ -56,6 +66,9 @@ public class MyMoneyPresenter extends BasePresenter<MyMoneyConactos.View> implem
|
||||
|
||||
@Override
|
||||
public void onNext(UserInfo userInfo) {
|
||||
if (MvpRef == null){
|
||||
MvpRef = new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().myInfoSuccess(userInfo);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -21,8 +21,10 @@ import androidx.annotation.Nullable;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
|
||||
import com.blankj.utilcode.util.ActivityUtils;
|
||||
import com.blankj.utilcode.util.GsonUtils;
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.xscm.modulemain.Application;
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.modulemain.databinding.DialogGiftLotteryBinding;
|
||||
import com.xscm.moduleutil.base.BaseMvpDialogFragment;
|
||||
@@ -414,13 +416,13 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("url", getRule_url);
|
||||
bundle.putInt("type", type);
|
||||
WebViewDialog dialog = new WebViewDialog(getActivity(), bundle);
|
||||
WebViewDialog dialog = new WebViewDialog(ActivityUtils.getTopActivity(), bundle);
|
||||
dialog.show();
|
||||
// WebViewDialog webViewDialog = new WebViewDialog(getActivity(), getRule_url);
|
||||
// webViewDialog.show();
|
||||
} else if (id == R.id.tv_jc) {
|
||||
if (giftLists != null && !giftLists.isEmpty()) {
|
||||
PrizePoolDialog prizePoolDialog = new PrizePoolDialog(getActivity());
|
||||
PrizePoolDialog prizePoolDialog = new PrizePoolDialog(ActivityUtils.getTopActivity());
|
||||
prizePoolDialog.updateData(giftLists, type);
|
||||
prizePoolDialog.show();
|
||||
} else {
|
||||
|
||||
@@ -8,8 +8,11 @@ import android.view.*;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.blankj.utilcode.util.ActivityUtils;
|
||||
import com.scwang.smartrefresh.layout.api.RefreshLayout;
|
||||
import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener;
|
||||
import com.xscm.modulemain.Application;
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.modulemain.activity.room.contacts.HourlyChartContacts;
|
||||
import com.xscm.modulemain.activity.room.presenter.HourlyChartPresenter;
|
||||
@@ -139,7 +142,7 @@ public class HourlyChartDialog extends BaseMvpDialogFragment<HourlyChartPresente
|
||||
mBinding.imHourlyWf.setOnClickListener(v -> {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl() + "api/Page/page_show?id=24");
|
||||
RoomAuctionWebViewDialog dialog = new RoomAuctionWebViewDialog(getActivity(), bundle);
|
||||
RoomAuctionWebViewDialog dialog = new RoomAuctionWebViewDialog(ActivityUtils.getTopActivity(), bundle);
|
||||
dialog.show();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -21,8 +21,10 @@ import androidx.fragment.app.FragmentStatePagerAdapter;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import com.blankj.utilcode.util.ActivityUtils;
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.xscm.modulemain.Application;
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.modulemain.adapter.GiftUserAdapter;
|
||||
import com.xscm.modulemain.databinding.RoomGiftDialogBinding;
|
||||
@@ -463,7 +465,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
}
|
||||
private void queren() {
|
||||
// 创建并显示确认对话框
|
||||
new ConfirmDialog(getActivity(),
|
||||
new ConfirmDialog(ActivityUtils.getTopActivity(),
|
||||
"提示",
|
||||
"是否确认将背包礼物全部送出?",
|
||||
"确认",
|
||||
@@ -736,6 +738,12 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
|
||||
@Override
|
||||
public void getGiftLabel(List<GiftLabelBean> giftLabelBeans) {
|
||||
|
||||
// 3. 回调时校验状态
|
||||
if (!isAdded() || isDetached() || getView() == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (giftLabelBeans == null) return;
|
||||
giftLabelBeanList = new ArrayList<>();
|
||||
giftLabelBeanList.addAll(giftLabelBeans);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.xscm.modulemain.dialog;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.graphics.Typeface;
|
||||
import android.os.Bundle;
|
||||
import android.os.CountDownTimer;
|
||||
@@ -11,12 +10,12 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.LinearSnapHelper;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.blankj.utilcode.util.ActivityUtils;
|
||||
import com.blankj.utilcode.util.GsonUtils;
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.xscm.moduleutil.R;
|
||||
@@ -41,7 +40,6 @@ import com.xscm.moduleutil.dialog.giftLottery.XlhRecordDialog;
|
||||
import com.xscm.moduleutil.widget.CenterScrollHelper;
|
||||
import com.xscm.moduleutil.widget.EqualSpaceItemDecoration;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
@@ -92,11 +90,16 @@ public class TourClubDialogFragment extends BaseMvpDialogFragment<GiftLotteryPre
|
||||
return new GiftLotteryPresenter(this, getActivity());
|
||||
}
|
||||
|
||||
public TourClubDialogFragment(){
|
||||
|
||||
}
|
||||
|
||||
public TourClubDialogFragment(String roomId){
|
||||
this.roomId = roomId;
|
||||
}
|
||||
|
||||
public static TourClubDialogFragment newInstance(String roomId) {
|
||||
TourClubDialogFragment dialog = new TourClubDialogFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putString("roomId", roomId);
|
||||
dialog.setArguments(args);
|
||||
TourClubDialogFragment dialog = new TourClubDialogFragment(roomId);
|
||||
return dialog;
|
||||
}
|
||||
|
||||
@@ -109,12 +112,6 @@ public class TourClubDialogFragment extends BaseMvpDialogFragment<GiftLotteryPre
|
||||
return dialog;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttach(@NonNull Context context) {
|
||||
super.onAttach(context);
|
||||
roomId = getArguments().getString("roomId");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
MvpPre.xlh(roomId);
|
||||
@@ -265,7 +262,7 @@ public class TourClubDialogFragment extends BaseMvpDialogFragment<GiftLotteryPre
|
||||
LogUtils.e("tourClubDFragment","点击了" + viewName );
|
||||
if (id == R.id.tv_jc) {
|
||||
if (giftLists != null && !giftLists.isEmpty()) {
|
||||
PrizePoolDialog prizePoolDialog = new PrizePoolDialog(getActivity());
|
||||
PrizePoolDialog prizePoolDialog = new PrizePoolDialog(ActivityUtils.getTopActivity());
|
||||
prizePoolDialog.updateData(giftLists, 13);
|
||||
prizePoolDialog.show();
|
||||
} else {
|
||||
@@ -305,7 +302,7 @@ public class TourClubDialogFragment extends BaseMvpDialogFragment<GiftLotteryPre
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("url", getRule_url);
|
||||
bundle.putInt("type", 13);
|
||||
WebViewDialog dialog = new WebViewDialog(getActivity(), bundle);
|
||||
WebViewDialog dialog = new WebViewDialog(ActivityUtils.getTopActivity(), bundle);
|
||||
dialog.show();
|
||||
} else if (id == R.id.tv_bd) {
|
||||
// 如果当前dialog存在且正在显示,先关闭
|
||||
@@ -1017,7 +1014,7 @@ public class TourClubDialogFragment extends BaseMvpDialogFragment<GiftLotteryPre
|
||||
// xlhObtainDialog.dismiss();
|
||||
// }
|
||||
// 创建并显示对话框
|
||||
xlhObtainDialog = new XlhObtainDialog(getActivity());
|
||||
xlhObtainDialog = new XlhObtainDialog(ActivityUtils.getTopActivity());
|
||||
xlhObtainDialog.setOnGiftItemClickListener(new XlhObtainDialog.OnGiftItemClickListener() {
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user