diff --git a/common/src/main/res/layout/view_live_total.xml b/common/src/main/res/layout/view_live_total.xml
index 19bf35e66..28d7252d8 100644
--- a/common/src/main/res/layout/view_live_total.xml
+++ b/common/src/main/res/layout/view_live_total.xml
@@ -6,43 +6,48 @@
android:orientation="vertical">
+ android:textSize="14sp"
+ android:visibility="gone" />
+ android:layout_marginTop="10dp"
+ android:visibility="gone" />
+ android:textSize="14sp"
+ android:visibility="gone" />
+ android:scrollbars="none"
+ android:visibility="gone">
+
>() {
-// @Override
-// public void onSuccess(List data) {
-// if (!isDetached())
-// gamesAdapter.addData(data);
-// }
-//
-// @Override
-// public void onError(String error) {
-// }
-// });
+ if (isActivity) {
+ funGames.setVisibility(View.VISIBLE);
+ funGamesList.setVisibility(View.VISIBLE);
+ valueAddedBenefits.setVisibility(View.VISIBLE);
+ benefits.setVisibility(View.VISIBLE);
+ basicTools.setVisibility(View.GONE);
+ basicToolsLayout.setVisibility(View.GONE);
+ LiveNetManager.get(getContext())
+ .getActiveList(new HttpCallback>() {
+ @Override
+ public void onSuccess(List data) {
+ if (!isDetached())
+ gamesAdapter.addData(data);
+ }
+
+ @Override
+ public void onError(String error) {
+ }
+ });
+ } else {
+ funGames.setVisibility(View.GONE);
+ funGamesList.setVisibility(View.GONE);
+ valueAddedBenefits.setVisibility(View.GONE);
+ benefits.setVisibility(View.GONE);
+ basicTools.setVisibility(View.VISIBLE);
+ basicToolsLayout.setVisibility(View.VISIBLE);
+ }
+
//周星榜
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.live_wks_layout), () -> {
Bus.get().post(new LiveAudienceEvent()
diff --git a/live/src/main/java/com/yunbao/live/event/LiveAudienceEvent.java b/live/src/main/java/com/yunbao/live/event/LiveAudienceEvent.java
index 794885025..4094647cb 100644
--- a/live/src/main/java/com/yunbao/live/event/LiveAudienceEvent.java
+++ b/live/src/main/java/com/yunbao/live/event/LiveAudienceEvent.java
@@ -21,6 +21,16 @@ public class LiveAudienceEvent extends BaseModel {
private MsgModel msgModel;//全服消息
private AiAutomaticSpeechModel aiAutomaticSpeechModel;//机器人消息
private boolean voicePress = false;
+ private boolean isActivity = false;//是否展示趣味活动和增值权益
+
+ public boolean isActivity() {
+ return isActivity;
+ }
+
+ public LiveAudienceEvent setActivity(boolean activity) {
+ isActivity = activity;
+ return this;
+ }
public boolean isVoicePress() {
return voicePress;
@@ -161,7 +171,9 @@ public class LiveAudienceEvent extends BaseModel {
MESSAGE_BOTTOM(28, "聊天消息滚动到底部"),
FLOAT_SETTING(29, "悬浮窗设置"),
VOICE_PRESS(30, "长按展示图片"),
- LUCKY_ANGEL(31,"幸运天使");
+ LUCKY_ANGEL(31, "幸运天使"),
+ WE_CHEAT(32, "整蛊")
+ ;
private int type;
private String name;
diff --git a/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java
index 92c969eb7..8d08fa345 100644
--- a/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java
+++ b/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java
@@ -258,10 +258,30 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
@Override
public void onViewClicks() {
Bus.get().post(new LiveAudienceEvent()
+ .setActivity(false)
.setType(LiveAudienceEvent.LiveAudienceType.BOTTOM_COLLECTION));
}
});
+ //玩
+ ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.live_play), new ViewClicksAntiShake.ViewClicksCallBack() {
+ @Override
+ public void onViewClicks() {
+ Bus.get().post(new LiveAudienceEvent()
+ .setActivity(true)
+ .setType(LiveAudienceEvent.LiveAudienceType.BOTTOM_COLLECTION));
+
+ }
+ });
+ //整蛊
+ ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.live_cheat), new ViewClicksAntiShake.ViewClicksCallBack() {
+ @Override
+ public void onViewClicks() {
+ Bus.get().post(new LiveAudienceEvent()
+ .setType(LiveAudienceEvent.LiveAudienceType.WE_CHEAT));
+
+ }
+ });
//底部礼物弹窗
ImgLoader.displayGif(mContext, R.mipmap.live_lw, giftImage);
@@ -398,7 +418,6 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
}
-
@Override
public void onClick(View v) {
if (!canClick()) {
@@ -424,11 +443,11 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
openZGListWindow();
} else if (i == R.id.live_new_people) {
openNewPeopleDialog();
- } else if (i == R.id.live_privilege){
+ } else if (i == R.id.live_privilege) {
openRoleDialog();
- }else if(i==R.id.live_cheat){
+ } else if (i == R.id.live_cheat) {
- }else if (i==R.id.live_play){
+ } else if (i == R.id.live_play) {
}
@@ -473,8 +492,8 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
/**
* 身份特权
*/
- public void openRoleDialog(){
- LiveRoleDialogFragment fragment=new LiveRoleDialogFragment();
+ public void openRoleDialog() {
+ LiveRoleDialogFragment fragment = new LiveRoleDialogFragment();
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveRoleDialogFragment");
}
diff --git a/live/src/main/res/layout/view_live_audience.xml b/live/src/main/res/layout/view_live_audience.xml
index 96c91dfa6..553800a23 100644
--- a/live/src/main/res/layout/view_live_audience.xml
+++ b/live/src/main/res/layout/view_live_audience.xml
@@ -351,22 +351,22 @@