添加粉丝,守护

This commit is contained in:
18401019693 2022-08-17 15:54:30 +08:00
parent 3a11fd3955
commit 6d22c6a066
6 changed files with 63 additions and 8 deletions

View File

@ -47,4 +47,5 @@ public class FunGamesAdapter extends RecyclerView.Adapter {
activeModels.addAll(mActiveModels); activeModels.addAll(mActiveModels);
notifyDataSetChanged(); notifyDataSetChanged();
} }
} }

View File

@ -11,9 +11,12 @@ import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R; import com.yunbao.common.R;
import com.yunbao.common.adapter.FunGamesAdapter; import com.yunbao.common.adapter.FunGamesAdapter;
import com.yunbao.common.bean.ActiveModel; import com.yunbao.common.bean.ActiveModel;
import com.yunbao.common.event.LiveAudienceEvent;
import com.yunbao.common.http.base.HttpCallback; import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
import java.util.List; import java.util.List;
@ -59,6 +62,20 @@ public class LiveTotalDialog extends AbsDialogFragment {
ToastUtil.show(error); ToastUtil.show(error);
} }
}); });
//粉丝团
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.fan_club), () -> {
Bus.get().post(new LiveAudienceEvent()
.setType(LiveAudienceEvent.LiveAudienceType.FANCLUB));
dismiss();
}
);
//守护
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.guard_layout), () -> {
Bus.get().post(new LiveAudienceEvent()
.setType(LiveAudienceEvent.LiveAudienceType.GUARD));
dismiss();
}
);
} }

View File

@ -29,7 +29,9 @@ public class LiveAudienceEvent extends BaseModel {
SIDEBAR(1, "侧边栏"), SIDEBAR(1, "侧边栏"),
BOTTOMCOLLECTION(2, "底部合集"), BOTTOMCOLLECTION(2, "底部合集"),
GIFTPOPUP(3, "礼物弹窗"), GIFTPOPUP(3, "礼物弹窗"),
CURRENTACTIVITY(4, "当前活动"); CURRENTACTIVITY(4, "当前活动"),
FANCLUB(5,"粉絲團"),
GUARD(6,"守護");
private int type; private int type;

View File

@ -37,6 +37,7 @@
android:layout_marginTop="10dp"> android:layout_marginTop="10dp">
<LinearLayout <LinearLayout
android:id="@+id/fan_club"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center" android:gravity="center"
@ -58,6 +59,7 @@
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/guard_layout"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="28dp" android:layout_marginStart="28dp"

View File

@ -44,6 +44,7 @@ import com.yunbao.common.HtmlConfig;
import com.yunbao.common.activity.WebViewActivity; import com.yunbao.common.activity.WebViewActivity;
import com.yunbao.common.bean.AnchorRecommendItemModel; import com.yunbao.common.bean.AnchorRecommendItemModel;
import com.yunbao.common.bean.AnchorRecommendModel; import com.yunbao.common.bean.AnchorRecommendModel;
import com.yunbao.common.bean.IMLoginModel;
import com.yunbao.common.bean.SlideInfoModel; import com.yunbao.common.bean.SlideInfoModel;
import com.yunbao.common.bean.UserBean; import com.yunbao.common.bean.UserBean;
import com.yunbao.common.custom.CommonRefreshView; import com.yunbao.common.custom.CommonRefreshView;
@ -79,7 +80,9 @@ import com.yunbao.live.bean.LiveGuardInfo;
import com.yunbao.live.bean.LivePKUserListBean; import com.yunbao.live.bean.LivePKUserListBean;
import com.yunbao.live.bean.LiveUserGiftBean; import com.yunbao.live.bean.LiveUserGiftBean;
import com.yunbao.live.dialog.BlowkissDialog; import com.yunbao.live.dialog.BlowkissDialog;
import com.yunbao.live.dialog.LiveFansFragment;
import com.yunbao.live.dialog.LiveGiftDialogFragment; import com.yunbao.live.dialog.LiveGiftDialogFragment;
import com.yunbao.live.dialog.LiveGuardDialogFragment;
import com.yunbao.live.dialog.LiveHDDialogFragment; import com.yunbao.live.dialog.LiveHDDialogFragment;
import com.yunbao.live.dialog.NewUserDialog; import com.yunbao.live.dialog.NewUserDialog;
import com.yunbao.live.event.LinkMicTxAccEvent; import com.yunbao.live.event.LinkMicTxAccEvent;
@ -1407,6 +1410,7 @@ public class LiveAudienceActivity extends LiveActivity {
liveGiftDialogFragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGiftDialogFragment"); liveGiftDialogFragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGiftDialogFragment");
break; break;
case CURRENTACTIVITY: case CURRENTACTIVITY:
bundle.putString("url", event.getModel().activityUrl(mContext, liveBean.getUid())); bundle.putString("url", event.getModel().activityUrl(mContext, liveBean.getUid()));
int show = TextUtils.isEmpty(event.getModel().getShowType()) ? 0 : Integer.parseInt(event.getModel().getShowType()); int show = TextUtils.isEmpty(event.getModel().getShowType()) ? 0 : Integer.parseInt(event.getModel().getShowType());
bundle.putInt("show_type", show); bundle.putInt("show_type", show);
@ -1414,6 +1418,33 @@ public class LiveAudienceActivity extends LiveActivity {
liveHDDialogFragment.setArguments(bundle); liveHDDialogFragment.setArguments(bundle);
liveHDDialogFragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment"); liveHDDialogFragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
break; break;
case FANCLUB:
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
LiveFansFragment liveFansFragment = new LiveFansFragment();
//粉絲團粉絲團
//不是粉絲
if (LiveAudienceActivity.is_fans != null && LiveAudienceActivity.is_fans.equals("2")) {
bundle.putString(Constants.URL,
CommonAppConfig.HOST + "/h5/live/joinFansClub.html" +
"?uid=" + userInfo.getId() +
"&token=" + userInfo.getToken() + "&anchorUid=" + mLiveUid);
} else {
bundle.putString(Constants.URL,
CommonAppConfig.HOST + "/h5/live/fansClub.html" +
"?uid=" + userInfo.getId() +
"&token=" + userInfo.getToken() + "&anchorUid=" + mLiveUid);
}
liveFansFragment.setArguments(bundle);
liveFansFragment.show(getSupportFragmentManager(), "LiveGuardDialogFragment");
break;
case GUARD:
LiveGuardDialogFragment liveGuardDialogFragment = new LiveGuardDialogFragment();
liveGuardDialogFragment.setLiveGuardInfo(mLiveGuardInfo);
bundle.putString(Constants.LIVE_UID, mLiveUid);
bundle.putBoolean(Constants.ANCHOR, mIsAnchor);
liveGuardDialogFragment.setArguments(bundle);
liveGuardDialogFragment.show(getSupportFragmentManager(), "LiveGuardDialogFragment");
break;
} }
} }

View File

@ -1,15 +1,17 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="top|left" android:gravity="top|left"
android:background="@color/white"> android:orientation="vertical"
app:cardCornerRadius="12dp"
app:cardElevation="16dp">
<WebView <WebView
android:id="@+id/rlWebview" android:id="@+id/rlWebview"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:layout_gravity="top"/> android:layout_gravity="top" />
</androidx.cardview.widget.CardView>
</LinearLayout>