Merge branch 'dev_6.5.5'
# Conflicts: # common/src/main/res/values-en-rUS/string.xml # common/src/main/res/values-zh-rHK/strings.xml # common/src/main/res/values-zh-rTW/strings.xml # common/src/main/res/values-zh/strings.xml # common/src/main/res/values/strings.xml # live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java
This commit is contained in:
@@ -763,6 +763,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
if (manager != null && !StringUtil.isEmpty(is_fans)) {
|
||||
if (is_fans.equals("-2")) {
|
||||
manager.setAttention(0);
|
||||
mLiveRoomViewHolder.setFansGroup("0");
|
||||
is_fans = "2";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,6 +132,7 @@ public class LiveFansFragment extends AbsDialogFragment {
|
||||
int num = LiveAudienceActivity.fansNum - 1;
|
||||
LiveRoomViewHolder.setFansNum(num);
|
||||
ToastUtil.show("退出成功");
|
||||
EventBus.getDefault().post("exitFansGroup");
|
||||
dismiss();
|
||||
} else if (TextUtils.equals(event.getMethod(), "sendFansCard")) {
|
||||
if (LiveRoomViewHolder.mBtnFollow != null && LiveRoomViewHolder.mBtnFollow.getVisibility() == View.VISIBLE) {
|
||||
|
||||
@@ -899,6 +899,7 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
||||
MobclickAgent.onEvent(mContext, "gif_list_blind_box", "用户点开礼物列表盲盒");
|
||||
iconArrow.setVisibility(View.GONE);
|
||||
showBlindProgress(liveGiftModel.getBlind_box_type());
|
||||
description.setTag(liveGiftModel.getBlind_box_type());
|
||||
} else {
|
||||
blindBox.setVisibility(View.INVISIBLE);
|
||||
mCount = DEFAULT_COUNT;
|
||||
|
||||
@@ -25,6 +25,7 @@ import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.TimeUtils;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.CircleProgress;
|
||||
import com.yunbao.common.views.weight.ClipPathCircleImage;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
@@ -46,10 +47,13 @@ public class ReceiveRendPacketPopup extends CenterPopupView {
|
||||
private ImageView isAttention;
|
||||
private RedPacketInfoModel redPacketInfoModel;
|
||||
private boolean isSuperJackpot;
|
||||
private boolean isFans = false;
|
||||
|
||||
public ReceiveRendPacketPopup(@NonNull Context context, int time, String mLiveUid, String stream,
|
||||
String redPacketId, RedPacketInfoModel redPacketInfoModel,
|
||||
boolean isSuperJackpot) {
|
||||
boolean isSuperJackpot,
|
||||
boolean isFans
|
||||
) {
|
||||
|
||||
super(context);
|
||||
this.time = time;
|
||||
@@ -58,7 +62,7 @@ public class ReceiveRendPacketPopup extends CenterPopupView {
|
||||
this.redPacketId = redPacketId;
|
||||
this.redPacketInfoModel = redPacketInfoModel;
|
||||
this.isSuperJackpot = isSuperJackpot;
|
||||
|
||||
this.isFans = isFans;
|
||||
}
|
||||
|
||||
// 返回自定义弹窗的布局离开
|
||||
@@ -95,6 +99,7 @@ public class ReceiveRendPacketPopup extends CenterPopupView {
|
||||
}
|
||||
|
||||
userID = redPacketInfoModel.getUserId();
|
||||
|
||||
}
|
||||
|
||||
private Handler timeHandler = new Handler();
|
||||
@@ -102,7 +107,7 @@ public class ReceiveRendPacketPopup extends CenterPopupView {
|
||||
private Runnable timeRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (time > 0) {
|
||||
if (time > 1) {
|
||||
circleProgress.setCurrent(time--);
|
||||
timeHandler.postDelayed(timeRunnable, 1000);
|
||||
String countdown = TimeUtils.getTime(time);
|
||||
@@ -149,6 +154,11 @@ public class ReceiveRendPacketPopup extends CenterPopupView {
|
||||
redPacketTimeLayout.setVisibility(GONE);
|
||||
redPacketOpen.setVisibility(VISIBLE);
|
||||
}
|
||||
ViewClicksAntiShake.clicksAntiShake(redPacketTimeLayout, () -> {
|
||||
if (!isFans && redPacketInfoModel.getIsFans()) {
|
||||
ToastUtil.show(getContext().getString(R.string.live_rad_pack_join_fans_group_click_tip));
|
||||
}
|
||||
});
|
||||
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.red_packet_open), () -> {
|
||||
if (isSuperJackpot) {
|
||||
@@ -179,6 +189,10 @@ public class ReceiveRendPacketPopup extends CenterPopupView {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (!isFans && redPacketInfoModel.getIsFans()) {
|
||||
ToastUtil.show(getContext().getString(R.string.live_rad_pack_join_fans_group_click_tip));
|
||||
return;
|
||||
}
|
||||
if (TextUtils.equals(redPacketInfoModel.getConditions(), "1") && LiveAudienceActivity.isattention == 0) {
|
||||
LiveRoomViewHolder.follow();
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.live.R;
|
||||
|
||||
public class SendRendPacketPopup extends CenterPopupView {
|
||||
private Button thereIsNo, followingAnchor;
|
||||
private Button thereIsNo, followingAnchor, joinFansGroup;
|
||||
private TextView redEnvelopeRill, totalConsumptionOfDrill;
|
||||
private TextView rill, total;
|
||||
private FrameLayout redPacketIllustrate;
|
||||
@@ -59,6 +59,7 @@ public class SendRendPacketPopup extends CenterPopupView {
|
||||
redPacketIllustrate = findViewById(R.id.red_packet_illustrate);
|
||||
illustrateClose = findViewById(R.id.illustrate_close);
|
||||
iconInstructions = findViewById(R.id.icon_instructions);
|
||||
joinFansGroup = findViewById(R.id.fans_group);
|
||||
rill = findViewById(R.id.rill);
|
||||
total = findViewById(R.id.total);
|
||||
selectText(thereIsNo, true);
|
||||
@@ -66,13 +67,21 @@ public class SendRendPacketPopup extends CenterPopupView {
|
||||
ViewClicksAntiShake.clicksAntiShake(thereIsNo, () -> {
|
||||
selectText(thereIsNo, true);
|
||||
selectText(followingAnchor, false);
|
||||
selectText(joinFansGroup, false);
|
||||
conditions = "0";
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(followingAnchor, () -> {
|
||||
selectText(thereIsNo, false);
|
||||
selectText(joinFansGroup, false);
|
||||
selectText(followingAnchor, true);
|
||||
conditions = "1";
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(joinFansGroup, () -> {
|
||||
selectText(thereIsNo, false);
|
||||
selectText(joinFansGroup, true);
|
||||
selectText(followingAnchor, false);
|
||||
conditions = "0";
|
||||
});
|
||||
redEnvelopeRill.setText(String.format(getContext().getString(R.string.red_envelope_rill), "0"));
|
||||
totalConsumptionOfDrill.setText(String.format(getContext().getString(R.string.total_consumption_of_drill), "0"));
|
||||
rill.addTextChangedListener(new TextWatcher() {
|
||||
@@ -205,7 +214,9 @@ public class SendRendPacketPopup extends CenterPopupView {
|
||||
.createRedPacket(mLiveID,
|
||||
rillNumber,
|
||||
number,
|
||||
conditions, new HttpCallback<String>() {
|
||||
conditions,
|
||||
joinFansGroup.getTag() != null && (boolean) joinFansGroup.getTag(),
|
||||
new HttpCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
|
||||
@@ -223,10 +234,10 @@ public class SendRendPacketPopup extends CenterPopupView {
|
||||
|
||||
}
|
||||
});
|
||||
if(WordUtil.isNewZh()){
|
||||
((ImageView)findViewById(R.id.red_packet_info_img)).setImageResource(R.mipmap.bg_red_packet_info_zh);
|
||||
}else{
|
||||
((ImageView)findViewById(R.id.red_packet_info_img)).setImageResource(R.mipmap.bg_red_packet_info_en);
|
||||
if (WordUtil.isNewZh()) {
|
||||
((ImageView) findViewById(R.id.red_packet_info_img)).setImageResource(R.mipmap.bg_red_packet_info_zh);
|
||||
} else {
|
||||
((ImageView) findViewById(R.id.red_packet_info_img)).setImageResource(R.mipmap.bg_red_packet_info_en);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,8 +245,10 @@ public class SendRendPacketPopup extends CenterPopupView {
|
||||
textView.setSelected(select);
|
||||
if (select) {
|
||||
textView.setTextColor(Color.parseColor("#E12801"));
|
||||
textView.setTag(true);
|
||||
} else {
|
||||
textView.setTextColor(Color.parseColor("#FDD04A"));
|
||||
textView.setTag(false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -378,6 +378,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
public SVGAImageView svga_new_user_gif, svga_new_user_double, svga_new_user_follow;
|
||||
private String mAnchorName;//主播名字
|
||||
private boolean isHinde = false;
|
||||
private boolean isFans = false;
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onUpdata(String str) {
|
||||
@@ -460,6 +461,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
}
|
||||
} else if ("checkNewLetter".equals(str)) {
|
||||
checkNewLetter();
|
||||
}else if("exitFansGroup".equals(str)){
|
||||
setFansGroup("0");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1418,9 +1421,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
@Override
|
||||
public void run() {
|
||||
if (redTimeCountdown > 1) {
|
||||
redTimeCountdown = redTimeCountdown - 1;
|
||||
timeHandler.postDelayed(timeRunnable, 1000);
|
||||
redPacketCountdown.setText(String.format(mContext.getString(R.string.red_packet_countdown), TimeUtils.getTime(redTimeCountdown)));
|
||||
redTimeCountdown = redTimeCountdown - 1;
|
||||
} else {
|
||||
redTimeCountdown = 0;
|
||||
timeHandler.removeCallbacks(timeRunnable);
|
||||
@@ -1526,7 +1529,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
if (TextUtils.equals(data.getReceiveStatus(), "0")) {
|
||||
redTimeCountdown = redTimeCountdown - 1;
|
||||
new XPopup.Builder(mContext)
|
||||
.asCustom(new ReceiveRendPacketPopup(mContext, redTimeCountdown, mLiveUid, mStream, redPacketModel.getRedPacketId(), data, false))
|
||||
.asCustom(new ReceiveRendPacketPopup(mContext, redTimeCountdown, mLiveUid, mStream, redPacketModel.getRedPacketId(), data, false, isFans))
|
||||
.show();
|
||||
} else if (TextUtils.equals(data.getReceiveStatus(), "1")) {
|
||||
new XPopup.Builder(mContext)
|
||||
@@ -1563,7 +1566,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
|
||||
public void setRedPacketInfoModel(RedPacketInfoModel redPacket) {
|
||||
new XPopup.Builder(mContext)
|
||||
.asCustom(new ReceiveRendPacketPopup(mContext, 0, mLiveUid, mStream, redPacket.getRedPacketId(), redPacket, true))
|
||||
.asCustom(new ReceiveRendPacketPopup(mContext, 0, mLiveUid, mStream, redPacket.getRedPacketId(), redPacket, true, isFans))
|
||||
.show();
|
||||
}
|
||||
|
||||
@@ -3520,8 +3523,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
((LiveAudienceActivity) mContext).openFansMedalOkWindow();
|
||||
|
||||
}
|
||||
if (!isAncher && bean.getGiftName().equals("粉絲牌")) {
|
||||
if (!isAncher && bean.getGiftName().equals("粉絲牌") && bean.getUid().equals(CommonAppConfig.getInstance().getUid())) {
|
||||
LiveAudienceActivity.is_fans = "1";
|
||||
setFansGroup("1");
|
||||
}
|
||||
Log.i("tvss", bean.getDrpk_status() + "是" + mLiveUid + "vsss" + bean.getRoomnum());
|
||||
if (mLiveGiftAnimPresenter == null) {
|
||||
@@ -3998,6 +4002,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
.setUname("0"));//setUname==by
|
||||
}
|
||||
|
||||
public void setFansGroup(String isFans) {
|
||||
this.isFans = isFans.equals("1");
|
||||
}
|
||||
|
||||
|
||||
private static class LiveRoomHandler extends Handler {
|
||||
|
||||
|
||||
@@ -525,6 +525,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
mLiveRoomViewHolder.updateTopBanner();
|
||||
mLiveRoomViewHolder.setVoteData(data.getEnterRoomInfo().getVoteModel());
|
||||
mLiveRoomViewHolder.updateFansMessageRed();
|
||||
mLiveRoomViewHolder.setFansGroup(data.getEnterRoomInfo().getIsFans());
|
||||
|
||||
isattention = Integer.parseInt(data.getEnterRoomInfo().getIsattention());
|
||||
if (isattention == 0) {
|
||||
@@ -679,6 +680,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
mLiveRoomViewHolder.showPrizePoolLevel(String.valueOf(giftPrizePoolLevel));
|
||||
}
|
||||
}
|
||||
AppManager.runDebugCode(()->{
|
||||
liveHandler.postDelayed(loadTimeoutRunnableGone, 1_000);
|
||||
});
|
||||
liveHandler.postDelayed(loadTimeoutRunnableGone, 15_000);
|
||||
if (TextUtils.equals(data.getEnterRoomInfo().getIsconnection(), "1")) {
|
||||
//通知心愿单位置换地方
|
||||
|
||||
@@ -11,8 +11,9 @@
|
||||
android:id="@+id/gift_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="dadsad"
|
||||
android:text="中文测试中文测试"
|
||||
android:layout_weight="1"
|
||||
android:maxEms="9"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/user_list"
|
||||
android:layout_width="200dp"
|
||||
android:layout_width="250dp"
|
||||
tools:listitem="@layout/view_red_packet_luck_user"
|
||||
android:layout_height="241dp"
|
||||
android:layout_marginTop="26dp" />
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="30dp">
|
||||
|
||||
@@ -161,19 +161,37 @@
|
||||
android:text="@string/there_is_no"
|
||||
android:textColor="#FDD04A"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/following_anchor"
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_height="70dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/background_red_packet_select"
|
||||
android:gravity="center"
|
||||
android:text="@string/following_anchor"
|
||||
android:textColor="#FDD04A"
|
||||
android:textSize="10sp" />
|
||||
android:orientation="vertical"
|
||||
>
|
||||
<Button
|
||||
android:id="@+id/following_anchor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginStart="5dp"
|
||||
android:background="@drawable/background_red_packet_select"
|
||||
android:gravity="center"
|
||||
android:text="@string/following_anchor"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:textColor="#FDD04A"
|
||||
android:textSize="10sp" />
|
||||
<Button
|
||||
android:id="@+id/fans_group"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginStart="5dp"
|
||||
android:background="@drawable/background_red_packet_select"
|
||||
android:gravity="center"
|
||||
android:text="@string/live_send_red_packge_fans_group"
|
||||
android:textColor="#FDD04A"
|
||||
android:textSize="10sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -181,7 +199,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="23dp"
|
||||
android:layout_marginTop="266dp"
|
||||
android:layout_marginTop="286dp"
|
||||
android:layout_marginEnd="29dp">
|
||||
|
||||
<TextView
|
||||
@@ -232,8 +250,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/background_send_red_packet_illustrate"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
android:visibility="gone">
|
||||
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
|
||||
@@ -115,4 +115,6 @@
|
||||
<string name="live_fans_group_buy_buy">%s Diamond</string>
|
||||
<string name="live_fans_group_enter_room">Welcome,Fan Club Members</string>
|
||||
<string name="live_fans_group_send_gift_tips">Fan group level Of Lv%s Can send this gift</string>
|
||||
<string name="live_rad_pack_join_fans_group_tip">Join the fan group can be opened [Join]</string>
|
||||
<string name="live_rad_pack_join_fans_group_click_tip">Join the fan group to open</string>
|
||||
</resources>
|
||||
@@ -113,4 +113,6 @@
|
||||
<string name="live_fans_group_buy_buy">%s鑽購買</string>
|
||||
<string name="live_fans_group_enter_room">粉絲團成員歡迎進房</string>
|
||||
<string name="live_fans_group_send_gift_tips">粉絲團等級達到 Lv%s 可送出該禮物</string>
|
||||
<string name="live_rad_pack_join_fans_group_tip">加入粉絲團可開啟【加入】</string>
|
||||
<string name="live_rad_pack_join_fans_group_click_tip">加入粉絲團可開啟</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user