直播结束,悬浮窗
This commit is contained in:
454
common/src/main/java/com/yunbao/common/bean/LiveBean.java
Normal file
454
common/src/main/java/com/yunbao/common/bean/LiveBean.java
Normal file
@@ -0,0 +1,454 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2017/8/9.
|
||||
*/
|
||||
|
||||
public class LiveBean implements Parcelable {
|
||||
private String uid;
|
||||
private String avatar;
|
||||
private String avatarThumb;
|
||||
private String userNiceName;
|
||||
private String title;
|
||||
private String city;
|
||||
private String stream;
|
||||
private String pull;
|
||||
private String thumb;
|
||||
private String nums;
|
||||
private int sex;
|
||||
private String distance;
|
||||
private int levelAnchor;
|
||||
private int type;
|
||||
private String typeVal;
|
||||
private String goodNum;//主播的靓号
|
||||
private int gameAction;//正在进行的游戏的标识
|
||||
private String game;
|
||||
private String islive;//是否直播中
|
||||
private String isTop;//是否显示排行榜
|
||||
private String pk_avatar_thumb;//pk对方的头像
|
||||
private int landscape;//1h屏2s屏
|
||||
private String hot_num;//热调
|
||||
private String content_pic_size_one;//小
|
||||
private String content_pic_size_two;//中
|
||||
private String content_pic_size_three;//大
|
||||
private String is_week;
|
||||
private String img;
|
||||
private String url;
|
||||
private String drpk_status;
|
||||
private int is_rong;
|
||||
//是否關注 1,關注 2,未關注
|
||||
private String isattention = "";
|
||||
private String recommendCardtype = "";
|
||||
private String recommendCardIconSizeTwo = "";
|
||||
private String recommendCardIconSizeThree = "";
|
||||
|
||||
public String getRecommendCardIconSizeTwo() {
|
||||
return recommendCardIconSizeTwo;
|
||||
}
|
||||
|
||||
public LiveBean setRecommendCardIconSizeTwo(String recommendCardIconSizeTwo) {
|
||||
this.recommendCardIconSizeTwo = recommendCardIconSizeTwo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getRecommendCardIcon() {
|
||||
if (TextUtils.isEmpty(recommendCardIconSizeThree)) {
|
||||
if (!TextUtils.isEmpty(recommendCardIconSizeTwo)) {
|
||||
return recommendCardIconSizeTwo;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return recommendCardIconSizeThree;
|
||||
}
|
||||
}
|
||||
|
||||
public String getRecommendCardIconSizeThree() {
|
||||
return recommendCardIconSizeThree;
|
||||
}
|
||||
|
||||
public LiveBean setRecommendCardIconSizeThree(String recommendCardIconSizeThree) {
|
||||
this.recommendCardIconSizeThree = recommendCardIconSizeThree;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getRecommendcardtype() {
|
||||
return recommendCardtype;
|
||||
}
|
||||
|
||||
public void setRecommendcardtype(String recommendcardtype) {
|
||||
this.recommendCardtype = recommendcardtype;
|
||||
}
|
||||
|
||||
public String getIsattention() {
|
||||
return isattention;
|
||||
}
|
||||
|
||||
public LiveBean setIsattention(String isattention) {
|
||||
this.isattention = isattention;
|
||||
return this;
|
||||
}
|
||||
|
||||
private List<WeekListBean> mWeekList = new ArrayList<>();
|
||||
|
||||
public List<WeekListBean> getmWeekList() {
|
||||
return mWeekList;
|
||||
}
|
||||
|
||||
public void setmWeekList(List<WeekListBean> mWeekList) {
|
||||
this.mWeekList = mWeekList;
|
||||
}
|
||||
|
||||
public int getIs_rong() {
|
||||
return is_rong;
|
||||
}
|
||||
|
||||
public void setIs_rong(int is_rong) {
|
||||
this.is_rong = is_rong;
|
||||
}
|
||||
|
||||
public String getDrpk_status() {
|
||||
return drpk_status;
|
||||
}
|
||||
|
||||
public void setDrpk_status(String drpk_status) {
|
||||
this.drpk_status = drpk_status;
|
||||
}
|
||||
|
||||
public String getImg() {
|
||||
return img;
|
||||
}
|
||||
|
||||
public void setImg(String img) {
|
||||
this.img = img;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public String getIs_week() {
|
||||
return is_week;
|
||||
}
|
||||
|
||||
public void setIs_week(String is_week) {
|
||||
this.is_week = is_week;
|
||||
}
|
||||
|
||||
public String getContent_pic_size_one() {
|
||||
return content_pic_size_one;
|
||||
}
|
||||
|
||||
public void setContent_pic_size_one(String content_pic_size_one) {
|
||||
this.content_pic_size_one = content_pic_size_one;
|
||||
}
|
||||
|
||||
public String getContent_pic_size_two() {
|
||||
return content_pic_size_two;
|
||||
}
|
||||
|
||||
public void setContent_pic_size_two(String content_pic_size_two) {
|
||||
this.content_pic_size_two = content_pic_size_two;
|
||||
}
|
||||
|
||||
public String getContent_pic_size_three() {
|
||||
return content_pic_size_three;
|
||||
}
|
||||
|
||||
public void setContent_pic_size_three(String content_pic_size_three) {
|
||||
this.content_pic_size_three = content_pic_size_three;
|
||||
}
|
||||
|
||||
public String getHot_num() {
|
||||
return hot_num;
|
||||
}
|
||||
|
||||
public void setHot_num(String hot_num) {
|
||||
this.hot_num = hot_num;
|
||||
}
|
||||
|
||||
public int getLandscape() {
|
||||
return landscape;
|
||||
}
|
||||
|
||||
public void setLandscape(int landscape) {
|
||||
this.landscape = landscape;
|
||||
}
|
||||
|
||||
public String getPk_avatar_thumb() {
|
||||
return pk_avatar_thumb;
|
||||
}
|
||||
|
||||
public void setPk_avatar_thumb(String pk_avatar_thumb) {
|
||||
this.pk_avatar_thumb = pk_avatar_thumb;
|
||||
}
|
||||
|
||||
public String getIsTop() {
|
||||
return isTop;
|
||||
}
|
||||
|
||||
public void setIsTop(String isTop) {
|
||||
this.isTop = isTop;
|
||||
}
|
||||
|
||||
public String getDistance() {
|
||||
return distance;
|
||||
}
|
||||
|
||||
public void setDistance(String distance) {
|
||||
this.distance = distance;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(String uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
@JSONField(name = "avatar_thumb")
|
||||
public String getAvatarThumb() {
|
||||
return avatarThumb;
|
||||
}
|
||||
|
||||
@JSONField(name = "avatar_thumb")
|
||||
public void setAvatarThumb(String avatarThumb) {
|
||||
this.avatarThumb = avatarThumb;
|
||||
}
|
||||
|
||||
@JSONField(name = "user_nicename")
|
||||
public String getUserNiceName() {
|
||||
|
||||
return userNiceName;
|
||||
}
|
||||
|
||||
@JSONField(name = "user_nicename")
|
||||
public void setUserNiceName(String userNiceName) {
|
||||
this.userNiceName = userNiceName;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getStream() {
|
||||
return stream;
|
||||
}
|
||||
|
||||
public void setStream(String stream) {
|
||||
this.stream = stream;
|
||||
}
|
||||
|
||||
public String getPull() {
|
||||
return pull;
|
||||
}
|
||||
|
||||
public void setPull(String pull) {
|
||||
this.pull = pull;
|
||||
}
|
||||
|
||||
public String getThumb() {
|
||||
return thumb;
|
||||
}
|
||||
|
||||
public void setThumb(String thumb) {
|
||||
this.thumb = thumb;
|
||||
}
|
||||
|
||||
|
||||
public String getNums() {
|
||||
return nums;
|
||||
}
|
||||
|
||||
public void setNums(String nums) {
|
||||
this.nums = nums;
|
||||
}
|
||||
|
||||
@JSONField(name = "level_anchor")
|
||||
public int getLevelAnchor() {
|
||||
return levelAnchor;
|
||||
}
|
||||
|
||||
@JSONField(name = "level_anchor")
|
||||
public void setLevelAnchor(int levelAnchor) {
|
||||
this.levelAnchor = levelAnchor;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@JSONField(name = "type_val")
|
||||
public String getTypeVal() {
|
||||
return typeVal;
|
||||
}
|
||||
|
||||
@JSONField(name = "type_val")
|
||||
public void setTypeVal(String typeVal) {
|
||||
this.typeVal = typeVal;
|
||||
}
|
||||
|
||||
@JSONField(name = "goodnum")
|
||||
public String getGoodNum() {
|
||||
return goodNum;
|
||||
}
|
||||
|
||||
@JSONField(name = "goodnum")
|
||||
public void setGoodNum(String goodNum) {
|
||||
this.goodNum = goodNum;
|
||||
}
|
||||
|
||||
@JSONField(name = "game_action")
|
||||
public int getGameAction() {
|
||||
return gameAction;
|
||||
}
|
||||
|
||||
@JSONField(name = "game_action")
|
||||
public void setGameAction(int gameAction) {
|
||||
this.gameAction = gameAction;
|
||||
}
|
||||
|
||||
public String getGame() {
|
||||
return game;
|
||||
}
|
||||
|
||||
public void setGame(String game) {
|
||||
this.game = game;
|
||||
}
|
||||
|
||||
public int getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(int sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
@JSONField(name = "islive")
|
||||
public String getIslive() {
|
||||
return islive;
|
||||
}
|
||||
|
||||
public void setIslive(String islive) {
|
||||
this.islive = islive;
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示靓号
|
||||
*/
|
||||
public String getLiangNameTip() {
|
||||
if (!TextUtils.isEmpty(this.goodNum) && !"0".equals(this.goodNum)) {
|
||||
return WordUtil.getString(R.string.live_liang) + ":" + this.goodNum;
|
||||
}
|
||||
return "ID:" + this.uid;
|
||||
}
|
||||
|
||||
public LiveBean() {
|
||||
|
||||
}
|
||||
|
||||
private LiveBean(Parcel in) {
|
||||
this.uid = in.readString();
|
||||
this.avatar = in.readString();
|
||||
this.avatarThumb = in.readString();
|
||||
this.userNiceName = in.readString();
|
||||
this.sex = in.readInt();
|
||||
this.title = in.readString();
|
||||
this.city = in.readString();
|
||||
this.stream = in.readString();
|
||||
this.pull = in.readString();
|
||||
this.thumb = in.readString();
|
||||
this.nums = in.readString();
|
||||
this.distance = in.readString();
|
||||
this.levelAnchor = in.readInt();
|
||||
this.type = in.readInt();
|
||||
this.typeVal = in.readString();
|
||||
this.goodNum = in.readString();
|
||||
this.gameAction = in.readInt();
|
||||
this.game = in.readString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeString(this.uid);
|
||||
dest.writeString(this.avatar);
|
||||
dest.writeString(this.avatarThumb);
|
||||
dest.writeString(this.userNiceName);
|
||||
dest.writeInt(this.sex);
|
||||
dest.writeString(this.title);
|
||||
dest.writeString(this.city);
|
||||
dest.writeString(this.stream);
|
||||
dest.writeString(this.pull);
|
||||
dest.writeString(this.thumb);
|
||||
dest.writeString(this.nums);
|
||||
dest.writeString(this.distance);
|
||||
dest.writeInt(this.levelAnchor);
|
||||
dest.writeInt(this.type);
|
||||
dest.writeString(this.typeVal);
|
||||
dest.writeString(this.goodNum);
|
||||
dest.writeInt(this.gameAction);
|
||||
dest.writeString(this.game);
|
||||
}
|
||||
|
||||
public static final Creator<LiveBean> CREATOR = new Creator<LiveBean>() {
|
||||
@Override
|
||||
public LiveBean[] newArray(int size) {
|
||||
return new LiveBean[size];
|
||||
}
|
||||
|
||||
@Override
|
||||
public LiveBean createFromParcel(Parcel in) {
|
||||
return new LiveBean(in);
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "uid: " + uid + " , userNiceName: " + userNiceName + " ,playUrl: " + pull;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
|
||||
/**
|
||||
* 悬浮窗直播通知
|
||||
*/
|
||||
public class LiveFloatEvent extends BaseModel {
|
||||
private LiveBean mLiveBean;
|
||||
private int mLiveType;
|
||||
private int mLiveSDK;
|
||||
private int mLiveTypeVal;
|
||||
|
||||
public LiveBean getmLiveBean() {
|
||||
return mLiveBean;
|
||||
}
|
||||
|
||||
public LiveFloatEvent setmLiveBean(LiveBean mLiveBean) {
|
||||
this.mLiveBean = mLiveBean;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getmLiveType() {
|
||||
return mLiveType;
|
||||
}
|
||||
|
||||
public LiveFloatEvent setmLiveType(int mLiveType) {
|
||||
this.mLiveType = mLiveType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getmLiveSDK() {
|
||||
return mLiveSDK;
|
||||
}
|
||||
|
||||
public LiveFloatEvent setmLiveSDK(int mLiveSDK) {
|
||||
this.mLiveSDK = mLiveSDK;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getmLiveTypeVal() {
|
||||
return mLiveTypeVal;
|
||||
}
|
||||
|
||||
public LiveFloatEvent setmLiveTypeVal(int mLiveTypeVal) {
|
||||
this.mLiveTypeVal = mLiveTypeVal;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.HtmlConfig;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2019/2/25.
|
||||
@@ -26,6 +27,7 @@ public class RouteUtil {
|
||||
public static final String PATH_FACEBOOKACTIVITY = "/baidu/FacebookLoginActivity";
|
||||
public static final String PATH_MAIN = "/main/MainActivity";
|
||||
public static final String PATH_ENTRY = "/main/EntryActivity";
|
||||
public static final String PATH_LIVE_AUDIENCE = "/live/LiveAudienceActivity";
|
||||
|
||||
/**
|
||||
* 启动页
|
||||
@@ -112,6 +114,18 @@ public class RouteUtil {
|
||||
.navigation();
|
||||
}
|
||||
|
||||
/**
|
||||
* 打开直播页面
|
||||
*/
|
||||
public static void forwardLiveAudienceActivity(LiveBean mLiveBean, int mLiveType, int mLiveSDK, int mLiveTypeVal) {
|
||||
ARouter.getInstance().build(PATH_LIVE_AUDIENCE)
|
||||
.withParcelable(Constants.LIVE_BEAN, mLiveBean)
|
||||
.withInt(Constants.LIVE_TYPE, mLiveType)
|
||||
.withInt(Constants.LIVE_SDK, mLiveSDK)
|
||||
.withInt(Constants.LIVE_TYPE_VAL, mLiveTypeVal)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
/**
|
||||
* 举报个人
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user