1:修改礼物展示幸运币的简介
BIN
BaseModule/src/main/res/mipmap-hdpi/gift_mh.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
BaseModule/src/main/res/mipmap-hdpi/gift_xyb.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/gift_mh.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/gift_xyb.png
Normal file
|
After Width: | Height: | Size: 58 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/gift_mh.png
Normal file
|
After Width: | Height: | Size: 114 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/gift_xyb.png
Normal file
|
After Width: | Height: | Size: 112 KiB |
|
Before Width: | Height: | Size: 13 KiB |
@@ -314,8 +314,8 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
String pitNumber = bean.getPit_number();
|
||||
if (!added.contains(pitNumber)
|
||||
&& !bean.getUser_id().isEmpty()
|
||||
&&!bean.getUser_id().equals("0")
|
||||
&&!bean.getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
&& !bean.getUser_id().equals("0")
|
||||
&& !bean.getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
|
||||
RewardUserBean rewardUserBean = new RewardUserBean();
|
||||
rewardUserBean.setUser_id(bean.getUser_id());
|
||||
@@ -430,7 +430,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
giveGift(giftNumber);
|
||||
}
|
||||
} else if (view1.getId() == R.id.cz) {
|
||||
RechargeDialogFragment.show(roomId, null, getActivity().getSupportFragmentManager(),"","");
|
||||
RechargeDialogFragment.show(roomId, null, getActivity().getSupportFragmentManager(), "", "");
|
||||
dismiss();
|
||||
} else if (view1.getId() == R.id.tv_all_wheat) {//全麦
|
||||
if (all) {
|
||||
@@ -445,7 +445,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
oldSelectedIds.addAll(gifyuseradapter.getAllSelectedIds());
|
||||
} else if (view1.getId() == R.id.tv_bb_qs) {
|
||||
int count = gifyuseradapter.getSelectCount();
|
||||
if (count <=0) {
|
||||
if (count <= 0) {
|
||||
ToastUtils.show("请选择打赏的用户");
|
||||
return;
|
||||
}
|
||||
@@ -455,7 +455,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
}
|
||||
if (userInfo != null) {
|
||||
if (userInfo.getAuction_id() != null) {
|
||||
auction_id =userInfo.getAuction_id();
|
||||
auction_id = userInfo.getAuction_id();
|
||||
} else {
|
||||
auction_id = "";
|
||||
}
|
||||
@@ -463,6 +463,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
queren();
|
||||
}
|
||||
}
|
||||
|
||||
private void queren() {
|
||||
// 创建并显示确认对话框
|
||||
new ConfirmDialog(ActivityUtils.getTopActivity(),
|
||||
@@ -478,6 +479,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
// 点击“取消”按钮时什么都不做
|
||||
}, false, 0).show();
|
||||
}
|
||||
|
||||
private String giftNumber = "";
|
||||
private RoomGiftGiveEvent roomGiftGiveEvent;
|
||||
|
||||
@@ -492,7 +494,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void userRefresh(GiftUserRefreshEvent event) {
|
||||
if (event.gift == null || event.gift.getRule() == null) {
|
||||
if (event.gift == null || event.gift.getRule() == null || event.gift.getGift_bag_name() == null) {
|
||||
mBinding.llGiftRule.setVisibility(View.GONE);
|
||||
} else {
|
||||
if (event.gift.getActivities_id() == 5) {
|
||||
@@ -512,7 +514,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
|
||||
private void showGiftLotteryDialog(RoonGiftModel gift, String roomId) {
|
||||
String userId = gifyuseradapter.getUserIdToString();
|
||||
if ((userId == null || userId.isEmpty()) && gift.getGift_bag()==10) {
|
||||
if ((userId == null || userId.isEmpty()) && gift.getGift_bag() == 10) {
|
||||
ToastUtils.show("请先选择人员");
|
||||
gift.setChecked(false);
|
||||
|
||||
@@ -529,14 +531,14 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
|
||||
FragmentManager fm = getParentFragmentManager();
|
||||
if (fm != null && !fm.isDestroyed()) {
|
||||
if (jingp==1){
|
||||
auction_id= userInfo.getAuction_id() ;
|
||||
if (jingp == 1) {
|
||||
auction_id = userInfo.getAuction_id();
|
||||
}
|
||||
if (auction_id==null || auction_id.isEmpty()){
|
||||
auction_id="";
|
||||
if (auction_id == null || auction_id.isEmpty()) {
|
||||
auction_id = "";
|
||||
}
|
||||
GiftLotteryDialog newDialog = GiftLotteryDialog.newInstance(
|
||||
String.valueOf(gift.getGift_bag()), roomId, userId, heart_id,auction_id);
|
||||
String.valueOf(gift.getGift_bag()), roomId, userId, heart_id, auction_id);
|
||||
newDialog.show(fm, "GiftLotteryDialog");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@@ -557,6 +559,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
if (giftDetailResp == null) {
|
||||
return;
|
||||
}
|
||||
mBinding.llGiftRule.setBackgroundResource(com.xscm.moduleutil.R.mipmap.gift_mh);
|
||||
mBinding.tvTitle.setText(giftDetailResp.getGift_bag_name());
|
||||
mBinding.tvIntroduce.setText(giftDetailResp.getRule());
|
||||
mBinding.ivWf.setOnClickListener(new View.OnClickListener() {
|
||||
@@ -566,10 +569,8 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
|
||||
Intent intent = new Intent(getActivity(), WebViewActivity.class);
|
||||
intent.putExtra("url", giftDetailResp.getRule_url());
|
||||
intent.putExtra("title", "盲盒规则");
|
||||
intent.putExtra("title", giftDetailResp.getGift_bag_name() + "规则");
|
||||
startActivity(intent);
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
@@ -622,7 +623,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
// return;
|
||||
// }
|
||||
// } else {
|
||||
if (roonGiftModel == null|| roonGiftModel.getGift_id() == null || !roonGiftModel.isChecked() ) {
|
||||
if (roonGiftModel == null || roonGiftModel.getGift_id() == null || !roonGiftModel.isChecked()) {
|
||||
ToastUtils.show("请选择礼物");
|
||||
return;
|
||||
}
|
||||
@@ -676,18 +677,18 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
roomGiftGiveEvent = new RoomGiftGiveEvent(userId, roomId, pit, num, 0, null, roonGiftModel, heart_id, "");
|
||||
}
|
||||
} else if (currentItem == 0) {
|
||||
if (userInfo==null){
|
||||
if (userInfo == null) {
|
||||
giftNumber = num;
|
||||
beibaoId = roonGiftModel.getGift_id();
|
||||
MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "2", pit, heart_id);
|
||||
return;
|
||||
}
|
||||
if ( userInfo.getPit_number()!=null&& userInfo.getPit_number().equals("888") || userInfo.getPit_number().equals("")) {
|
||||
if (userInfo.getPit_number() != null && userInfo.getPit_number().equals("888") || userInfo.getPit_number().equals("")) {
|
||||
if (userInfo.getPit_number().isEmpty() || jingp != 1) {
|
||||
giftNumber = num;
|
||||
beibaoId = roonGiftModel.getGift_id();
|
||||
MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "2", pit, heart_id);
|
||||
}else {
|
||||
} else {
|
||||
beibaoId = roonGiftModel.getGift_id();
|
||||
MvpPre.roomAuctionJoin(userInfo.getAuction_id(), userInfo.getUser_id() + "", roonGiftModel.getGift_id(), num, "2");
|
||||
roomGiftGiveEvent = new RoomGiftGiveEvent(userId, roomId, pit, num, 0, null, roonGiftModel, heart_id, userInfo.getAuction_id());
|
||||
@@ -695,7 +696,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
roomGiftGiveEvent = null;
|
||||
// dismiss();
|
||||
}
|
||||
} else{
|
||||
} else {
|
||||
giftNumber = num;
|
||||
beibaoId = roonGiftModel.getGift_id();
|
||||
MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "2", pit, heart_id);
|
||||
@@ -752,9 +753,9 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
giftLabelBean.setName("背包");
|
||||
giftLabelBeans.add(0, giftLabelBean);
|
||||
|
||||
if (SpUtil.getShelf()==1){
|
||||
for (GiftLabelBean giftLabelBean1 : giftLabelBeans){
|
||||
if (giftLabelBean1.getId().equals("2")){
|
||||
if (SpUtil.getShelf() == 1) {
|
||||
for (GiftLabelBean giftLabelBean1 : giftLabelBeans) {
|
||||
if (giftLabelBean1.getId().equals("2")) {
|
||||
giftLabelBeans.remove(giftLabelBean1);
|
||||
break;
|
||||
}
|
||||
@@ -765,7 +766,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
mBinding.viewPager.setOffscreenPageLimit(0);
|
||||
mBinding.slidingTabLayout.setViewPager(mBinding.viewPager);
|
||||
mBinding.slidingTabLayout.setCurrentTab(1);
|
||||
refreshCurrentGiftFragment(giftLabelBeans.get(1).getId(),1,roomId);
|
||||
refreshCurrentGiftFragment(giftLabelBeans.get(1).getId(), 1, roomId);
|
||||
mBinding.viewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
||||
@Override
|
||||
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
|
||||
@@ -776,7 +777,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
public void onPageSelected(int position) {
|
||||
// 当页面切换时,控制 tv_bb_qs 按钮的显示
|
||||
updateTvBbQsVisibility(position);
|
||||
refreshCurrentGiftFragment(giftLabelBeans.get(position).getId(),1,roomId);
|
||||
refreshCurrentGiftFragment(giftLabelBeans.get(position).getId(), 1, roomId);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -787,10 +788,11 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
// 初始化时设置按钮可见性
|
||||
updateTvBbQsVisibility(1);
|
||||
}
|
||||
|
||||
// 调用示例
|
||||
private void refreshCurrentGiftFragment(String id,int type,String roomId) {
|
||||
if (getCurrentGiftFragment()!=null){
|
||||
getCurrentGiftFragment().loadDataIfNeeded(id,type,roomId);
|
||||
private void refreshCurrentGiftFragment(String id, int type, String roomId) {
|
||||
if (getCurrentGiftFragment() != null) {
|
||||
getCurrentGiftFragment().loadDataIfNeeded(id, type, roomId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -838,7 +840,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
// dismiss();
|
||||
|
||||
if (mBinding.viewPager.getCurrentItem() == 0) {
|
||||
if (MvpPre!=null) {
|
||||
if (MvpPre != null) {
|
||||
MvpPre.getGiftPackListCount();
|
||||
}
|
||||
GiftPackEvent giftPackEvent = new GiftPackEvent();
|
||||
@@ -876,7 +878,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
roomGiftGiveEvent = null;
|
||||
// dismiss();
|
||||
}
|
||||
if (mBinding.viewPager.getCurrentItem()==0) {
|
||||
if (mBinding.viewPager.getCurrentItem() == 0) {
|
||||
GiftPackEvent giftPackEvent = new GiftPackEvent();
|
||||
giftPackEvent.setBdid(beibaoId);
|
||||
EventBus.getDefault().post(giftPackEvent);
|
||||
@@ -902,7 +904,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
|
||||
@Override
|
||||
public void getGiftPackListCount(GiftPackListCount giftPackListCount) {
|
||||
if (giftPackListCount != null){
|
||||
if (giftPackListCount != null) {
|
||||
mBinding.tvRewardGift.setText(giftPackListCount.getCount());
|
||||
}
|
||||
}
|
||||
|
||||