新增直播间轮播Banner
调整身份特权弹窗
@ -129,7 +129,7 @@ public class AppContext extends CommonAppContext {
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
//注册全局异常捕获
|
||||
if(!isMainProcess()){
|
||||
if (!isMainProcess()) {
|
||||
return;
|
||||
}
|
||||
registerError();
|
||||
@ -268,7 +268,7 @@ public class AppContext extends CommonAppContext {
|
||||
});
|
||||
configSPApp();
|
||||
//初始化美颜SDK
|
||||
FaceManager.initFaceUnity(this);
|
||||
FaceManager.initFaceUnity(this);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -315,7 +315,9 @@ public class AppContext extends CommonAppContext {
|
||||
}
|
||||
/* Process.killProcess(Process.myPid());
|
||||
System.exit(0);*/
|
||||
new Handler(Looper.getMainLooper()).postDelayed(()->{throw new RuntimeException(e);},100);
|
||||
new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
||||
throw new RuntimeException(e);
|
||||
}, 100);
|
||||
})
|
||||
.setUncaughtCrashHandler((t, e) -> {
|
||||
Log.e("ApplicationError", "子线程异常");//此处log只是展示,当debug为true时,主类内部log会打印异常信息
|
||||
@ -323,16 +325,22 @@ public class AppContext extends CommonAppContext {
|
||||
})
|
||||
.register(this);
|
||||
}
|
||||
public void registerFirebaseCrash(){
|
||||
|
||||
public void registerFirebaseCrash() {
|
||||
if (!CommonAppConfig.IS_UPLOAD_ERROR_LOG) {
|
||||
return;
|
||||
}
|
||||
FirebaseAnalytics.getInstance(this);
|
||||
FirebaseApp.initializeApp(this);
|
||||
String uid = CommonAppConfig.getInstance().getUid();
|
||||
FirebaseCrashlytics.getInstance().setUserId(CommonAppConfig.getInstance().getUid());
|
||||
FirebaseCrashlytics.getInstance().setCustomKey("uid",CommonAppConfig.getInstance().getUid());
|
||||
FirebaseCrashlytics.getInstance().setCustomKey("userData",SpUtil.getInstance().getStringValue(SpUtil.USER_INFO));
|
||||
FirebaseCrashlytics.getInstance().setCustomKey("isGoogle",CommonAppConfig.IS_GOOGLE_PLAY);
|
||||
if (uid != null && !uid.isEmpty()) {
|
||||
FirebaseCrashlytics.getInstance().setCustomKey("uid", uid);
|
||||
} else {
|
||||
FirebaseCrashlytics.getInstance().setCustomKey("uid", "uid is null");
|
||||
}
|
||||
FirebaseCrashlytics.getInstance().setCustomKey("userData", SpUtil.getInstance().getStringValue(SpUtil.USER_INFO));
|
||||
FirebaseCrashlytics.getInstance().setCustomKey("isGoogle", CommonAppConfig.IS_GOOGLE_PLAY);
|
||||
FirebaseCrashlytics.getInstance().setCustomKey("PhoneName", Build.BRAND);
|
||||
FirebaseCrashlytics.getInstance().setCustomKey("Phone", Build.MODEL);
|
||||
FirebaseCrashlytics.getInstance().setCustomKey("CPU", Arrays.toString(Build.SUPPORTED_ABIS));
|
||||
|
@ -81,4 +81,17 @@ public class BannerBean {
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BannerBean{" +
|
||||
"isStart=" + isStart +
|
||||
", mImageUrl='" + mImageUrl + '\'' +
|
||||
", mLink='" + mLink + '\'' +
|
||||
", show_type='" + show_type + '\'' +
|
||||
", mIntoUrl='" + mIntoUrl + '\'' +
|
||||
", type=" + type +
|
||||
", model=" + model +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,59 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
/**
|
||||
* 【新人特惠】【趣味游戏】【幸运天使】
|
||||
*/
|
||||
public class LiveRoomActivityBanner extends BaseModel{
|
||||
@SerializedName("name")
|
||||
private String name;
|
||||
@SerializedName("img")
|
||||
private String img;
|
||||
@SerializedName("link")
|
||||
private String link;
|
||||
@SerializedName("is_hidden")
|
||||
private int hidden;
|
||||
@SerializedName("show_type")
|
||||
private String type;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getImg() {
|
||||
return img;
|
||||
}
|
||||
|
||||
public void setImg(String img) {
|
||||
this.img = img;
|
||||
}
|
||||
|
||||
public String getLink() {
|
||||
return link;
|
||||
}
|
||||
|
||||
public void setLink(String link) {
|
||||
this.link = link;
|
||||
}
|
||||
|
||||
public int getHidden() {
|
||||
return hidden;
|
||||
}
|
||||
|
||||
public void setHidden(int hidden) {
|
||||
this.hidden = hidden;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
}
|
@ -8,6 +8,7 @@ import com.yunbao.common.bean.FaceBookUpModel;
|
||||
import com.yunbao.common.bean.HourRank;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.bean.LiveInfoModel;
|
||||
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
||||
import com.yunbao.common.bean.MsgSwitchDetailModel;
|
||||
import com.yunbao.common.bean.NewPeopleInfo;
|
||||
import com.yunbao.common.bean.NobleRankHideUserListModel;
|
||||
@ -241,4 +242,10 @@ public interface PDLiveApi {
|
||||
*/
|
||||
@GET("/api/public/?service=StarChallenge.getStarChallengeStatus")
|
||||
Observable<ResponseModel<StarChallengeStatusModel>> getStarChallengeStatus(@Query("liveUid") String liveUid);
|
||||
|
||||
/**
|
||||
* 【新人特惠】【趣味游戏】【幸运天使】
|
||||
*/
|
||||
@GET("/api/public/?service=Live.getLiveRoomActivtyBanner")
|
||||
Observable<ResponseModel<List<LiveRoomActivityBanner>>> getLiveRoomActivityBanner();
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.ActiveModel;
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
import com.yunbao.common.bean.LiveInfoModel;
|
||||
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
||||
import com.yunbao.common.bean.NobleRankHideUserListModel;
|
||||
import com.yunbao.common.bean.NobleTrumpetModel;
|
||||
import com.yunbao.common.bean.SetAttentsModel;
|
||||
@ -233,4 +234,23 @@ public class LiveNetManager {
|
||||
callback.onError(throwable.getMessage());
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取 【新人特惠】【趣味游戏】【幸运天使】
|
||||
*
|
||||
*/
|
||||
public void getLiveRoomActivityBanner(HttpCallback<List<LiveRoomActivityBanner>> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getLiveRoomActivityBanner()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(listResponseModel -> {
|
||||
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||
}, throwable -> {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
throwable.printStackTrace();
|
||||
}).isDisposed();
|
||||
}
|
||||
}
|
||||
|
@ -67,74 +67,6 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/fan_club"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="28dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@mipmap/live_more_icon_fans" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/fan_club"
|
||||
android:textColor="#FF9A9A9A"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/guard_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="28dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@mipmap/live_more_icon_guard" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/guard_guard"
|
||||
android:textColor="#FF9A9A9A"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/noble_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="28dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@mipmap/live_more_icon_aristocrat" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/noble"
|
||||
android:textColor="#FF9A9A9A"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/live_wks_layout"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -103,7 +103,7 @@
|
||||
<string name="fans">粉絲</string>
|
||||
<string name="no_mic_opn">Opps… 主播沒有開啟語音連麥</string>
|
||||
<string name="fanss">粉絲</string>
|
||||
<string name="noble">貴族</string>
|
||||
<string name="noble">貴族爵位</string>
|
||||
<string name="free">免費贈送</string>
|
||||
|
||||
<string name="fans_my_fans">我的粉絲</string>
|
||||
@ -121,7 +121,7 @@
|
||||
<string name="guard_my">我的</string>
|
||||
<string name="diamond">鑽石</string>
|
||||
|
||||
<string name="guard_guard">守護</string>
|
||||
<string name="guard_guard">主播守护</string>
|
||||
<string name="guard_week_con">本周貢獻</string>
|
||||
<string name="guard_no_data">主播正在等待您的守護!</string>
|
||||
<string name="guard_tip_0">快去為喜歡的主播開通守護吧</string>
|
||||
|
@ -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",
|
||||
|
@ -0,0 +1,69 @@
|
||||
package com.yunbao.live.dialog;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.Gravity;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.yunbao.common.dialog.AbsDialogFragment;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.event.LiveAudienceEvent;
|
||||
|
||||
public class LiveRoleDialogFragment extends AbsDialogFragment {
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.dialog_live_role;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getDialogStyle() {
|
||||
return R.style.dialog2;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canCancel() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setWindowAttributes(Window window) {
|
||||
window.setWindowAnimations(R.style.bottomToTopAnim);
|
||||
WindowManager.LayoutParams params = window.getAttributes();
|
||||
params.width = WindowManager.LayoutParams.MATCH_PARENT;
|
||||
params.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
params.gravity = Gravity.BOTTOM;
|
||||
window.setAttributes(params);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
//粉丝团
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.fan_club), () -> {
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.FAN_CLUB));
|
||||
dismiss();
|
||||
}
|
||||
);
|
||||
//守护
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.guard_layout), () -> {
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.GUARD));
|
||||
dismiss();
|
||||
}
|
||||
);
|
||||
|
||||
//贵族
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.noble_layout), () -> {
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.NOBLE));
|
||||
dismiss();
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
@ -9,11 +9,8 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.ActiveModel;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.common.dialog.AbsDialogFragment;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.live.adapter.FunGamesAdapter;
|
||||
@ -22,8 +19,6 @@ import com.yunbao.live.event.LiveAudienceEvent;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 直播间合计弹窗
|
||||
*/
|
||||
@ -71,20 +66,6 @@ public class LiveTotalDialog extends AbsDialogFragment {
|
||||
// public void onError(String error) {
|
||||
// }
|
||||
// });
|
||||
//粉丝团
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.fan_club), () -> {
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.FAN_CLUB));
|
||||
dismiss();
|
||||
}
|
||||
);
|
||||
//守护
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.guard_layout), () -> {
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.GUARD));
|
||||
dismiss();
|
||||
}
|
||||
);
|
||||
//周星榜
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.live_wks_layout), () -> {
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
@ -92,13 +73,6 @@ public class LiveTotalDialog extends AbsDialogFragment {
|
||||
dismiss();
|
||||
}
|
||||
);
|
||||
//贵族
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.noble_layout), () -> {
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.NOBLE));
|
||||
dismiss();
|
||||
}
|
||||
);
|
||||
//连麦
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.live_link_mic), () -> {
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
|
@ -0,0 +1,18 @@
|
||||
package com.yunbao.live.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.ms.banner.holder.BannerViewHolder;
|
||||
import com.yunbao.common.bean.BannerBean;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
|
||||
public class Banner4CustomViewHolder implements BannerViewHolder<BannerBean> {
|
||||
@Override
|
||||
public View createView(Context context, int position, BannerBean data) {
|
||||
ImageView icon=new ImageView(context);
|
||||
ImgLoader.display(context,data.getImageUrl(),icon);
|
||||
return icon;
|
||||
}
|
||||
}
|
@ -32,10 +32,8 @@ import com.opensource.svgaplayer.SVGAParser;
|
||||
import com.opensource.svgaplayer.SVGAVideoEntity;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.bean.NewPeopleInfo;
|
||||
import com.yunbao.common.event.MessageIMEvent;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.API;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.HttpClient;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
@ -52,6 +50,7 @@ import com.yunbao.live.bean.LiveChatBean;
|
||||
import com.yunbao.live.dialog.LiveHDDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveMicUserDialogFragment;
|
||||
import com.yunbao.live.dialog.LivePromotionDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveRoleDialogFragment;
|
||||
import com.yunbao.live.dialog.VoiceDialog;
|
||||
import com.yunbao.live.event.LiveAudienceEvent;
|
||||
|
||||
@ -61,9 +60,6 @@ import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/10/9.
|
||||
* 观众直播间逻辑
|
||||
@ -85,6 +81,9 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
||||
private String newPeopleUrl = null;
|
||||
private View mNewPeopleRedDot;
|
||||
private LinearLayout voiceButton;
|
||||
private ImageView mRole;//特权
|
||||
private ImageView mPlay;//玩
|
||||
private ImageView mCheat;//整蛊
|
||||
|
||||
public LiveAudienceViewHolder(Context context, ViewGroup parentView) {
|
||||
super(context, parentView);
|
||||
@ -203,9 +202,15 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
||||
svga_new_user_double = (SVGAImageView) findViewById(R.id.svga_new_user_double);
|
||||
svga_new_user_follow = (SVGAImageView) findViewById(R.id.svga_new_user_follow);
|
||||
viewFlipper = (ViewFlipper) findViewById(R.id.viewflipper_banner);
|
||||
mRole = (ImageView) findViewById(R.id.live_privilege);
|
||||
mCheat = (ImageView) findViewById(R.id.live_cheat);
|
||||
mPlay = (ImageView) findViewById(R.id.live_play);
|
||||
stationHornBanner = findViewById(R.id.station_horn_banner);
|
||||
mNewPeopleRedDot = findViewById(R.id.live_new_people_red_dot);
|
||||
liveNewPeople.setOnClickListener(this);
|
||||
mRole.setOnClickListener(this);
|
||||
mCheat.setOnClickListener(this);
|
||||
mPlay.setOnClickListener(this);
|
||||
svga_new_user_double.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
@ -271,6 +276,9 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
||||
String language = locale.getLanguage();
|
||||
|
||||
ImgLoader.display(mContext, TextUtils.equals(language, "zh") ? R.mipmap.live_icon_new_people_cn : R.mipmap.live_icon_newpeople_en, liveNewPeople);
|
||||
ImgLoader.display(mContext, TextUtils.equals(language, "zh") ? R.mipmap.live_icon_role : R.mipmap.live_icon_role_en, mRole);
|
||||
ImgLoader.display(mContext, TextUtils.equals(language, "zh") ? R.mipmap.live_icon_play : R.mipmap.live_icon_play_en, mPlay);
|
||||
ImgLoader.display(mContext, TextUtils.equals(language, "zh") ? R.mipmap.live_icon_cheat : R.mipmap.live_icon_cheat_en, mCheat);
|
||||
|
||||
voiceButton.setOnTouchListener((v, event) -> {
|
||||
if (event.getAction() == MotionEvent.ACTION_DOWN) {
|
||||
@ -416,6 +424,12 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
||||
openZGListWindow();
|
||||
} else if (i == R.id.live_new_people) {
|
||||
openNewPeopleDialog();
|
||||
} else if (i == R.id.live_privilege){
|
||||
openRoleDialog();
|
||||
}else if(i==R.id.live_cheat){
|
||||
|
||||
}else if (i==R.id.live_play){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -456,6 +470,14 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
||||
liveHDDialogFragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
|
||||
}
|
||||
|
||||
/**
|
||||
* 身份特权
|
||||
*/
|
||||
public void openRoleDialog(){
|
||||
LiveRoleDialogFragment fragment=new LiveRoleDialogFragment();
|
||||
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveRoleDialogFragment");
|
||||
}
|
||||
|
||||
|
||||
//消息中心
|
||||
@Subscribe(threadMode = ThreadMode.MAIN, sticky = true)
|
||||
|
@ -67,6 +67,7 @@ import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.bean.LevelBean;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.common.bean.LiveGiftBean;
|
||||
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
||||
import com.yunbao.common.bean.MsgModel;
|
||||
import com.yunbao.common.bean.StarChallengeStatusModel;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
@ -276,14 +277,14 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
|
||||
public WindowManager windowManager;
|
||||
// public boolean isRy = false;
|
||||
private Banner mBanner1, mBanner2, mBanner3;
|
||||
private Banner mBanner1, mBanner2, mBanner3, mBanner4;
|
||||
private List<BannerBean> mBannerList1 = new ArrayList<>();
|
||||
private List<BannerBean> mBannerList2 = new ArrayList<>();
|
||||
private List<BannerBean> mBannerList3 = new ArrayList<>();
|
||||
private LinearLayout btn_event2, btn_event3;
|
||||
private List<BannerBean> mBannerList4 = new ArrayList<>();
|
||||
private LinearLayout btn_event2, btn_event3, btn_event4;
|
||||
private ImageView imgEvent;
|
||||
private View btnEvent;
|
||||
private View btnEvent3;
|
||||
private LinearLayout lt_trickery;
|
||||
private TextView tv_trickery_time;
|
||||
|
||||
@ -627,14 +628,15 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
btnEvent = findViewById(R.id.btn_event);
|
||||
fullScreen = (FullServiceNotificationView) findViewById(R.id.full_screen);
|
||||
noble = (NobleNoticeView) findViewById(R.id.noble);
|
||||
btnEvent3 = findViewById(R.id.btn_event3);
|
||||
btn_event3 = (LinearLayout) findViewById(R.id.btn_event3);
|
||||
imgEvent = (ImageView) findViewById(R.id.img_event);
|
||||
btn_event2 = (LinearLayout) findViewById(R.id.btn_event2);
|
||||
btn_event3 = (LinearLayout) findViewById(R.id.btn_event3);
|
||||
btn_event4 = (LinearLayout) findViewById(R.id.btn_event4);
|
||||
mBanner1 = (Banner) findViewById(R.id.banner1);
|
||||
time = (TextView) findViewById(R.id.time);
|
||||
mBanner2 = (Banner) findViewById(R.id.banner2);
|
||||
mBanner3 = (Banner) findViewById(R.id.banner3);
|
||||
mBanner4 = (Banner) findViewById(R.id.banner4);
|
||||
pkText1 = (TextView) findViewById(R.id.pk_text1);
|
||||
pkText2 = (TextView) findViewById(R.id.pk_text2);
|
||||
pkText3 = (TextView) findViewById(R.id.pk_text3);
|
||||
@ -1278,6 +1280,29 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
});
|
||||
}
|
||||
|
||||
public void showLiveRoomActivityBanner() {
|
||||
LiveNetManager.get(mContext)
|
||||
.getLiveRoomActivityBanner(new com.yunbao.common.http.base.HttpCallback<List<LiveRoomActivityBanner>>() {
|
||||
@Override
|
||||
public void onSuccess(List<LiveRoomActivityBanner> data) {
|
||||
mBannerList4.clear();
|
||||
for (LiveRoomActivityBanner datum : data) {
|
||||
BannerBean bean = new BannerBean();
|
||||
bean.setLink(datum.getLink());
|
||||
bean.setImageUrl(datum.getImg());
|
||||
bean.setShow_type(datum.getType());
|
||||
mBannerList4.add(bean);
|
||||
}
|
||||
showBanner4();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void showBanner() {
|
||||
if (mBannerList1 == null || mBannerList1.size() == 0 || mBanner1 == null) {
|
||||
return;
|
||||
@ -1463,7 +1488,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
* @param giftCount 礼物数量
|
||||
*/
|
||||
public void updataWishList(String giftId, int giftCount) {
|
||||
if (!(mContext instanceof LiveAudienceActivity)){
|
||||
if (!(mContext instanceof LiveAudienceActivity)) {
|
||||
for (WishlistItemModel model : wishlist) {
|
||||
if (TextUtils.equals(giftId, model.getLid())) {
|
||||
int number = Integer.parseInt(model.getWishlistProgress()) + giftCount;
|
||||
@ -2922,7 +2947,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
* 展示新人任务 Banner
|
||||
*/
|
||||
private void showBanner3(LiveGiftBean bean1) {
|
||||
btnEvent3.setVisibility(View.VISIBLE);
|
||||
btn_event3.setVisibility(View.VISIBLE);
|
||||
if (mBannerList3 == null || mBannerList3.size() == 0 || mBanner3 == null || bean1 == null) {
|
||||
return;
|
||||
}
|
||||
@ -2951,6 +2976,44 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
.start();
|
||||
}
|
||||
|
||||
private void showBanner4() {
|
||||
btn_event4.setVisibility(View.VISIBLE);
|
||||
if (mBannerList4 == null || mBannerList4.size() == 0 || mBanner4 == null) {
|
||||
return;
|
||||
}
|
||||
for (BannerBean bean : mBannerList4) {
|
||||
Log.i("debug", "showBanner4: " + bean.toString());
|
||||
}
|
||||
mBanner4.setAutoPlay(true)
|
||||
.setPages(mBannerList4, new Banner4CustomViewHolder())
|
||||
.setDelayTime(3000)
|
||||
.setBannerStyle(BannerConfig.NOT_INDICATOR)
|
||||
.setOnBannerClickListener(new OnBannerClickListener() {
|
||||
@Override
|
||||
public void onBannerClick(List datas, int p) {
|
||||
Log.i("debug", "onBannerClick: " + mBannerList4.get(p).toString());
|
||||
String url = mBannerList4.get(p).getLink();
|
||||
if (!url.startsWith("http")) {
|
||||
url = CommonAppConfig.HOST + url;
|
||||
}
|
||||
if (url.contains("?")) {
|
||||
url += "&";
|
||||
} else {
|
||||
url += "?";
|
||||
}
|
||||
url += "uid=" + CommonAppConfig.getInstance().getUid() + "&token="
|
||||
+ CommonAppConfig.getInstance().getToken();
|
||||
Log.i("tag", url);
|
||||
Bundle bundle1 = new Bundle();
|
||||
bundle1.putString("url", url);
|
||||
LiveHDDialogFragment liveHDDialogFragment = new LiveHDDialogFragment();
|
||||
liveHDDialogFragment.setArguments(bundle1);
|
||||
liveHDDialogFragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
|
||||
}
|
||||
})
|
||||
.start();
|
||||
}
|
||||
|
||||
private int nowTime = 0;
|
||||
private int openType = 0;
|
||||
private boolean isClose = false;
|
||||
@ -3152,7 +3215,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
if (mBannerList3.get(0).getLink().equals("1")) {
|
||||
if (mBannerList3.get(1).getLink().equals("1")) {
|
||||
if (mBannerList3.get(2).getLink().equals("1")) {
|
||||
btnEvent3.setVisibility(View.GONE);
|
||||
btn_event3.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3163,7 +3226,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
if (mBannerList3.get(0).getLink().equals("1")) {
|
||||
if (mBannerList3.get(1).getLink().equals("1")) {
|
||||
if (mBannerList3.get(2).getLink().equals("1")) {
|
||||
btnEvent3.setVisibility(View.GONE);
|
||||
btn_event3.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3174,7 +3237,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
if (mBannerList3.get(0).getLink().equals("1")) {
|
||||
if (mBannerList3.get(1).getLink().equals("1")) {
|
||||
if (mBannerList3.get(2).getLink().equals("1")) {
|
||||
btnEvent3.setVisibility(View.GONE);
|
||||
btn_event3.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3319,8 +3382,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
/**
|
||||
* 幸运天使
|
||||
*/
|
||||
public void luckyAngel(MsgModel model){
|
||||
if(mLiveChatAdapter!=null){
|
||||
public void luckyAngel(MsgModel model) {
|
||||
if (mLiveChatAdapter != null) {
|
||||
LiveChatBean bean = new LiveChatBean();
|
||||
bean.setType(LiveChatBean.LUCKY_ANGEL);
|
||||
bean.setMsgModel(model);
|
||||
|
@ -294,6 +294,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
});
|
||||
enterRoom();
|
||||
mLiveRoomViewHolder.initHourRankList();
|
||||
mLiveRoomViewHolder.showLiveRoomActivityBanner();
|
||||
}
|
||||
});
|
||||
|
||||
|
9
live/src/main/res/drawable/bg_live_role.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:width="375dp" android:height="171dp">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#B3000000" />
|
||||
<corners android:topLeftRadius="8dp" android:topRightRadius="8dp" android:bottomLeftRadius="0dp" android:bottomRightRadius="0dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
101
live/src/main/res/layout/dialog_live_role.xml
Normal file
@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@drawable/bg_live_role"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="171dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:textColor="#F6F7FB"
|
||||
android:textSize="14sp"
|
||||
android:text="@string/live_role_title"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/items_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="50dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/title">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/guard_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@mipmap/live_more_icon_guard" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/guard_guard"
|
||||
android:textColor="#FF9A9A9A"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/noble_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="28dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@mipmap/live_more_icon_aristocrat" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/noble"
|
||||
android:textColor="#FF9A9A9A"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/fan_club"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="28dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@mipmap/live_more_icon_fans" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/fan_club"
|
||||
android:textColor="#FF9A9A9A"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -354,7 +354,7 @@
|
||||
android:layout_width="34dp"
|
||||
android:layout_height="34dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:src="@mipmap/live_icon_privilege" />
|
||||
android:src="@mipmap/live_icon_role" />
|
||||
<!--整蛊-->
|
||||
<ImageView
|
||||
android:id="@+id/live_cheat"
|
||||
|
@ -2042,7 +2042,31 @@
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/btn_event4"
|
||||
android:layout_width="67dp"
|
||||
android:layout_height="90dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_gravity="right"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible">
|
||||
|
||||
<com.ms.banner.Banner
|
||||
android:id="@+id/banner4"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
app:delay_time="5000"
|
||||
app:indicator_height="8dp"
|
||||
app:indicator_width="8dp" />
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/btn_event3"
|
||||
android:layout_width="67dp"
|
||||
|
BIN
live/src/main/res/mipmap-xhdpi/live_icon_role.png
Normal file
After Width: | Height: | Size: 6.0 KiB |
BIN
live/src/main/res/mipmap-xhdpi/live_icon_role_en.png
Normal file
After Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 7.1 KiB |
BIN
live/src/main/res/mipmap-xxxhdpi/live_icon_cheat_en.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 7.4 KiB |
BIN
live/src/main/res/mipmap-xxxhdpi/live_icon_play_en.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 26 KiB |
@ -24,5 +24,6 @@
|
||||
<string name="fingers_slide" translatable="false">手指上滑,取消發送</string>
|
||||
<string name="release_cancel_send" translatable="false">松開取消發送</string>
|
||||
<string name="more_than" translatable="false">已超过10秒未识别到录音</string>
|
||||
<string name="live_role_title" translatable="false">身份特權</string>
|
||||
<string name="noble_seat" translatable="false">貴族坐席</string>
|
||||
</resources>
|
||||
|