猜你喜欢

This commit is contained in:
18401019693
2022-11-10 13:48:08 +08:00
parent 134cdf2e2a
commit d13e42e33d
10 changed files with 204 additions and 52 deletions

View File

@@ -34,7 +34,9 @@ import com.blankj.utilcode.util.GsonUtils;
import com.facebook.appevents.AppEventsLogger;
import com.google.firebase.analytics.FirebaseAnalytics;
import com.lxj.xpopup.XPopup;
import com.lxj.xpopup.core.BasePopupView;
import com.lxj.xpopup.enums.PopupPosition;
import com.lxj.xpopup.interfaces.XPopupCallback;
import com.lzf.easyfloat.EasyFloat;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.Constants;
@@ -689,53 +691,71 @@ public class LiveAudienceActivity extends LiveActivity {
Bundle bundle = new Bundle();
Log.i("SocketRyClient", "onOpenDrawer: " + event.getType() + " " + event);
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
CustomDrawerPopupView customDrawerPopupView = new CustomDrawerPopupView(mContext).setList(list);
customDrawerPopupView.setCallBack(new CustomDrawerPopupView.CustomDrawerPopupCallBack() {
@Override
public void goToLive(AnchorRecommendItemModel model) {
//获取直播间状态
LiveHttpUtil.getLiveInfo(model.getUid(), liveInfo);
customDrawerPopupView.dismiss();
}
});
switch (event.getType()) {
case SIDEBAR:
case BOTTOM_COLLECTION:
// int userIndex = -1;
// for (int i = 0; i < list.size(); i++) {
// if (TextUtils.equals(list.get(i).getUid(), PortraitLiveManager.liveID)) {
// userIndex = i;
// }
// }
// if (userIndex != -1) {
// list.remove(userIndex);
// }
// //从右边打开侧边栏
// SidebarLiveAudience sidebarLiveAudience = new SidebarLiveAudience();
// bundle.putString("Avatar", mLiveBean.getAvatar());
// bundle.putString("banner", GsonUtils.toJson(slideInfoModels));
// bundle.putString("list", GsonUtils.toJson(list));
// bundle.putInt("LiveBg", liveBg);
// sidebarLiveAudience.setArguments(bundle);
// sidebarLiveAudience.show(getSupportFragmentManager(), "SidebarLiveAudience");
// MPopupWindow.create(mContext)
// .setLayoutId(R.layout.view_sidebar_live_audience)
// .setBackgroundDrawable(new ColorDrawable(Color.GREEN))
// .setOnDismissListener(new MPopupWindow.MPopupListener() {
// @Override
// public void invoke(View contentView) {
//
// }
//
// @Override
// public void onDismiss() {
//
// }
// }).setGravity(TypeGravity.BOTTOM_RIGHT)
// .setTarget(titleLine)
// .setHeight(DeviceUtils.getScreenHeight(mContext)*2)
// .setWidth(DeviceUtils.getScreenWidth(mContext)/6*5)
// .build()
// .show();
new XPopup.Builder(mContext)
.hasShadowBg(false)
.isDestroyOnDismiss(true)
.isLightStatusBar(false)
.popupPosition(PopupPosition.Right)//右边
.hasStatusBarShadow(true) //启用状态栏阴影
.asCustom(new CustomDrawerPopupView(mContext).setList(list))
.setPopupCallback(new XPopupCallback() {
@Override
public void onCreated(BasePopupView popupView) {
}
@Override
public void beforeShow(BasePopupView popupView) {
}
@Override
public void onShow(BasePopupView popupView) {
}
@Override
public void onDismiss(BasePopupView popupView) {
getDrawer();
}
@Override
public void beforeDismiss(BasePopupView popupView) {
}
@Override
public boolean onBackPressed(BasePopupView popupView) {
return false;
}
@Override
public void onKeyBoardStateChanged(BasePopupView popupView, int height) {
}
@Override
public void onDrag(BasePopupView popupView, int value, float percent, boolean upOrLeft) {
}
@Override
public void onClickOutside(BasePopupView popupView) {
}
})
.asCustom(customDrawerPopupView)
.show();
break;
case GIFT_POPUP:
@@ -1057,7 +1077,7 @@ public class LiveAudienceActivity extends LiveActivity {
//推荐位
MainNetManager.get(mContext)
.anchorRecommend("12", new com.yunbao.common.http.base.HttpCallback<AnchorRecommendModel>() {
.anchorRecommend("9", new com.yunbao.common.http.base.HttpCallback<AnchorRecommendModel>() {
@Override
public void onSuccess(AnchorRecommendModel anchorRecommendModel) {
list.clear();

View File

@@ -341,13 +341,7 @@
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1" />
<!--普通工具合集-->
<ImageView
android:id="@+id/total_image"
android:layout_width="34dp"
android:layout_height="34dp"
android:layout_marginEnd="8dp"
android:src="@mipmap/live_icon_more" />
<!--特权-->
<ImageView
android:id="@+id/live_privilege"
@@ -402,7 +396,13 @@
android:layout_height="38dp"
android:layout_marginEnd="8dp"
android:src="@mipmap/live_lw" />
<!--普通工具合集-->
<ImageView
android:id="@+id/total_image"
android:layout_width="34dp"
android:layout_height="34dp"
android:layout_marginEnd="8dp"
android:src="@mipmap/live_icon_more" />
</LinearLayout>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB