diff --git a/live/src/main/java/com/yunbao/live/dialog/LivePrankDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LivePrankDialogFragment.java index 00ffe4b9b..c7de8f06e 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LivePrankDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LivePrankDialogFragment.java @@ -230,7 +230,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O @Override public void onViewClicks() { if ((int) mPrankBtn.getTag() == 0) { - setPrankConfig(); + setPrankConfig(false); } else { setGiftBean(recyclerAdapter.getList(),"0"); } @@ -241,7 +241,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O public void onViewClicks() { if ((int) mPrankBtn.getTag() == 0) { clearPrankConfig(); - setPrankConfig(); + setPrankConfig(true); } else { giftSwitch1Btn.setTag("false"); giftSwitch1Btn.setImageResource(R.mipmap.special_icon_off); @@ -304,7 +304,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O mBtnAddGift.setVisibility(View.VISIBLE); mGiftNotDate.setVisibility(View.VISIBLE); recyclerAdapter.setViewType(LivePrankRecyclerAdapter.TYPE_GIFT); - mPrankBtn.setBackgroundResource(R.drawable.bg_live_prank_gift_set); + mPrankBtn.setBackgroundResource(R.drawable.bg_live_prank_turntable_save); if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { mPrankBtn.setText("添加禮物"); @@ -531,15 +531,17 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O setDate(bean); } - private void setPrankConfig() { - if (StringUtil.isEmpty(bean.getTurntable1(), bean.getTurntable2(), bean.getTurntable3(), bean.getTurntable4(), bean.getTurntable5(), bean.getTurntable6())) { + private void setPrankConfig(boolean isClear) { + if(!isClear){ + if (StringUtil.isEmpty(bean.getTurntable1(), bean.getTurntable2(), bean.getTurntable3(), bean.getTurntable4(), bean.getTurntable5(), bean.getTurntable6())) { - if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { - ToastUtil.show("保存失败:所有转盘位置必填"); - } else { - ToastUtil.show("Save failed: all turntable positions must be filled in"); + if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { + ToastUtil.show("保存失败:所有转盘位置必填"); + } else { + ToastUtil.show("Save failed: all turntable positions must be filled in"); + } + return; } - return; } LiveNetManager.get(mContext).setAnchorPrankTurntable(mLiveUid, bean.getCoin() + "", bean.getTurntable1(), bean.getTurntable2(), bean.getTurntable3(), bean.getTurntable4(), bean.getTurntable5(), bean.getTurntable6(), bean.getStatus() + "", new HttpCallback() { @Override diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index 575ceeb91..0c622695b 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -430,6 +430,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis private LinearLayout prank_top_layout; private ImageView prank_group_top_icon; + private int mPrankType; + private pl.droidsonroids.gif.GifDrawable mGifDrawable; private static boolean isSw; @@ -1721,7 +1723,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis }else{ prankAdapter.showAnView(prankAndComboList,prankAnisShow); prank_group_turntable.setText(WordUtil.isNewZh()?"待完成整蠱":"To do"); - prank_group_title.setText(WordUtil.isNewZh()?"待完成整蠱":"To do"); + prank_group_title.setText(WordUtil.isNewZh()?"整蠱進度":"To do"); } }); @@ -1871,6 +1873,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } //设置整蛊礼物数据 private void setPrankList(int status,int mPrankType,int prankTurntableStatus){ + this.mPrankType =mPrankType; // LogUtils.e("yqw=====>显示转盘icon:是否显示:"+(prankTurntableStatus == 1)+",是否在倒计时"+(lt_trickery.getVisibility() == View.VISIBLE)); if (prankTurntableStatus == 1 && lt_trickery.getVisibility() == View.GONE){ if(CommonAppConfig.getInstance().getUid().equals(mLiveUid)){ @@ -1898,6 +1901,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis prank_top_layout.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { + if(mPrankType!=1){ +return; + } prank_group.setVisibility(View.GONE); prank_small_icon.setVisibility(View.VISIBLE); switchGifDrawable(!completedList.isEmpty()); diff --git a/live/src/main/res/layout/item_live_chat.xml b/live/src/main/res/layout/item_live_chat.xml index c288cf804..906d01b89 100644 --- a/live/src/main/res/layout/item_live_chat.xml +++ b/live/src/main/res/layout/item_live_chat.xml @@ -269,7 +269,7 @@ android:layout_height="26dp" android:layout_gravity="end|center_vertical" android:layout_marginEnd="11dp" - android:text="立即前往" + android:text="@string/prank_im_immediately_go" android:gravity="center" android:textColor="@color/white" android:background="@drawable/prank_msg_goto" diff --git a/live/src/main/res/values-en/strings.xml b/live/src/main/res/values-en/strings.xml index a53b12abe..4e00b21a1 100644 --- a/live/src/main/res/values-en/strings.xml +++ b/live/src/main/res/values-en/strings.xml @@ -145,4 +145,5 @@ + Set other quantity (up to 9999) Trick instructions Entertainment Tricky has been newly upgraded. Go and set up Tricky content to add more fun to the live broadcast room! + Go now \ No newline at end of file diff --git a/live/src/main/res/values/strings.xml b/live/src/main/res/values/strings.xml index d2a5b547c..4421ef568 100644 --- a/live/src/main/res/values/strings.xml +++ b/live/src/main/res/values/strings.xml @@ -142,4 +142,5 @@ 連擊最多優先 整蠱說明 娛樂整蠱全新升級,快去設置整蠱内容,給直播間增加更多趣味吧! + 立即前往