修复:

侧边栏问题
This commit is contained in:
18401019693 2022-08-25 16:34:03 +08:00
parent 418be1ec67
commit da19811ad4
7 changed files with 35 additions and 6 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View File

@ -10,9 +10,9 @@ ext {
manifestPlaceholders = [
//
serverHost : "https://napi.yaoulive.com",
// serverHost : "https://napi.yaoulive.com",
//
// serverHost : "https://ceshi.yaoulive.com",
serverHost : "https://ceshi.yaoulive.com",
//
txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB",

View File

@ -122,6 +122,7 @@ public class LiveAudienceActivity extends LiveActivity {
private ViewGroup mViewGroup;
private LoadingView loadingView;
private int liveBg = 0;
@Override
@ -651,6 +652,10 @@ public class LiveAudienceActivity extends LiveActivity {
manager.onRemove();
mLiveType = e.getLiveType();
mLiveTypeVal = e.getLiveTypeVal();
mLiveBean = liveBean;
mLiveUid = liveBean.getUid();
mStream = liveBean.getStream();
mAncherName = liveBean.getUserNiceName();
manager.onAdd(liveBean, mLiveType, mLiveTypeVal, mLiveSDK);
}
@ -679,6 +684,7 @@ public class LiveAudienceActivity extends LiveActivity {
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");
// manager.openDrawer();
@ -797,6 +803,8 @@ public class LiveAudienceActivity extends LiveActivity {
mLiveTypeVal : event.getParametersModel().getmLiveTypeVal();
mLiveGuardInfo = event.getParametersModel().getmLiveGuardInfo() == null ?
mLiveGuardInfo : event.getParametersModel().getmLiveGuardInfo();
liveBg = TextUtils.equals(String.valueOf(liveBg), String.valueOf(event.getParametersModel().getLiveBg())) ?
liveBg : event.getParametersModel().getLiveBg();
break;
case ACTIVITY_CENTER://活动中心
String url = CommonAppConfig.HOST + "/h5/live/hallOfFame/index.html?g=Appapi&m=Turntable&a=tricky";

View File

@ -15,6 +15,16 @@ public class OpenParametersModel extends BaseModel {
//收费价格,计时收费每次扣费的值
private int mLiveTypeVal = 0;
private LiveGuardInfo mLiveGuardInfo = null;
private int liveBg = 0;
public int getLiveBg() {
return liveBg;
}
public OpenParametersModel setLiveBg(int liveBg) {
this.liveBg = liveBg;
return this;
}
public int getmLiveType() {
return mLiveType;

View File

@ -65,12 +65,18 @@ public class SidebarLiveAudience extends AbsDialogFragment {
sidebarBack = (ImageView) findViewById(R.id.sidebar_back);
if (bundle != null) {
String avatar = bundle.getString("Avatar");
int liveBg = bundle.getInt("LiveBg");
slideInfoModels = GsonUtils.fromJson(bundle.getString("banner"), new TypeToken<List<SlideInfoModel>>() {
}.getType());
list = GsonUtils.fromJson(bundle.getString("list"), new TypeToken<List<AnchorRecommendItemModel>>() {
}.getType());
//侧边栏背景
if (liveBg == 1) {
ImgLoader.displayBlurLive(mContext, avatar, sidebarBack);
} else {
ImgLoader.display(mContext, R.mipmap.live_bg, sidebarBack);
}
}
sidebarList = (CommonRefreshView) findViewById(R.id.sidebarList);

View File

@ -4,7 +4,6 @@ import android.app.Activity;
import android.app.Dialog;
import android.content.Intent;
import android.content.res.Configuration;
import android.graphics.drawable.AnimationDrawable;
import android.os.CountDownTimer;
import android.text.TextUtils;
import android.util.Log;
@ -28,7 +27,6 @@ import com.tencent.imsdk.v2.V2TIMManager;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.CommonAppContext;
import com.yunbao.common.Constants;
import com.yunbao.common.bean.AnchorRecommendItemModel;
import com.yunbao.common.bean.UserBean;
import com.yunbao.common.custom.MyViewPager;
import com.yunbao.common.event.FollowEvent;
@ -150,6 +148,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
private boolean mLighted;
private boolean mCoinNotEnough;//余额不足
private boolean mFirstConnectSocket;//是否是第一次连接成功socket
private int liveBg;
public PortraitLiveManager(Activity context, Intent intent) {
this.mContext = context;
@ -808,13 +807,19 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
mSocketUserType = obj.getIntValue("usertype");
mChatLevel = obj.getIntValue("speak_limit");
mDanMuLevel = obj.getIntValue("barrage_limit");
liveBg = obj.getIntValue("live_bg");
if (liveBg == 1) {
//直播间背景
ImgLoader.displayBlurLive(mContext, mLiveBean.getAvatar(), liveBack);
}
//回传参数
Bus.get().post(new LiveAudienceEvent()
.setType(LiveAudienceEvent.LiveAudienceType.OPEN_PARAMETERS)
.setParametersModel(new OpenParametersModel().setmDanmuPrice(mDanmuPrice)
.setmSocketUserType(mSocketUserType)
.setmChatLevel(mChatLevel)
.setmDanMuLevel(mDanMuLevel)));
.setmDanMuLevel(mDanMuLevel)
.setLiveBg(liveBg)));
EventBus.getDefault().post("close_login");
EventBus.getDefault().post("oneUesrOver");

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 29 KiB