diff --git a/config.gradle b/config.gradle index 1422bbd55..b123cc49e 100644 --- a/config.gradle +++ b/config.gradle @@ -25,7 +25,7 @@ ext { baiduAppSecretKey: "nEVSgmuGpU0pjPr6VleEGGAl0hzGW52S", // true表示谷歌支付 false - isGooglePlay : false, + isGooglePlay : true, //是否上报异常日志 isUploadLog : false ] diff --git a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java index deefce884..037ff8093 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java @@ -679,6 +679,9 @@ public class LiveAudienceActivity extends LiveActivity { public void setPkStatus(boolean isPk) { this.isPk = isPk; + if (manager != null) { + manager.setPkStatus(isPk); + } } @Subscribe(threadMode = ThreadMode.MAIN) 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 ebe499371..e7d5a5349 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -448,7 +448,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis time.setText("PK時間:" + s1); mHandler.sendEmptyMessageAtTime(WHAT_PK_TIME, getNextSecondTime()); if (mContext instanceof LiveAudienceActivity) { - ((LiveAudienceActivity)mContext).setPkStatus(true); + ((LiveAudienceActivity) mContext).setPkStatus(true); } } } else { @@ -457,12 +457,16 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis mHandler.removeCallbacksAndMessages(null); } if (mContext instanceof LiveAudienceActivity) { - ((LiveAudienceActivity)mContext).setPkStatus(false); + ((LiveAudienceActivity) mContext).setPkStatus(false); } endDRGif(); } } + public void hotAddVisibility(boolean visibility) { + ft_hot_add.setVisibility(visibility ? View.GONE : View.VISIBLE); + } + public void endDRGif() { if (dr_pk_end_gif.getVisibility() == View.GONE) { dr_pk_end_gif.setVisibility(View.VISIBLE); diff --git a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java index 90bce1437..086d842a8 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -526,7 +526,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe mLiveRoomViewHolder.pkHandler = true; mLiveRoomViewHolder.initPkRank(null); } - if(mLivePlayViewHolder != null) { + if (mLivePlayViewHolder != null) { mLivePlayViewHolder.setViewUP(3); } @@ -543,7 +543,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe if (mLiveRoomViewHolder != null) { mLiveRoomViewHolder.initPkRank(null); } - if(mLivePlayViewHolder != null) { + if (mLivePlayViewHolder != null) { mLivePlayViewHolder.setViewUP(4); } @@ -1278,6 +1278,16 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe } } + /** + * pk状态 + * + * @param isPk + */ + public void setPkStatus(boolean isPk) { + if (mLiveRoomViewHolder != null) + mLiveRoomViewHolder.hotAddVisibility(isPk); + } + @Override public void onLinkMicPkClose(int i) { diff --git a/live/src/main/res/layout/view_live_room.xml b/live/src/main/res/layout/view_live_room.xml index c89183182..427922cf0 100644 --- a/live/src/main/res/layout/view_live_room.xml +++ b/live/src/main/res/layout/view_live_room.xml @@ -709,8 +709,8 @@ android:layout_height="27dp" android:layout_below="@id/live_time" android:layout_marginLeft="12dp" - android:layout_marginTop="12dp" - android:visibility="gone"> + android:layout_marginTop="-12dp" + android:visibility="visible">