修复PK倒计时偶尔会提前结束问题(设置倒计时默认值为100解决)
修复PK【开始/结束】不会【隐藏/显示】女神说和联系方式浮窗
This commit is contained in:
@@ -301,7 +301,9 @@ public class LiveAudienceEvent extends BaseModel {
|
||||
LUCKY_100_CHECK(55, "幸运百分百"),
|
||||
LIVE_END(56, "主播下播"),
|
||||
LIVE_HIDE_MSG_RED(57,"隐藏红点"),
|
||||
LIVE_SHARE(58,"直播間分享");
|
||||
LIVE_SHARE(58,"直播間分享"),
|
||||
LIVE_PK_ING(59,"PK中"),
|
||||
LIVE_PK_END(60,"PK结束");
|
||||
|
||||
private int type;
|
||||
private String name;
|
||||
|
||||
@@ -1008,6 +1008,7 @@ public class LiveLinkMicPkPresenter implements View.OnClickListener {
|
||||
}
|
||||
mLiveLinkMicPkViewHolder.startAnim();
|
||||
mLiveLinkMicPkViewHolder.showTime();
|
||||
mPkTimeCount = 100;
|
||||
nextPkTimeCountDown();
|
||||
if (mIsAnchor) {
|
||||
((LiveAnchorActivity) mContext).setPkBtnVisible(false);
|
||||
|
||||
@@ -1689,7 +1689,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show( R.string.net_error);
|
||||
ToastUtil.show(R.string.net_error);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -2247,6 +2247,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
|
||||
mLiveLinkMicPkViewHolder.startAnim();
|
||||
EventBus.getDefault().post(new LiveAudienceEvent().setType(LiveAudienceEvent.LiveAudienceType.PK_TWO_START).setObject(pkUid));
|
||||
mLiveLinkMicPkViewHolder.showTime();
|
||||
mPkTimeCount = 100;
|
||||
nextPkTimeCountDown(2);
|
||||
if (mIsAnchor) {
|
||||
((LiveRyAnchorActivity) mContext).setPkBtnVisible(false);
|
||||
|
||||
@@ -9,6 +9,8 @@ import android.graphics.Path;
|
||||
import android.graphics.PathMeasure;
|
||||
import android.graphics.RectF;
|
||||
import android.graphics.drawable.AnimationDrawable;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@@ -20,6 +22,7 @@ import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.ScreenDimenUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
@@ -143,6 +146,27 @@ public class LiveLinkMicPkViewHolder extends AbsViewHolder {
|
||||
img_pk_show_r = (ImageView) findViewById(R.id.img_pk_show_r);
|
||||
img_pk_show_l.setVisibility(View.GONE);
|
||||
img_pk_show_r.setVisibility(View.GONE);
|
||||
|
||||
mTime.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
Log.i("女神说", "倒计时状态:"+s);
|
||||
if (mTime.getVisibility() == View.VISIBLE) {
|
||||
EventBus.getDefault().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.LIVE_PK_ING));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void startAnim() {
|
||||
@@ -190,10 +214,10 @@ public class LiveLinkMicPkViewHolder extends AbsViewHolder {
|
||||
|
||||
public void setTime(String content) {
|
||||
if (mTime != null) {
|
||||
Log.i("vvvs",content);
|
||||
if(content.trim().equals("00:00")){
|
||||
Log.i("vvvs", content);
|
||||
if (content.trim().equals("00:00")) {
|
||||
mTime.setText("結算中");
|
||||
}else {
|
||||
} else {
|
||||
mTime.setText(content);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1316,6 +1316,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
mBannerList2.clear();
|
||||
mBannerList3.clear();
|
||||
mBannerList4.clear();
|
||||
mTopBannerList.clear();
|
||||
sayModel = null;
|
||||
updataCleanMic();
|
||||
// initStarChallengeStatus();
|
||||
enterRoomLeave.setVisibility(View.GONE);
|
||||
@@ -4040,6 +4042,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
case PK_TWO_END:
|
||||
EventBus.getDefault().post(new AnchorInfoEvent(true, "", "", ""));
|
||||
closePkTwo();
|
||||
showAnchorSayAndCallAnchor();
|
||||
break;
|
||||
case CUSTOM_FULL_SERVICE_NOTIFY:
|
||||
customFullServiceNotify(event.getCustomFullServiceNotifyEvent());
|
||||
@@ -4054,6 +4057,12 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
case CHANGE_VIEW:
|
||||
changeView();
|
||||
break;
|
||||
case LIVE_PK_ING:
|
||||
hideAnchorSayAndCallAnchor();
|
||||
break;
|
||||
case LIVE_PK_END:
|
||||
showAnchorSayAndCallAnchor();
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4457,21 +4466,25 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
}
|
||||
|
||||
public void hideAnchorSayAndCallAnchor() {
|
||||
mAnchorSay.setX((float) mAnchorSayImage.getTag());
|
||||
mAnchorSayImage.setTag(null);
|
||||
mAnchorSayImage.setVisibility(View.VISIBLE);
|
||||
mAnchorSayText.setVisibility(View.VISIBLE);
|
||||
mAnchorSayHide.setImageResource(R.mipmap.ic_live_anchor_say_show);
|
||||
mAnchorSay.setVisibility(View.GONE);
|
||||
topBanner1.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
public void showAnchorSayAndCallAnchor() {
|
||||
mAnchorSayImage.setTag(mAnchorSay.getX());
|
||||
mAnchorSay.setX(-DpUtil.dp2px(45));
|
||||
mAnchorSayImage.setVisibility(View.INVISIBLE);
|
||||
mAnchorSayText.setVisibility(View.INVISIBLE);
|
||||
mAnchorSayHide.setImageResource(R.mipmap.ic_live_anchor_say_hide);
|
||||
topBanner1.setVisibility(View.VISIBLE);
|
||||
if (mAnchorSay.getVisibility() == View.GONE &&
|
||||
sayModel != null && sayModel.getLivePreview() != null &&
|
||||
sayModel.getLivePreview().getIsShow() == 1
|
||||
) {
|
||||
Log.i("女神说", "sayModel: " + sayModel);
|
||||
mAnchorSay.setVisibility(View.VISIBLE);
|
||||
}
|
||||
if (topBanner1.getVisibility() == View.GONE && mTopBannerList != null && !mTopBannerList.isEmpty()) {
|
||||
Log.i("女神说", "mTopBannerList: " + mTopBannerList.size());
|
||||
for (BannerBean bean : mTopBannerList) {
|
||||
Log.i("女神说", "BannerBean: " + bean);
|
||||
}
|
||||
topBanner1.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
public void updateTopBanner(WishModel wishListProgress) {
|
||||
|
||||
@@ -1032,7 +1032,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mLiveRoomViewHolder.hideHighGrade();
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
mLiveRoomViewHolder.hideHighGrade();
|
||||
}
|
||||
enterRoomLeaveHandler.post(enterRoomLeaveRunnable);
|
||||
}
|
||||
}, 3000);
|
||||
@@ -1376,11 +1378,6 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
public void setPkStatus(boolean isPk) {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
mLiveRoomViewHolder.hotAddVisibility(isPk);
|
||||
if (isPk) {
|
||||
mLiveRoomViewHolder.hideAnchorSayAndCallAnchor();
|
||||
} else {
|
||||
mLiveRoomViewHolder.showAnchorSayAndCallAnchor();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user