Merge branch 'master' into dev_proguard
@ -86,6 +86,7 @@
|
|||||||
<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY" />
|
<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY" />
|
||||||
<queries>
|
<queries>
|
||||||
<package android:name="com.twitter.android"/>
|
<package android:name="com.twitter.android"/>
|
||||||
|
<package android:name="jp.naver.line.android"/>
|
||||||
|
|
||||||
</queries>
|
</queries>
|
||||||
<application
|
<application
|
||||||
|
BIN
app/src/main/res/drawable/no_banner.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
@ -179,6 +179,10 @@ public class Constants {
|
|||||||
public static final String CUSTOM_FULL_SERVICE_NOTIFY = "customFullServiceNotify";//全服通知
|
public static final String CUSTOM_FULL_SERVICE_NOTIFY = "customFullServiceNotify";//全服通知
|
||||||
public static final String XYD_COMPLETE = "XydComplete";//心愿单完成通知
|
public static final String XYD_COMPLETE = "XydComplete";//心愿单完成通知
|
||||||
public static final String WISH_LIST_PROGRESS = "wishListProgress";//心愿单进度通知
|
public static final String WISH_LIST_PROGRESS = "wishListProgress";//心愿单进度通知
|
||||||
|
public static final String LIVE_VOTE_CREATE="createVote";
|
||||||
|
public static final String LIVE_VOTE_UPDATE="updateVote";
|
||||||
|
public static final String LIVE_VOTE_END="endVote";
|
||||||
|
public static final String LIVE_PK_END="endPK";//结束PK,以这个PK获取到的参数为准
|
||||||
|
|
||||||
//游戏socket
|
//游戏socket
|
||||||
public static final String SOCKET_GAME_ZJH = "startGame";//炸金花
|
public static final String SOCKET_GAME_ZJH = "startGame";//炸金花
|
||||||
|
@ -82,7 +82,6 @@ public class WebViewActivity extends AbsActivity {
|
|||||||
ft_title = (FrameLayout) findViewById(R.id.ft_title);
|
ft_title = (FrameLayout) findViewById(R.id.ft_title);
|
||||||
v_spacing = (View) findViewById(R.id.v_spacing);
|
v_spacing = (View) findViewById(R.id.v_spacing);
|
||||||
mWebView = findViewById(R.id.webView);
|
mWebView = findViewById(R.id.webView);
|
||||||
AndroidBug5497Workaround.assistActivity(this);
|
|
||||||
|
|
||||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
|
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
|
||||||
params.topMargin = DpUtil.dp2px(1);
|
params.topMargin = DpUtil.dp2px(1);
|
||||||
@ -110,10 +109,11 @@ public class WebViewActivity extends AbsActivity {
|
|||||||
mWebView.loadUrl("javascript:goAnchorTab()");
|
mWebView.loadUrl("javascript:goAnchorTab()");
|
||||||
}
|
}
|
||||||
//真实屏幕高度-(ft_title的高度+导航栏高度)
|
//真实屏幕高度-(ft_title的高度+导航栏高度)
|
||||||
int height = DeviceUtils.getScreenRealHeight(mContext) - DpUtil.dp2px(72) - getCurrentNavigationBarHeight(mContext);
|
//屏蔽掉是因为在线客服页面 AndroidBug5497Workaround会失效
|
||||||
|
/* int height = DeviceUtils.getScreenRealHeight(mContext) - DpUtil.dp2px(72) - getCurrentNavigationBarHeight(mContext);
|
||||||
if (!navigationGestureEnabled(mContext)) {
|
if (!navigationGestureEnabled(mContext)) {
|
||||||
view.loadUrl("javascript:window.androidObject.setHeight(" + height + ",0,false)");
|
view.loadUrl("javascript:window.androidObject.setHeight(" + height + ",0,false)");
|
||||||
}
|
}*/
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -171,6 +171,7 @@ public class WebViewActivity extends AbsActivity {
|
|||||||
mWebView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
mWebView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||||
}
|
}
|
||||||
mWebView.loadUrl(url);
|
mWebView.loadUrl(url);
|
||||||
|
AndroidBug5497Workaround.assistActivity(this);
|
||||||
|
|
||||||
if (Constants.myIntoIndex == 2) {
|
if (Constants.myIntoIndex == 2) {
|
||||||
ft_title.setVisibility(View.GONE);
|
ft_title.setVisibility(View.GONE);
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.yunbao.common.adapter;
|
package com.yunbao.common.adapter;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.text.TextUtils;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@ -48,12 +49,22 @@ public class DrawerTaskAdapter extends RecyclerView.Adapter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getItemCount() {
|
public int getItemCount() {
|
||||||
return 2;
|
if (child.size()>3){
|
||||||
|
return 3;
|
||||||
|
}else {
|
||||||
|
return child.size();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateData(List<CustomSidebarChildModel> mChild) {
|
public void updateData(List<CustomSidebarChildModel> mChild) {
|
||||||
child.clear();
|
child.clear();
|
||||||
child.addAll(mChild);
|
child.addAll(mChild);
|
||||||
|
// for (CustomSidebarChildModel childModel : mChild) {
|
||||||
|
// if (TextUtils.equals("1", childModel.getIsShow())) {
|
||||||
|
// child.add(childModel);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,99 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class BlindBoxInfoModel extends BaseModel {
|
||||||
|
/**
|
||||||
|
* "info":[{"item_name":["麒麟勛章饰品","麒麟頭像框饰品","麒麟坐騎饰品","水晶项链礼物","夢幻水晶球礼物","心動泡泡礼物","蝴蝶少女礼物","金色唱片礼物","鑽石禮盒礼物","紙花船礼物"],"threshold_value":268,"threshold_dress_name":"麒麟坐騎","dress_threshold_value":0,"blind_box_type":1,"blind_box_id":1636},{"item_name":["金鳳勛章饰品","金鳳頭像框饰品","金鳳坐騎饰品","浪漫氣球礼物","捕夢網礼物","仙女棒礼物","藍寶石鈴鐺礼物","榮耀星礼物","童話屋礼物","夢幻許願池礼物"],"threshold_value":198,"threshold_dress_name":"金鳳坐騎","dress_threshold_value":0,"blind_box_type":2,"blind_box_id":1637},{"item_name":["神龍勛章饰品","神龍頭像框饰品","神龍坐騎饰品","水晶玫瑰礼物","sweet香水礼物","甜蜜熱氣球礼物","風鈴舞動礼物","音樂噴泉礼物","星空列車礼物","漂洋過海來看你礼物"],"threshold_value":128,"threshold_dress_name":"神龍坐騎","dress_threshold_value":0,"blind_box_type":3,"blind_box_id":1638}]
|
||||||
|
*/
|
||||||
|
@SerializedName("item_name")
|
||||||
|
private List<String> itemName;
|
||||||
|
@SerializedName("threshold_value")
|
||||||
|
private String thresholdValue = "0";
|
||||||
|
@SerializedName("threshold_dress_name")
|
||||||
|
private String thresholdDressName;
|
||||||
|
@SerializedName("dress_threshold_value")
|
||||||
|
private String dressThresholdValue;
|
||||||
|
@SerializedName("blind_box_type")
|
||||||
|
private String blindBoxType;
|
||||||
|
@SerializedName("blind_box_id")
|
||||||
|
private String blindBoxId;
|
||||||
|
@SerializedName("blind_box_swf")
|
||||||
|
private String blindBoxSwf;
|
||||||
|
@SerializedName("threshold_effect_src")
|
||||||
|
private String thresholdEffectSrc;
|
||||||
|
|
||||||
|
public String getThresholdEffectSrc() {
|
||||||
|
return thresholdEffectSrc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BlindBoxInfoModel setThresholdEffectSrc(String thresholdEffectSrc) {
|
||||||
|
this.thresholdEffectSrc = thresholdEffectSrc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBlindBoxSwf() {
|
||||||
|
return blindBoxSwf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BlindBoxInfoModel setBlindBoxSwf(String blindBoxSwf) {
|
||||||
|
this.blindBoxSwf = blindBoxSwf;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getItemName() {
|
||||||
|
return itemName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BlindBoxInfoModel setItemName(List<String> itemName) {
|
||||||
|
this.itemName = itemName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getThresholdValue() {
|
||||||
|
return thresholdValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BlindBoxInfoModel setThresholdValue(String thresholdValue) {
|
||||||
|
this.thresholdValue = thresholdValue;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getThresholdDressName() {
|
||||||
|
return thresholdDressName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BlindBoxInfoModel setThresholdDressName(String thresholdDressName) {
|
||||||
|
this.thresholdDressName = thresholdDressName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDressThresholdValue() {
|
||||||
|
return dressThresholdValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BlindBoxInfoModel setDressThresholdValue(String dressThresholdValue) {
|
||||||
|
this.dressThresholdValue = dressThresholdValue;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBlindBoxType() {
|
||||||
|
return blindBoxType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BlindBoxInfoModel setBlindBoxType(String blindBoxType) {
|
||||||
|
this.blindBoxType = blindBoxType;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBlindBoxId() {
|
||||||
|
return blindBoxId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BlindBoxInfoModel setBlindBoxId(String blindBoxId) {
|
||||||
|
this.blindBoxId = blindBoxId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
@ -31,7 +31,18 @@ public class CustomSidebarChildModel extends BaseModel {
|
|||||||
@SerializedName("activity_id")
|
@SerializedName("activity_id")
|
||||||
private String activityId;
|
private String activityId;
|
||||||
@SerializedName("flag")
|
@SerializedName("flag")
|
||||||
private String flag;
|
private String flag = "";
|
||||||
|
@SerializedName("is_show")
|
||||||
|
private String isShow;
|
||||||
|
|
||||||
|
public String getIsShow() {
|
||||||
|
return isShow;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomSidebarChildModel setIsShow(String isShow) {
|
||||||
|
this.isShow = isShow;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public String getFlag() {
|
public String getFlag() {
|
||||||
return flag;
|
return flag;
|
||||||
|
@ -104,12 +104,22 @@ public class EnterRoomInfoModel extends BaseModel {
|
|||||||
private String anchorGoodnum;
|
private String anchorGoodnum;
|
||||||
@SerializedName("jackpot_level")
|
@SerializedName("jackpot_level")
|
||||||
private String jackpotLevel="-1";
|
private String jackpotLevel="-1";
|
||||||
|
@SerializedName("live_vote")
|
||||||
|
private LiveRoomVoteModel voteModel;
|
||||||
|
|
||||||
public String getJackpotLevel() {
|
public String getJackpotLevel() {
|
||||||
|
|
||||||
return jackpotLevel;
|
return jackpotLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LiveRoomVoteModel getVoteModel() {
|
||||||
|
return voteModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVoteModel(LiveRoomVoteModel voteModel) {
|
||||||
|
this.voteModel = voteModel;
|
||||||
|
}
|
||||||
|
|
||||||
public EnterRoomInfoModel setJackpotLevel(String jackpotLevel) {
|
public EnterRoomInfoModel setJackpotLevel(String jackpotLevel) {
|
||||||
this.jackpotLevel = jackpotLevel;
|
this.jackpotLevel = jackpotLevel;
|
||||||
return this;
|
return this;
|
||||||
@ -488,6 +498,9 @@ public class EnterRoomInfoModel extends BaseModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getIsleave() {
|
public String getIsleave() {
|
||||||
|
if(StringUtil.isEmpty(isleave)){
|
||||||
|
isleave="0";
|
||||||
|
}
|
||||||
return isleave;
|
return isleave;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ public class LiveGiftBean {
|
|||||||
// public static final int MARK_LUCK = 3;
|
// public static final int MARK_LUCK = 3;
|
||||||
|
|
||||||
private int id;
|
private int id;
|
||||||
private int type;//0 普通礼物 1是豪华礼物
|
private int type;//0 普通礼物 1是贵族 2守护 3粉丝团 5盲盒礼物
|
||||||
private int mark;// 0 普通 1热门 2守护 3幸运
|
private int mark;// 0 普通 1热门 2守护 3幸运
|
||||||
private String name;
|
private String name;
|
||||||
private String price;
|
private String price;
|
||||||
@ -34,6 +34,17 @@ public class LiveGiftBean {
|
|||||||
private String isweek;
|
private String isweek;
|
||||||
private String end_time;
|
private String end_time;
|
||||||
private String tag;
|
private String tag;
|
||||||
|
@JSONField(name = "blind_box_type")
|
||||||
|
private int blind_box_type = 0;
|
||||||
|
|
||||||
|
public int getBlind_box_type() {
|
||||||
|
return blind_box_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveGiftBean setBlind_box_type(int blind_box_type) {
|
||||||
|
this.blind_box_type = blind_box_type;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public String getTag() {
|
public String getTag() {
|
||||||
return tag;
|
return tag;
|
||||||
|
@ -0,0 +1,193 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import com.yunbao.common.utils.StringUtil;
|
||||||
|
import com.yunbao.common.utils.WordUtil;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主播创建投票
|
||||||
|
* {
|
||||||
|
* "live_vote_id": "20",
|
||||||
|
* "question_content": "123",
|
||||||
|
* "vote_end_time": 180,
|
||||||
|
* "option_content_first_num": 0,
|
||||||
|
* "option_content_second_num": 0,
|
||||||
|
* "users_id": []
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
public class LiveRoomVoteModel extends BaseModel {
|
||||||
|
@SerializedName("vote_status")
|
||||||
|
private int status;
|
||||||
|
@SerializedName("live_vote_id")
|
||||||
|
private String voteId;
|
||||||
|
@SerializedName("question_content")
|
||||||
|
private String content;
|
||||||
|
@SerializedName("vote_end_time")
|
||||||
|
private int time;
|
||||||
|
@SerializedName("option_content_first_num")
|
||||||
|
private int answer1Num;
|
||||||
|
@SerializedName("option_content_second_num")
|
||||||
|
private int answer2Num;
|
||||||
|
@SerializedName("users_id")
|
||||||
|
private List<String> userIds;
|
||||||
|
@SerializedName("option_content_first")
|
||||||
|
private String answer1;
|
||||||
|
@SerializedName("option_content_second")
|
||||||
|
private String answer2;
|
||||||
|
@SerializedName("result_zh")
|
||||||
|
private String resultZh;
|
||||||
|
@SerializedName("result_en")
|
||||||
|
private String resultEn;
|
||||||
|
@SerializedName("option_text")
|
||||||
|
private String optionText;
|
||||||
|
@SerializedName("option_content_key")
|
||||||
|
private String vote;
|
||||||
|
|
||||||
|
private String liveUid;
|
||||||
|
|
||||||
|
public String getLiveUid() {
|
||||||
|
return liveUid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLiveUid(String liveUid) {
|
||||||
|
this.liveUid = liveUid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAnswer1() {
|
||||||
|
return answer1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAnswer1(String answer1) {
|
||||||
|
this.answer1 = answer1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAnswer2() {
|
||||||
|
return answer2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAnswer2(String answer2) {
|
||||||
|
this.answer2 = answer2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVoteId() {
|
||||||
|
return voteId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVoteId(String voteId) {
|
||||||
|
this.voteId = voteId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContent() {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContent(String content) {
|
||||||
|
this.content = content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getTime() {
|
||||||
|
return time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTime(int time) {
|
||||||
|
this.time = time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getAnswer1Num() {
|
||||||
|
return answer1Num;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAnswer1Num(int answer1Num) {
|
||||||
|
this.answer1Num = answer1Num;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getAnswer2Num() {
|
||||||
|
return answer2Num;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAnswer2Num(int answer2Num) {
|
||||||
|
this.answer2Num = answer2Num;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getUserIds() {
|
||||||
|
return userIds;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserIds(List<String> userIds) {
|
||||||
|
this.userIds = userIds;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(int status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getResult() {
|
||||||
|
return WordUtil.isNewZh() ? resultZh : resultEn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getResultZh() {
|
||||||
|
return resultZh;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResultZh(String resultZh) {
|
||||||
|
this.resultZh = resultZh;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getResultEn() {
|
||||||
|
return resultEn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResultEn(String resultEn) {
|
||||||
|
this.resultEn = resultEn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOptionText() {
|
||||||
|
return optionText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOptionText(String optionText) {
|
||||||
|
this.optionText = optionText;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "LiveRoomVoteModel{" +
|
||||||
|
"status=" + status +
|
||||||
|
", voteId='" + voteId + '\'' +
|
||||||
|
", content='" + content + '\'' +
|
||||||
|
", time=" + time +
|
||||||
|
", answer1Num=" + answer1Num +
|
||||||
|
", answer2Num=" + answer2Num +
|
||||||
|
", userIds=" + userIds +
|
||||||
|
", answer1='" + answer1 + '\'' +
|
||||||
|
", answer2='" + answer2 + '\'' +
|
||||||
|
", resultZh='" + resultZh + '\'' +
|
||||||
|
", resultEn='" + resultEn + '\'' +
|
||||||
|
", optionText='" + optionText + '\'' +
|
||||||
|
", vote='" + vote + '\'' +
|
||||||
|
", liveUid='" + liveUid + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVote() {
|
||||||
|
return vote;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVote(String vote) {
|
||||||
|
this.vote = vote;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isVoteLeft() {
|
||||||
|
return vote.equals("option_content_first_num");
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isVote() {
|
||||||
|
return !StringUtil.isEmpty(vote);
|
||||||
|
}
|
||||||
|
}
|
@ -50,7 +50,7 @@ public class UserBean implements Parcelable {
|
|||||||
private String fans_pic;
|
private String fans_pic;
|
||||||
private String gifticon;
|
private String gifticon;
|
||||||
private String department_name;
|
private String department_name;
|
||||||
private String token_rong="";
|
private String token_rong = "";
|
||||||
private String noble_end_time;
|
private String noble_end_time;
|
||||||
private String slide;
|
private String slide;
|
||||||
private String users_type;
|
private String users_type;
|
||||||
@ -66,6 +66,17 @@ public class UserBean implements Parcelable {
|
|||||||
private boolean randomPk;
|
private boolean randomPk;
|
||||||
//随机天梯排位赛PK img,仅在主播PK时使用
|
//随机天梯排位赛PK img,仅在主播PK时使用
|
||||||
private String mRankPkImgUrl;
|
private String mRankPkImgUrl;
|
||||||
|
//是否填写完整资料
|
||||||
|
private int user_info_complete;
|
||||||
|
|
||||||
|
public int getUserInfoComplete() {
|
||||||
|
return user_info_complete;
|
||||||
|
}
|
||||||
|
|
||||||
|
public UserBean seUserInfoComplete(int userInfoComplete) {
|
||||||
|
this.user_info_complete = userInfoComplete;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isRandomPk() {
|
public boolean isRandomPk() {
|
||||||
return randomPk;
|
return randomPk;
|
||||||
@ -117,8 +128,8 @@ public class UserBean implements Parcelable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getIs_bind() {
|
public String getIs_bind() {
|
||||||
if(StringUtil.isEmpty(is_bind)){
|
if (StringUtil.isEmpty(is_bind)) {
|
||||||
is_bind="0";
|
is_bind = "0";
|
||||||
}
|
}
|
||||||
return is_bind;
|
return is_bind;
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,9 @@ public abstract class AbsDialogPopupWindow extends BottomPopupView {
|
|||||||
this.mContext = context;
|
this.mContext = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <a href="https://github.com/li-xiaojun/XPopup/wiki/5.-%E5%B8%B8%E7%94%A8%E8%AE%BE%E7%BD%AE">参考配置</a>
|
||||||
|
*/
|
||||||
public abstract void buildDialog(XPopup.Builder builder);
|
public abstract void buildDialog(XPopup.Builder builder);
|
||||||
public abstract int bindLayoutId();
|
public abstract int bindLayoutId();
|
||||||
|
|
||||||
|
@ -0,0 +1,142 @@
|
|||||||
|
package com.yunbao.common.event;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import com.yunbao.common.bean.BaseModel;
|
||||||
|
|
||||||
|
public class AllServerNotifyEvent extends BaseModel {
|
||||||
|
//礼物图标
|
||||||
|
@SerializedName("gifticon")
|
||||||
|
private String giftIcon;
|
||||||
|
//用户名
|
||||||
|
@SerializedName("userNiceName")
|
||||||
|
private String userNiceName;
|
||||||
|
//礼物名称
|
||||||
|
@SerializedName("giftname")
|
||||||
|
private String giftName;
|
||||||
|
//盲盒名称
|
||||||
|
@SerializedName("box_type_name")
|
||||||
|
private String boxTypeName;
|
||||||
|
//饰品名称
|
||||||
|
@SerializedName("dress_name")
|
||||||
|
private String dressName;
|
||||||
|
//区分礼物还是饰品 lw 1 sp 0
|
||||||
|
@SerializedName("gift_notification")
|
||||||
|
private String giftNotification;
|
||||||
|
//盲盒礼物ID
|
||||||
|
@SerializedName("blind_box_id")
|
||||||
|
private String blindBoxId;
|
||||||
|
//盲盒类型
|
||||||
|
@SerializedName("box_type")
|
||||||
|
private String boxType;
|
||||||
|
//饰品图片
|
||||||
|
@SerializedName("display_src")
|
||||||
|
private String displaySrc;
|
||||||
|
//主播名字
|
||||||
|
@SerializedName("ancherName")
|
||||||
|
private String anchorName;
|
||||||
|
|
||||||
|
public String getAnchorName() {
|
||||||
|
return anchorName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AllServerNotifyEvent setAnchorName(String anchorName) {
|
||||||
|
this.anchorName = anchorName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDisplaySrc() {
|
||||||
|
return displaySrc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AllServerNotifyEvent setDisplaySrc(String displaySrc) {
|
||||||
|
this.displaySrc = displaySrc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBoxType() {
|
||||||
|
return boxType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AllServerNotifyEvent setBoxType(String boxType) {
|
||||||
|
this.boxType = boxType;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGiftIcon() {
|
||||||
|
return giftIcon;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AllServerNotifyEvent setGiftIcon(String giftIcon) {
|
||||||
|
this.giftIcon = giftIcon;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserNiceName() {
|
||||||
|
return userNiceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AllServerNotifyEvent setUserNiceName(String userNiceName) {
|
||||||
|
this.userNiceName = userNiceName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGiftName() {
|
||||||
|
return giftName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AllServerNotifyEvent setGiftName(String giftName) {
|
||||||
|
this.giftName = giftName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBoxTypeName() {
|
||||||
|
return boxTypeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AllServerNotifyEvent setBoxTypeName(String boxTypeName) {
|
||||||
|
this.boxTypeName = boxTypeName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDressName() {
|
||||||
|
return dressName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AllServerNotifyEvent setDressName(String dressName) {
|
||||||
|
this.dressName = dressName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGiftNotification() {
|
||||||
|
return giftNotification;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AllServerNotifyEvent setGiftNotification(String giftNotification) {
|
||||||
|
this.giftNotification = giftNotification;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBlindBoxId() {
|
||||||
|
return blindBoxId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AllServerNotifyEvent setBlindBoxId(String blindBoxId) {
|
||||||
|
this.blindBoxId = blindBoxId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "\n" + "AllServerNotifyEvent{" + "\n" +
|
||||||
|
"giftIcon='" + giftIcon + '\'' + "\n" +
|
||||||
|
", userNiceName='" + userNiceName + '\'' + "\n" +
|
||||||
|
", giftName='" + giftName + '\'' + "\n" +
|
||||||
|
", boxTypeName='" + boxTypeName + '\'' + "\n" +
|
||||||
|
", dressName='" + dressName + '\'' + "\n" +
|
||||||
|
", giftNotification='" + giftNotification + '\'' + "\n" +
|
||||||
|
", blindBoxId='" + blindBoxId + '\'' + "\n" +
|
||||||
|
", boxType='" + boxType + '\'' + "\n" +
|
||||||
|
", displaySrc='" + displaySrc + '\'' + "\n" +
|
||||||
|
'}' + "\n" ;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
package com.yunbao.common.event;
|
||||||
|
|
||||||
|
import com.yunbao.common.bean.BaseModel;
|
||||||
|
|
||||||
|
public class CompleteInformationEvent extends BaseModel {
|
||||||
|
private boolean completeInformation = false;
|
||||||
|
|
||||||
|
public boolean isCompleteInformation() {
|
||||||
|
return completeInformation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CompleteInformationEvent setCompleteInformation(boolean completeInformation) {
|
||||||
|
this.completeInformation = completeInformation;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,559 @@
|
|||||||
|
package com.yunbao.common.event;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import com.yunbao.common.bean.BaseModel;
|
||||||
|
|
||||||
|
public class SendBlindGiftEvent extends BaseModel {
|
||||||
|
|
||||||
|
@SerializedName("uid")
|
||||||
|
private String uid;
|
||||||
|
@SerializedName("giftid")
|
||||||
|
private String giftid;
|
||||||
|
@SerializedName("type")
|
||||||
|
private String type;
|
||||||
|
@SerializedName("mark")
|
||||||
|
private String mark;
|
||||||
|
@SerializedName("wrap_gift_num")
|
||||||
|
private String wrapGiftNum;
|
||||||
|
@SerializedName("giftcount")
|
||||||
|
private String giftcount;
|
||||||
|
@SerializedName("totalcoin")
|
||||||
|
private String totalcoin;
|
||||||
|
@SerializedName("giftname")
|
||||||
|
private String giftname;
|
||||||
|
@SerializedName("giftnameen")
|
||||||
|
private String giftnameen;
|
||||||
|
@SerializedName("gifticon")
|
||||||
|
private String gifticon;
|
||||||
|
@SerializedName("swftime")
|
||||||
|
private String swftime;
|
||||||
|
@SerializedName("swftype")
|
||||||
|
private String swftype;
|
||||||
|
@SerializedName("swf")
|
||||||
|
private String swf;
|
||||||
|
@SerializedName("level")
|
||||||
|
private String level;
|
||||||
|
@SerializedName("medal_name")
|
||||||
|
private String medalName;
|
||||||
|
@SerializedName("medal_level")
|
||||||
|
private String medalLevel;
|
||||||
|
@SerializedName("coin")
|
||||||
|
private String coin;
|
||||||
|
@SerializedName("gold")
|
||||||
|
private String gold;
|
||||||
|
@SerializedName("votestotal")
|
||||||
|
private String votestotal;
|
||||||
|
@SerializedName("medalRankNum")
|
||||||
|
private String medalRankNum;
|
||||||
|
@SerializedName("ispk")
|
||||||
|
private String ispk;
|
||||||
|
@SerializedName("pkuid")
|
||||||
|
private String pkuid;
|
||||||
|
@SerializedName("pkuid1")
|
||||||
|
private String pkuid1;
|
||||||
|
@SerializedName("pkuid2")
|
||||||
|
private String pkuid2;
|
||||||
|
@SerializedName("pktotal1")
|
||||||
|
private String pktotal1;
|
||||||
|
@SerializedName("pktotal2")
|
||||||
|
private String pktotal2;
|
||||||
|
@SerializedName("active_total")
|
||||||
|
private String activeTotal;
|
||||||
|
@SerializedName("blind_box_status")
|
||||||
|
private String blindBoxStatus;
|
||||||
|
@SerializedName("gift_id")
|
||||||
|
private String giftId;
|
||||||
|
@SerializedName("gift_type")
|
||||||
|
private String giftType;
|
||||||
|
@SerializedName("needcoin")
|
||||||
|
private String needcoin;
|
||||||
|
@SerializedName("gift_msg")
|
||||||
|
private String giftMsg;
|
||||||
|
@SerializedName("gift_colour")
|
||||||
|
private String giftColour;
|
||||||
|
@SerializedName("box_type")
|
||||||
|
private String boxType;
|
||||||
|
@SerializedName("box_type_name")
|
||||||
|
private String boxTypeName;
|
||||||
|
@SerializedName("action")
|
||||||
|
private String action;
|
||||||
|
@SerializedName("dress_notification")
|
||||||
|
private String dressNotification;
|
||||||
|
@SerializedName("dress_type")
|
||||||
|
private Object dressType;
|
||||||
|
@SerializedName("dress_id")
|
||||||
|
private Object dressId;
|
||||||
|
@SerializedName("dress_name")
|
||||||
|
private String dressName;
|
||||||
|
@SerializedName("display_src")
|
||||||
|
private Object displaySrc;
|
||||||
|
@SerializedName("effect_src")
|
||||||
|
private Object effectSrc;
|
||||||
|
@SerializedName("dress_description")
|
||||||
|
private Object dressDescription;
|
||||||
|
@SerializedName("noble_dress")
|
||||||
|
private Object nobleDress;
|
||||||
|
@SerializedName("dress_msg")
|
||||||
|
private String dressMsg;
|
||||||
|
@SerializedName("dress_colour")
|
||||||
|
private String dressColour;
|
||||||
|
@SerializedName("dress_threshold_value")
|
||||||
|
private String dressThresholdValue;
|
||||||
|
@SerializedName("threshold_value")
|
||||||
|
private String thresholdValue;
|
||||||
|
@SerializedName("live_gift_notify")
|
||||||
|
private String liveGiftNotify;
|
||||||
|
@SerializedName("userNiceName")
|
||||||
|
private String userNiceName;
|
||||||
|
|
||||||
|
public String getUserNiceName() {
|
||||||
|
return userNiceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getThresholdValue() {
|
||||||
|
return thresholdValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setThresholdValue(String thresholdValue) {
|
||||||
|
this.thresholdValue = thresholdValue;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setUserNiceName(String userNiceName) {
|
||||||
|
this.userNiceName = userNiceName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUid() {
|
||||||
|
return uid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setUid(String uid) {
|
||||||
|
this.uid = uid;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGiftid() {
|
||||||
|
return giftid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setGiftid(String giftid) {
|
||||||
|
this.giftid = giftid;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMark() {
|
||||||
|
return mark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setMark(String mark) {
|
||||||
|
this.mark = mark;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWrapGiftNum() {
|
||||||
|
return wrapGiftNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setWrapGiftNum(String wrapGiftNum) {
|
||||||
|
this.wrapGiftNum = wrapGiftNum;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGiftcount() {
|
||||||
|
return giftcount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setGiftcount(String giftcount) {
|
||||||
|
this.giftcount = giftcount;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTotalcoin() {
|
||||||
|
return totalcoin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setTotalcoin(String totalcoin) {
|
||||||
|
this.totalcoin = totalcoin;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGiftname() {
|
||||||
|
return giftname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setGiftname(String giftname) {
|
||||||
|
this.giftname = giftname;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGiftnameen() {
|
||||||
|
return giftnameen;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setGiftnameen(String giftnameen) {
|
||||||
|
this.giftnameen = giftnameen;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGifticon() {
|
||||||
|
return gifticon;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setGifticon(String gifticon) {
|
||||||
|
this.gifticon = gifticon;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSwftime() {
|
||||||
|
return swftime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setSwftime(String swftime) {
|
||||||
|
this.swftime = swftime;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSwftype() {
|
||||||
|
return swftype;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setSwftype(String swftype) {
|
||||||
|
this.swftype = swftype;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSwf() {
|
||||||
|
return swf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setSwf(String swf) {
|
||||||
|
this.swf = swf;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLevel() {
|
||||||
|
return level;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setLevel(String level) {
|
||||||
|
this.level = level;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMedalName() {
|
||||||
|
return medalName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setMedalName(String medalName) {
|
||||||
|
this.medalName = medalName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMedalLevel() {
|
||||||
|
return medalLevel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setMedalLevel(String medalLevel) {
|
||||||
|
this.medalLevel = medalLevel;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCoin() {
|
||||||
|
return coin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setCoin(String coin) {
|
||||||
|
this.coin = coin;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGold() {
|
||||||
|
return gold;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setGold(String gold) {
|
||||||
|
this.gold = gold;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVotestotal() {
|
||||||
|
return votestotal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setVotestotal(String votestotal) {
|
||||||
|
this.votestotal = votestotal;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMedalRankNum() {
|
||||||
|
return medalRankNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setMedalRankNum(String medalRankNum) {
|
||||||
|
this.medalRankNum = medalRankNum;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIspk() {
|
||||||
|
return ispk;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setIspk(String ispk) {
|
||||||
|
this.ispk = ispk;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String isPkuid() {
|
||||||
|
return pkuid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setPkuid(String pkuid) {
|
||||||
|
this.pkuid = pkuid;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPkuid1() {
|
||||||
|
return pkuid1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setPkuid1(String pkuid1) {
|
||||||
|
this.pkuid1 = pkuid1;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPkuid2() {
|
||||||
|
return pkuid2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setPkuid2(String pkuid2) {
|
||||||
|
this.pkuid2 = pkuid2;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPktotal1() {
|
||||||
|
return pktotal1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setPktotal1(String pktotal1) {
|
||||||
|
this.pktotal1 = pktotal1;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPktotal2() {
|
||||||
|
return pktotal2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setPktotal2(String pktotal2) {
|
||||||
|
this.pktotal2 = pktotal2;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getActiveTotal() {
|
||||||
|
return activeTotal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setActiveTotal(String activeTotal) {
|
||||||
|
this.activeTotal = activeTotal;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String isBlindBoxStatus() {
|
||||||
|
return blindBoxStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setBlindBoxStatus(String blindBoxStatus) {
|
||||||
|
this.blindBoxStatus = blindBoxStatus;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGiftId() {
|
||||||
|
return giftId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setGiftId(String giftId) {
|
||||||
|
this.giftId = giftId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGiftType() {
|
||||||
|
return giftType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setGiftType(String giftType) {
|
||||||
|
this.giftType = giftType;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNeedcoin() {
|
||||||
|
return needcoin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setNeedcoin(String needcoin) {
|
||||||
|
this.needcoin = needcoin;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGiftMsg() {
|
||||||
|
return giftMsg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setGiftMsg(String giftMsg) {
|
||||||
|
this.giftMsg = giftMsg;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getGiftColour() {
|
||||||
|
return giftColour;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setGiftColour(String giftColour) {
|
||||||
|
this.giftColour = giftColour;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBoxType() {
|
||||||
|
return boxType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setBoxType(String boxType) {
|
||||||
|
this.boxType = boxType;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBoxTypeName() {
|
||||||
|
return boxTypeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setBoxTypeName(String boxTypeName) {
|
||||||
|
this.boxTypeName = boxTypeName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAction() {
|
||||||
|
return action;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setAction(String action) {
|
||||||
|
this.action = action;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String isDressNotification() {
|
||||||
|
return dressNotification;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setDressNotification(String dressNotification) {
|
||||||
|
this.dressNotification = dressNotification;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getDressType() {
|
||||||
|
return dressType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setDressType(Object dressType) {
|
||||||
|
this.dressType = dressType;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getDressId() {
|
||||||
|
return dressId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setDressId(Object dressId) {
|
||||||
|
this.dressId = dressId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDressName() {
|
||||||
|
return dressName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setDressName(String dressName) {
|
||||||
|
this.dressName = dressName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getDisplaySrc() {
|
||||||
|
return displaySrc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setDisplaySrc(Object displaySrc) {
|
||||||
|
this.displaySrc = displaySrc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getEffectSrc() {
|
||||||
|
return effectSrc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setEffectSrc(Object effectSrc) {
|
||||||
|
this.effectSrc = effectSrc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getDressDescription() {
|
||||||
|
return dressDescription;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setDressDescription(Object dressDescription) {
|
||||||
|
this.dressDescription = dressDescription;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getNobleDress() {
|
||||||
|
return nobleDress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setNobleDress(Object nobleDress) {
|
||||||
|
this.nobleDress = nobleDress;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDressMsg() {
|
||||||
|
return dressMsg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setDressMsg(String dressMsg) {
|
||||||
|
this.dressMsg = dressMsg;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDressColour() {
|
||||||
|
return dressColour;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setDressColour(String dressColour) {
|
||||||
|
this.dressColour = dressColour;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDressThresholdValue() {
|
||||||
|
return dressThresholdValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setDressThresholdValue(String dressThresholdValue) {
|
||||||
|
this.dressThresholdValue = dressThresholdValue;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLiveGiftNotify() {
|
||||||
|
return liveGiftNotify;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setLiveGiftNotify(String liveGiftNotify) {
|
||||||
|
this.liveGiftNotify = liveGiftNotify;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
package com.yunbao.common.http;
|
package com.yunbao.common.http;
|
||||||
|
|
||||||
|
import android.app.Dialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
@ -21,6 +22,8 @@ import com.yunbao.common.manager.APKManager;
|
|||||||
import com.yunbao.common.manager.IMLoginManager;
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
import com.yunbao.common.manager.LiveClassManager;
|
import com.yunbao.common.manager.LiveClassManager;
|
||||||
import com.yunbao.common.manager.NewLevelManager;
|
import com.yunbao.common.manager.NewLevelManager;
|
||||||
|
import com.yunbao.common.utils.AppManager;
|
||||||
|
import com.yunbao.common.utils.DialogUitl;
|
||||||
import com.yunbao.common.utils.L;
|
import com.yunbao.common.utils.L;
|
||||||
import com.yunbao.common.utils.MD5Util;
|
import com.yunbao.common.utils.MD5Util;
|
||||||
import com.yunbao.common.utils.SpUtil;
|
import com.yunbao.common.utils.SpUtil;
|
||||||
@ -224,7 +227,8 @@ public class CommonHttpUtil {
|
|||||||
}
|
}
|
||||||
if (obj.containsKey("clarity")) {
|
if (obj.containsKey("clarity")) {
|
||||||
IMLoginManager.get(context).setClarity(obj.getString("clarity"));
|
IMLoginManager.get(context).setClarity(obj.getString("clarity"));
|
||||||
} if (obj.containsKey("defaultBubbleUrl")) {
|
}
|
||||||
|
if (obj.containsKey("defaultBubbleUrl")) {
|
||||||
IMLoginManager.get(context).setDefaultBubbleUrl(obj.getString("defaultBubbleUrl"));
|
IMLoginManager.get(context).setDefaultBubbleUrl(obj.getString("defaultBubbleUrl"));
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@ -232,6 +236,22 @@ public class CommonHttpUtil {
|
|||||||
String error = "info[0]:" + info[0] + "\n\n\n" + "Exception:" + e.getClass() + "---message--->" + e.getMessage();
|
String error = "info[0]:" + info[0] + "\n\n\n" + "Exception:" + e.getClass() + "---message--->" + e.getMessage();
|
||||||
ErrorActivity.forward("GetConfig接口返回数据异常", error);
|
ErrorActivity.forward("GetConfig接口返回数据异常", error);
|
||||||
}
|
}
|
||||||
|
} else if (code == 1000) {
|
||||||
|
new DialogUitl
|
||||||
|
.Builder(context)
|
||||||
|
.setContent(msg)
|
||||||
|
.setCancelable(false)
|
||||||
|
.setClickCallback3(new DialogUitl.SimpleCallback3() {
|
||||||
|
@Override
|
||||||
|
public void onConfirmClick(Dialog dialog) {
|
||||||
|
AppManager.getInstance().AppExit();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCancel() {
|
||||||
|
AppManager.getInstance().AppExit();
|
||||||
|
}
|
||||||
|
}).build().show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import com.yunbao.common.bean.ActiveModel;
|
import com.yunbao.common.bean.ActiveModel;
|
||||||
import com.yunbao.common.bean.AnchorRecommendModel;
|
import com.yunbao.common.bean.AnchorRecommendModel;
|
||||||
import com.yunbao.common.bean.BaseModel;
|
import com.yunbao.common.bean.BaseModel;
|
||||||
|
import com.yunbao.common.bean.BlindBoxInfoModel;
|
||||||
import com.yunbao.common.bean.CheckLiveModel;
|
import com.yunbao.common.bean.CheckLiveModel;
|
||||||
import com.yunbao.common.bean.ContributeModel;
|
import com.yunbao.common.bean.ContributeModel;
|
||||||
import com.yunbao.common.bean.CustomSidebarInfoModel;
|
import com.yunbao.common.bean.CustomSidebarInfoModel;
|
||||||
@ -21,6 +22,7 @@ import com.yunbao.common.bean.LiveAnchorSayModel;
|
|||||||
import com.yunbao.common.bean.LiveDataInfoModel;
|
import com.yunbao.common.bean.LiveDataInfoModel;
|
||||||
import com.yunbao.common.bean.LiveInfoModel;
|
import com.yunbao.common.bean.LiveInfoModel;
|
||||||
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
||||||
|
import com.yunbao.common.bean.LiveRoomVoteModel;
|
||||||
import com.yunbao.common.bean.LiveStetUpStatusModel;
|
import com.yunbao.common.bean.LiveStetUpStatusModel;
|
||||||
import com.yunbao.common.bean.LiveTaskModel;
|
import com.yunbao.common.bean.LiveTaskModel;
|
||||||
import com.yunbao.common.bean.LiveUserMailBoxModel;
|
import com.yunbao.common.bean.LiveUserMailBoxModel;
|
||||||
@ -398,7 +400,7 @@ public interface PDLiveApi {
|
|||||||
* 自由PK开始后调用接口扣掉次数
|
* 自由PK开始后调用接口扣掉次数
|
||||||
*/
|
*/
|
||||||
@GET("/api/public/?service=Livepk.setActivePkNum")
|
@GET("/api/public/?service=Livepk.setActivePkNum")
|
||||||
Observable<ResponseModel<BaseModel>> setFreePkNum();
|
Observable<ResponseModel<List<BaseModel>>> setFreePkNum();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 随机PK搜索用户
|
* 随机PK搜索用户
|
||||||
@ -694,4 +696,38 @@ public interface PDLiveApi {
|
|||||||
*/
|
*/
|
||||||
@GET("/api/public/?service=User.setLogOff")
|
@GET("/api/public/?service=User.setLogOff")
|
||||||
Observable<ResponseModel<List<Object>>> setLogOff();
|
Observable<ResponseModel<List<Object>>> setLogOff();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 领取完善资料奖励
|
||||||
|
*/
|
||||||
|
@GET("/api/public/?service=Task.userInfoTask")
|
||||||
|
Observable<ResponseModel<List<Object>>> userInfoTask();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建投票
|
||||||
|
*/
|
||||||
|
@GET("/api/public/?service=Live.createLiveVote")
|
||||||
|
Observable<ResponseModel<LiveRoomVoteModel>> createLiveVote(@Query("liveuid") String liveUid,
|
||||||
|
@Query("question_content") String content,
|
||||||
|
@Query("option_content_first") String first,
|
||||||
|
@Query("option_content_second") String second);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新投票
|
||||||
|
*/
|
||||||
|
@GET("/api/public/?service=Live.setLiveVote")
|
||||||
|
Observable<ResponseModel<List<String>>> updateLiveVote(@Query("liveuid") String liveUid,
|
||||||
|
@Query("option_content_key") String key);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主动结束投票
|
||||||
|
*/
|
||||||
|
@GET("/api/public/?service=Live.endLiveVote")
|
||||||
|
Observable<ResponseModel<List<String>>> endLiveVote(@Query("liveuid") String liveUid);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取盲盒礼物当前数据
|
||||||
|
*/
|
||||||
|
@GET("/api/public/?service=Live.getBlindBoxInfo")
|
||||||
|
Observable<ResponseModel<List<BlindBoxInfoModel>>> getBlindBoxInfo();
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import com.yunbao.common.Constants;
|
|||||||
import com.yunbao.common.R;
|
import com.yunbao.common.R;
|
||||||
import com.yunbao.common.bean.ActiveModel;
|
import com.yunbao.common.bean.ActiveModel;
|
||||||
import com.yunbao.common.bean.BaseModel;
|
import com.yunbao.common.bean.BaseModel;
|
||||||
|
import com.yunbao.common.bean.BlindBoxInfoModel;
|
||||||
import com.yunbao.common.bean.CheckLiveModel;
|
import com.yunbao.common.bean.CheckLiveModel;
|
||||||
import com.yunbao.common.bean.CustomSidebarInfoModel;
|
import com.yunbao.common.bean.CustomSidebarInfoModel;
|
||||||
import com.yunbao.common.bean.DiscountsModel;
|
import com.yunbao.common.bean.DiscountsModel;
|
||||||
@ -22,6 +23,7 @@ import com.yunbao.common.bean.LiveAnchorSayModel;
|
|||||||
import com.yunbao.common.bean.LiveDataInfoModel;
|
import com.yunbao.common.bean.LiveDataInfoModel;
|
||||||
import com.yunbao.common.bean.LiveInfoModel;
|
import com.yunbao.common.bean.LiveInfoModel;
|
||||||
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
||||||
|
import com.yunbao.common.bean.LiveRoomVoteModel;
|
||||||
import com.yunbao.common.bean.LiveStetUpStatusModel;
|
import com.yunbao.common.bean.LiveStetUpStatusModel;
|
||||||
import com.yunbao.common.bean.LiveTaskModel;
|
import com.yunbao.common.bean.LiveTaskModel;
|
||||||
import com.yunbao.common.bean.LiveUserMailBoxModel;
|
import com.yunbao.common.bean.LiveUserMailBoxModel;
|
||||||
@ -637,9 +639,9 @@ public class LiveNetManager {
|
|||||||
.setFreePkNum()
|
.setFreePkNum()
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.subscribe(new Consumer<ResponseModel<BaseModel>>() {
|
.subscribe(new Consumer<ResponseModel<List<BaseModel>>>() {
|
||||||
@Override
|
@Override
|
||||||
public void accept(ResponseModel<BaseModel> responseModel) throws Exception {
|
public void accept(ResponseModel<List<BaseModel>> listResponseModel) throws Exception {
|
||||||
|
|
||||||
}
|
}
|
||||||
}, new Consumer<Throwable>() {
|
}, new Consumer<Throwable>() {
|
||||||
@ -1427,6 +1429,127 @@ public class LiveNetManager {
|
|||||||
}).isDisposed();
|
}).isDisposed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void createLiveVote(String liveUid, String content, String first, String second, HttpCallback<LiveRoomVoteModel> callback) {
|
||||||
|
API.get().pdLiveApi(mContext)
|
||||||
|
.createLiveVote(liveUid, content, first, second)
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(new Consumer<ResponseModel<LiveRoomVoteModel>>() {
|
||||||
|
@Override
|
||||||
|
public void accept(ResponseModel<LiveRoomVoteModel> listResponseModel) throws Exception {
|
||||||
|
if (callback != null) {
|
||||||
|
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, new Consumer<Throwable>() {
|
||||||
|
@Override
|
||||||
|
public void accept(Throwable throwable) throws Exception {
|
||||||
|
if (callback != null) {
|
||||||
|
callback.onError(throwable.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).isDisposed();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateLiveVote(String liveUid, boolean isLeftVote, HttpCallback<String> callback) {
|
||||||
|
String key;
|
||||||
|
if (isLeftVote) {//是左边的投票
|
||||||
|
key = "option_content_first_num";
|
||||||
|
} else {
|
||||||
|
key = "option_content_second_num";
|
||||||
|
}
|
||||||
|
API.get().pdLiveApi(mContext)
|
||||||
|
.updateLiveVote(liveUid, key)
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(new Consumer<ResponseModel<List<String>>>() {
|
||||||
|
@Override
|
||||||
|
public void accept(ResponseModel<List<String>> listResponseModel) throws Exception {
|
||||||
|
if (callback != null) {
|
||||||
|
callback.onSuccess("");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, new Consumer<Throwable>() {
|
||||||
|
@Override
|
||||||
|
public void accept(Throwable throwable) throws Exception {
|
||||||
|
if (callback != null) {
|
||||||
|
callback.onError(throwable.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).isDisposed();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void endLiveVote(String liveUid, HttpCallback<String> callback) {
|
||||||
|
API.get().pdLiveApi(mContext)
|
||||||
|
.endLiveVote(liveUid)
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(new Consumer<ResponseModel<List<String>>>() {
|
||||||
|
@Override
|
||||||
|
public void accept(ResponseModel<List<String>> listResponseModel) throws Exception {
|
||||||
|
if (callback != null) {
|
||||||
|
callback.onSuccess(listResponseModel.getData().getMsg());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, new Consumer<Throwable>() {
|
||||||
|
@Override
|
||||||
|
public void accept(Throwable throwable) throws Exception {
|
||||||
|
if (callback != null) {
|
||||||
|
callback.onError(throwable.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).isDisposed();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void userInfoTask(HttpCallback<String> callback) {
|
||||||
|
API.get().pdLiveApi(mContext)
|
||||||
|
.userInfoTask()
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(new Consumer<ResponseModel<List<Object>>>() {
|
||||||
|
@Override
|
||||||
|
public void accept(ResponseModel<List<Object>> listResponseModel) throws Exception {
|
||||||
|
if (callback != null) {
|
||||||
|
callback.onSuccess(listResponseModel.getData().getMsg());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, new Consumer<Throwable>() {
|
||||||
|
@Override
|
||||||
|
public void accept(Throwable throwable) throws Exception {
|
||||||
|
if (callback != null) {
|
||||||
|
callback.onError(mContext.getString(R.string.net_error));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).isDisposed();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取盲盒礼物信息
|
||||||
|
*
|
||||||
|
* @param callback
|
||||||
|
*/
|
||||||
|
public void getBlindBoxInfo(HttpCallback<List<BlindBoxInfoModel>> callback) {
|
||||||
|
API.get().pdLiveApi(mContext)
|
||||||
|
.getBlindBoxInfo()
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(new Consumer<ResponseModel<List<BlindBoxInfoModel>>>() {
|
||||||
|
@Override
|
||||||
|
public void accept(ResponseModel<List<BlindBoxInfoModel>> listResponseModel) throws Exception {
|
||||||
|
if (callback != null) {
|
||||||
|
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, new Consumer<Throwable>() {
|
||||||
|
@Override
|
||||||
|
public void accept(Throwable throwable) throws Exception {
|
||||||
|
if (callback != null) {
|
||||||
|
callback.onError(mContext.getString(R.string.net_error));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).isDisposed();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 直播间取消网络请求
|
* 直播间取消网络请求
|
||||||
*/
|
*/
|
||||||
|
@ -6,6 +6,10 @@ import android.view.View;
|
|||||||
import android.view.ViewTreeObserver;
|
import android.view.ViewTreeObserver;
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修复全屏WebView输入法遮挡输入框的问题
|
||||||
|
* <a href="https://github.com/madebycm/AndroidBug5497Workaround/tree/master">GitHub</a>
|
||||||
|
*/
|
||||||
public class AndroidBug5497Workaround {
|
public class AndroidBug5497Workaround {
|
||||||
|
|
||||||
// For more information, see https://issuetracker.google.com/issues/36911528
|
// For more information, see https://issuetracker.google.com/issues/36911528
|
||||||
|
@ -121,7 +121,7 @@ public class AppManager {
|
|||||||
*/
|
*/
|
||||||
public static void runDebugCode(Runnable runnable) {
|
public static void runDebugCode(Runnable runnable) {
|
||||||
if (BuildConfig.DEBUG) {
|
if (BuildConfig.DEBUG) {
|
||||||
// runnable.run();
|
runnable.run();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,7 +8,6 @@ import android.os.Handler;
|
|||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
import android.text.InputFilter;
|
import android.text.InputFilter;
|
||||||
import android.text.InputType;
|
import android.text.InputType;
|
||||||
import android.text.Spanned;
|
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.text.format.DateFormat;
|
import android.text.format.DateFormat;
|
||||||
import android.util.SparseArray;
|
import android.util.SparseArray;
|
||||||
@ -331,7 +330,7 @@ public class DialogUitl {
|
|||||||
private Context mContext;
|
private Context mContext;
|
||||||
private String mTitle;
|
private String mTitle;
|
||||||
private String mContent;
|
private String mContent;
|
||||||
private String mConfrimString;
|
private String mConfirmString;
|
||||||
private String mCancelString;
|
private String mCancelString;
|
||||||
private boolean mCancelable;
|
private boolean mCancelable;
|
||||||
private boolean mBackgroundDimEnabled;//显示区域以外是否使用黑色半透明背景
|
private boolean mBackgroundDimEnabled;//显示区域以外是否使用黑色半透明背景
|
||||||
@ -371,8 +370,8 @@ public class DialogUitl {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder setConfrimString(String confrimString) {
|
public Builder setConfirmString(String confirmString) {
|
||||||
mConfrimString = confrimString;
|
mConfirmString = confirmString;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -460,8 +459,8 @@ public class DialogUitl {
|
|||||||
content.setFilters(new InputFilter[]{new InputFilter.LengthFilter(mLength)});
|
content.setFilters(new InputFilter[]{new InputFilter.LengthFilter(mLength)});
|
||||||
}
|
}
|
||||||
TextView btnConfirm = (TextView) dialog.findViewById(R.id.btn_confirm);
|
TextView btnConfirm = (TextView) dialog.findViewById(R.id.btn_confirm);
|
||||||
if (!TextUtils.isEmpty(mConfrimString)) {
|
if (!TextUtils.isEmpty(mConfirmString)) {
|
||||||
btnConfirm.setText(mConfrimString);
|
btnConfirm.setText(mConfirmString);
|
||||||
}
|
}
|
||||||
TextView btnCancel = (TextView) dialog.findViewById(R.id.btn_cancel);
|
TextView btnCancel = (TextView) dialog.findViewById(R.id.btn_cancel);
|
||||||
if (!TextUtils.isEmpty(mCancelString)) {
|
if (!TextUtils.isEmpty(mCancelString)) {
|
||||||
|
@ -50,7 +50,7 @@ public class VersionUtil {
|
|||||||
DialogUitl.Builder builder = new DialogUitl.Builder(context);
|
DialogUitl.Builder builder = new DialogUitl.Builder(context);
|
||||||
builder.setTitle(context.getString(R.string.version_update))
|
builder.setTitle(context.getString(R.string.version_update))
|
||||||
.setContent(configBean.getUpdateDes())
|
.setContent(configBean.getUpdateDes())
|
||||||
.setConfrimString(context.getString(R.string.version_immediate_use))
|
.setConfirmString(context.getString(R.string.version_immediate_use))
|
||||||
.setCancelString(context.getString(R.string.version_not_update))
|
.setCancelString(context.getString(R.string.version_not_update))
|
||||||
.setCancelable(false)
|
.setCancelable(false)
|
||||||
.setClickCallback(new DialogUitl.SimpleCallback2() {
|
.setClickCallback(new DialogUitl.SimpleCallback2() {
|
||||||
@ -81,7 +81,7 @@ public class VersionUtil {
|
|||||||
DialogUitl.Builder builder = new DialogUitl.Builder(context);
|
DialogUitl.Builder builder = new DialogUitl.Builder(context);
|
||||||
builder.setTitle(context.getString(R.string.version_update))
|
builder.setTitle(context.getString(R.string.version_update))
|
||||||
.setContent(configBean.getUpdateDes())
|
.setContent(configBean.getUpdateDes())
|
||||||
.setConfrimString(context.getString(R.string.version_immediate_use))
|
.setConfirmString(context.getString(R.string.version_immediate_use))
|
||||||
.setCancelString(context.getString(R.string.version_not_update))
|
.setCancelString(context.getString(R.string.version_not_update))
|
||||||
.setCancelable(false)
|
.setCancelable(false)
|
||||||
.setClickCallback(new DialogUitl.SimpleCallback2() {
|
.setClickCallback(new DialogUitl.SimpleCallback2() {
|
||||||
@ -111,7 +111,7 @@ public class VersionUtil {
|
|||||||
DialogUitl.Builder builder = new DialogUitl.Builder(context);
|
DialogUitl.Builder builder = new DialogUitl.Builder(context);
|
||||||
builder.setTitle(context.getString(R.string.version_update))
|
builder.setTitle(context.getString(R.string.version_update))
|
||||||
.setContent(configBean.getUpdateDes())
|
.setContent(configBean.getUpdateDes())
|
||||||
.setConfrimString(context.getString(R.string.version_immediate_use))
|
.setConfirmString(context.getString(R.string.version_immediate_use))
|
||||||
.setCancelString(context.getString(R.string.version_not_update))
|
.setCancelString(context.getString(R.string.version_not_update))
|
||||||
.setCancelable(false)
|
.setCancelable(false)
|
||||||
.setClickCallback(new DialogUitl.SimpleCallback2() {
|
.setClickCallback(new DialogUitl.SimpleCallback2() {
|
||||||
@ -134,7 +134,7 @@ public class VersionUtil {
|
|||||||
DialogUitl.Builder builder = new DialogUitl.Builder(context);
|
DialogUitl.Builder builder = new DialogUitl.Builder(context);
|
||||||
builder.setTitle(context.getString(R.string.version_update))
|
builder.setTitle(context.getString(R.string.version_update))
|
||||||
.setContent(configBean.getUpdateDes())
|
.setContent(configBean.getUpdateDes())
|
||||||
.setConfrimString(context.getString(R.string.version_immediate_use))
|
.setConfirmString(context.getString(R.string.version_immediate_use))
|
||||||
.setCancelString(context.getString(R.string.version_not_update))
|
.setCancelString(context.getString(R.string.version_not_update))
|
||||||
.setCancelable(false)
|
.setCancelable(false)
|
||||||
.setClickCallback(new DialogUitl.SimpleCallback2() {
|
.setClickCallback(new DialogUitl.SimpleCallback2() {
|
||||||
|
@ -3,6 +3,7 @@ package com.yunbao.common.utils;
|
|||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
|
|
||||||
import com.yunbao.common.CommonAppContext;
|
import com.yunbao.common.CommonAppContext;
|
||||||
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
@ -30,6 +31,9 @@ public class WordUtil {
|
|||||||
String language = locale.getLanguage();
|
String language = locale.getLanguage();
|
||||||
return language.endsWith("zh");
|
return language.endsWith("zh");
|
||||||
}
|
}
|
||||||
|
public static boolean isNewZh(){
|
||||||
|
return IMLoginManager.get(CommonAppContext.sInstance).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否包含特殊字符
|
* 是否包含特殊字符
|
||||||
|
@ -0,0 +1,80 @@
|
|||||||
|
package com.yunbao.common.views;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import com.lxj.xpopup.core.CenterPopupView;
|
||||||
|
import com.yunbao.common.R;
|
||||||
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
|
|
||||||
|
public class CompleteInformationPopup extends CenterPopupView {
|
||||||
|
|
||||||
|
private TextView completeInformationHint, completeInformation2;
|
||||||
|
private ImageView iconLive, expression;
|
||||||
|
private boolean isLeave;
|
||||||
|
private CompleteInformationCallBack callBack;
|
||||||
|
|
||||||
|
public CompleteInformationPopup(@NonNull Context context, boolean isLeave, CompleteInformationCallBack callBack) {
|
||||||
|
super(context);
|
||||||
|
this.isLeave = isLeave;
|
||||||
|
this.callBack = callBack;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 返回自定义弹窗的布局离开
|
||||||
|
@Override
|
||||||
|
protected int getImplLayoutId() {
|
||||||
|
return R.layout.view_complete_information;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
|
||||||
|
@Override
|
||||||
|
protected void onCreate() {
|
||||||
|
super.onCreate();
|
||||||
|
initView();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initView() {
|
||||||
|
completeInformationHint = findViewById(R.id.complete_information_hint);
|
||||||
|
completeInformation2 = findViewById(R.id.complete_information2);
|
||||||
|
iconLive = findViewById(R.id.icon_live);
|
||||||
|
expression = findViewById(R.id.expression);
|
||||||
|
if (isLeave) {
|
||||||
|
completeInformationHint.setText(R.string.complete_information_hint3);
|
||||||
|
completeInformation2.setText(R.string.you_guide_me);
|
||||||
|
iconLive.setVisibility(GONE);
|
||||||
|
ImgLoader.display(getContext(), R.mipmap.icon_cry_face, expression);
|
||||||
|
} else {
|
||||||
|
ImgLoader.display(getContext(), R.mipmap.icon_smiling_face, expression);
|
||||||
|
completeInformation2.setText(R.string.complete_information_hint2);
|
||||||
|
completeInformationHint.setText(R.string.complete_information_hint);
|
||||||
|
}
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.live_open_cancel), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onViewClicks() {
|
||||||
|
dismiss();
|
||||||
|
if (callBack != null) {
|
||||||
|
callBack.onCancel();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.live_open_ok), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onViewClicks() {
|
||||||
|
dismiss();
|
||||||
|
if (callBack != null) {
|
||||||
|
callBack.onSure();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface CompleteInformationCallBack {
|
||||||
|
void onCancel();
|
||||||
|
|
||||||
|
void onSure();
|
||||||
|
}
|
||||||
|
}
|
@ -55,16 +55,22 @@ public class DrawerTaskChildViewHolder extends RecyclerView.ViewHolder {
|
|||||||
case "illumine":
|
case "illumine":
|
||||||
iconImg = R.mipmap.icon_052x;
|
iconImg = R.mipmap.icon_052x;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
iconImg = R.mipmap.icon_013x;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
ImgLoader.display(itemView.getContext(), iconImg, icon);
|
ImgLoader.display(itemView.getContext(), iconImg, icon);
|
||||||
StringBuffer titleBuffer = new StringBuffer();
|
StringBuffer titleBuffer = new StringBuffer();
|
||||||
titleBuffer
|
titleBuffer
|
||||||
.append(model.getTitle())
|
.append(model.getTitle());
|
||||||
.append("(")
|
if (!TextUtils.isEmpty(model.getNowNum())) {
|
||||||
.append(model.getNowNum())
|
titleBuffer.append("(")
|
||||||
.append("/")
|
.append(model.getNowNum())
|
||||||
.append(model.getNeedNum())
|
.append("/")
|
||||||
.append(")");
|
.append(model.getNeedNum())
|
||||||
|
.append(")");
|
||||||
|
}
|
||||||
|
|
||||||
title.setText(titleBuffer.toString());
|
title.setText(titleBuffer.toString());
|
||||||
subtitle.setText(model.getSubtitle());
|
subtitle.setText(model.getSubtitle());
|
||||||
if (TextUtils.equals(model.getStatus(), "0")) {
|
if (TextUtils.equals(model.getStatus(), "0")) {
|
||||||
@ -86,27 +92,34 @@ public class DrawerTaskChildViewHolder extends RecyclerView.ViewHolder {
|
|||||||
ViewClicksAntiShake.clicksAntiShake(toReceive, new ViewClicksAntiShake.ViewClicksCallBack() {
|
ViewClicksAntiShake.clicksAntiShake(toReceive, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
@Override
|
@Override
|
||||||
public void onViewClicks() {
|
public void onViewClicks() {
|
||||||
|
if (TextUtils.equals(model.getSrc(), "to_me_information")) {
|
||||||
|
|
||||||
if (TextUtils.equals(model.getStatus(), "2")) {
|
|
||||||
LiveNetManager.get(itemView.getContext())
|
|
||||||
.sendTaskGift(model.getFlag(), new HttpCallback<String>() {
|
|
||||||
@Override
|
|
||||||
public void onSuccess(String data) {
|
|
||||||
if (listener != null) {
|
|
||||||
listener.giftSuccess(model, index);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onError(String error) {
|
|
||||||
ToastUtil.show( R.string.net_error);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
Bus.get().post(new CustomDrawerPopupEvent()
|
Bus.get().post(new CustomDrawerPopupEvent()
|
||||||
.setDisMiss(true));
|
.setDisMiss(true)
|
||||||
|
.setHtmlUrl(model.getSrc())
|
||||||
|
.setScreen(TextUtils.equals(model.getShowType(), "2")));
|
||||||
|
}else {
|
||||||
|
if (TextUtils.equals(model.getStatus(), "2")) {
|
||||||
|
LiveNetManager.get(itemView.getContext())
|
||||||
|
.sendTaskGift(model.getFlag(), new HttpCallback<String>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(String data) {
|
||||||
|
if (listener != null) {
|
||||||
|
listener.giftSuccess(model, index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(String error) {
|
||||||
|
ToastUtil.show(R.string.net_error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
Bus.get().post(new CustomDrawerPopupEvent()
|
||||||
|
.setDisMiss(true));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,6 @@ package com.yunbao.common.views;
|
|||||||
|
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.FrameLayout;
|
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
@ -49,27 +48,35 @@ public class DrawerTaskViewHolder extends RecyclerView.ViewHolder {
|
|||||||
if (TextUtils.isEmpty(model.getSrc())) {
|
if (TextUtils.isEmpty(model.getSrc())) {
|
||||||
ToastUtil.show("SHOWER_ERROR");
|
ToastUtil.show("SHOWER_ERROR");
|
||||||
} else {
|
} else {
|
||||||
IMLoginModel userInfo = IMLoginManager.get(itemView.getContext()).getUserInfo();
|
if (TextUtils.equals(model.getSrc(), "to_me_information")) {
|
||||||
StringBuffer htmlUrl = new StringBuffer();
|
Bus.get().post(new CustomDrawerPopupEvent()
|
||||||
if (model.getSrc().contains("?")) {
|
.setDisMiss(true)
|
||||||
htmlUrl.append(CommonAppConfig.HOST).append("/").append(model.getSrc())
|
.setHtmlUrl(model.getSrc())
|
||||||
.append("&uid=")
|
.setScreen(TextUtils.equals(model.getShowType(), "2")));
|
||||||
.append(userInfo.getId())
|
|
||||||
.append("&token=")
|
|
||||||
.append(userInfo.getToken());
|
|
||||||
} else {
|
} else {
|
||||||
htmlUrl.append(CommonAppConfig.HOST)
|
IMLoginModel userInfo = IMLoginManager.get(itemView.getContext()).getUserInfo();
|
||||||
.append("/")
|
StringBuffer htmlUrl = new StringBuffer();
|
||||||
.append(model.getSrc())
|
if (model.getSrc().contains("?")) {
|
||||||
.append("?uid=")
|
htmlUrl.append(CommonAppConfig.HOST).append("/").append(model.getSrc())
|
||||||
.append(userInfo.getId())
|
.append("&uid=")
|
||||||
.append("&token=")
|
.append(userInfo.getId())
|
||||||
.append(userInfo.getToken());
|
.append("&token=")
|
||||||
|
.append(userInfo.getToken());
|
||||||
|
} else {
|
||||||
|
htmlUrl.append(CommonAppConfig.HOST)
|
||||||
|
.append("/")
|
||||||
|
.append(model.getSrc())
|
||||||
|
.append("?uid=")
|
||||||
|
.append(userInfo.getId())
|
||||||
|
.append("&token=")
|
||||||
|
.append(userInfo.getToken());
|
||||||
|
}//资料
|
||||||
|
Bus.get().post(new CustomDrawerPopupEvent()
|
||||||
|
.setDisMiss(true)
|
||||||
|
.setHtmlUrl(htmlUrl.toString())
|
||||||
|
.setScreen(TextUtils.equals(model.getShowType(), "2")));
|
||||||
}
|
}
|
||||||
Bus.get().post(new CustomDrawerPopupEvent()
|
|
||||||
.setDisMiss(true)
|
|
||||||
.setHtmlUrl(htmlUrl.toString())
|
|
||||||
.setScreen(TextUtils.equals(model.getShowType(), "2")));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ import com.yunbao.common.R;
|
|||||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
|
|
||||||
public class HintCustomPopup extends CenterPopupView {
|
public class HintCustomPopup extends CenterPopupView {
|
||||||
private String title, contest,openCancel,openOk;
|
private String title, contest, openCancel, openOk;
|
||||||
private TextView liveOpenCancel, liveOpenOk;
|
private TextView liveOpenCancel, liveOpenOk;
|
||||||
|
|
||||||
public HintCustomPopup(@NonNull Context context, String title, String contest) {
|
public HintCustomPopup(@NonNull Context context, String title, String contest) {
|
||||||
@ -30,7 +30,7 @@ public class HintCustomPopup extends CenterPopupView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public HintCustomPopup setLiveOpenOk(String openOk) {
|
public HintCustomPopup setLiveOpenOk(String openOk) {
|
||||||
this.openOk = openOk;
|
this.openOk = openOk;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,8 +48,13 @@ public class HintCustomPopup extends CenterPopupView {
|
|||||||
TextView contestText = findViewById(R.id.contest);
|
TextView contestText = findViewById(R.id.contest);
|
||||||
liveOpenCancel = findViewById(R.id.live_open_cancel);
|
liveOpenCancel = findViewById(R.id.live_open_cancel);
|
||||||
liveOpenOk = findViewById(R.id.live_open_ok);
|
liveOpenOk = findViewById(R.id.live_open_ok);
|
||||||
liveOpenOk.setText(openOk);
|
if (!TextUtils.isEmpty(openOk)) {
|
||||||
liveOpenCancel.setText(openCancel);
|
liveOpenOk.setText(openOk);
|
||||||
|
}
|
||||||
|
if (!TextUtils.isEmpty(openCancel)) {
|
||||||
|
liveOpenCancel.setText(openCancel);
|
||||||
|
}
|
||||||
|
|
||||||
if (!TextUtils.isEmpty(title)) {
|
if (!TextUtils.isEmpty(title)) {
|
||||||
titleText.setText(title);
|
titleText.setText(title);
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ import com.lxj.xpopup.animator.PopupAnimator;
|
|||||||
import com.lxj.xpopup.core.CenterPopupView;
|
import com.lxj.xpopup.core.CenterPopupView;
|
||||||
import com.yunbao.common.R;
|
import com.yunbao.common.R;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 输入弹窗
|
* 输入弹窗
|
||||||
@ -54,15 +55,21 @@ public class InputCustomPopup extends CenterPopupView {
|
|||||||
findViewById(R.id.btn_confirm).setOnClickListener(new OnClickListener() {
|
findViewById(R.id.btn_confirm).setOnClickListener(new OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
String textContent = content.getText().toString();
|
ViewClicksAntiShake.clicksAntiShake(v, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
if (TextUtils.isEmpty(textContent)) {
|
@Override
|
||||||
ToastUtil.show("输入内容不可为空");
|
public void onViewClicks() {
|
||||||
return;
|
String textContent = content.getText().toString();
|
||||||
}
|
if (TextUtils.isEmpty(textContent)) {
|
||||||
if (listener != null) {
|
ToastUtil.show("输入内容不可为空");
|
||||||
listener.onConfirm(textContent);
|
return;
|
||||||
}
|
}
|
||||||
dismiss(); // 关闭弹窗
|
if (listener != null) {
|
||||||
|
listener.onConfirm(textContent);
|
||||||
|
}
|
||||||
|
dismiss(); // 关闭弹窗
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -81,6 +81,10 @@ public class LiveRobotSayHelloCustomPopup extends BottomPopupView {
|
|||||||
findViewById(R.id.robot_add_content).setOnClickListener(new View.OnClickListener() {
|
findViewById(R.id.robot_add_content).setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
if(robotMessageAdapter.getItemCount()>=20){
|
||||||
|
ToastUtil.show(getContext().getString(R.string.rebot_config_auto_say_max));
|
||||||
|
return;
|
||||||
|
}
|
||||||
new XPopup.Builder(getContext())
|
new XPopup.Builder(getContext())
|
||||||
.asCustom(new InputCustomPopup(getContext(), R.string.automatic_greeting_setting).setListener(new InputCustomPopup.InputCustomListener() {
|
.asCustom(new InputCustomPopup(getContext(), R.string.automatic_greeting_setting).setListener(new InputCustomPopup.InputCustomListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -0,0 +1,88 @@
|
|||||||
|
package com.yunbao.common.views;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import com.lxj.xpopup.core.BottomPopupView;
|
||||||
|
import com.yunbao.common.R;
|
||||||
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
|
|
||||||
|
public class UpdateSexPopup extends BottomPopupView {
|
||||||
|
private int sex;
|
||||||
|
private LinearLayout linearMan, linearGirl;
|
||||||
|
private ImageView imageMan, imageGirl;
|
||||||
|
private TextView textMan, textGirl;
|
||||||
|
private UpdateSexCallBack callBack;
|
||||||
|
|
||||||
|
public UpdateSexPopup(@NonNull Context context, int sex, UpdateSexCallBack callBack) {
|
||||||
|
super(context);
|
||||||
|
this.sex = sex;
|
||||||
|
this.callBack = callBack;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 返回自定义弹窗的布局
|
||||||
|
@Override
|
||||||
|
protected int getImplLayoutId() {
|
||||||
|
return R.layout.view_update_sex_popup;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
|
||||||
|
@Override
|
||||||
|
protected void onCreate() {
|
||||||
|
super.onCreate();
|
||||||
|
initView();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initView() {
|
||||||
|
linearMan = findViewById(R.id.linear_man);
|
||||||
|
imageMan = findViewById(R.id.image_man);
|
||||||
|
textMan = findViewById(R.id.text_man);
|
||||||
|
linearGirl = findViewById(R.id.linear_girl);
|
||||||
|
imageGirl = findViewById(R.id.image_girl);
|
||||||
|
textGirl = findViewById(R.id.text_girl);
|
||||||
|
if (sex == 0) {
|
||||||
|
ImgLoader.display(getContext(), R.mipmap.icon_male_default, imageMan);
|
||||||
|
ImgLoader.display(getContext(), R.mipmap.icon_female_default, imageGirl);
|
||||||
|
textMan.setTextColor(Color.parseColor("#999999"));
|
||||||
|
textGirl.setTextColor(Color.parseColor("#999999"));
|
||||||
|
} else if (sex == 1) {
|
||||||
|
ImgLoader.display(getContext(), R.mipmap.icon_male_highlighted, imageMan);
|
||||||
|
ImgLoader.display(getContext(), R.mipmap.icon_female_default, imageGirl);
|
||||||
|
textMan.setTextColor(Color.parseColor("#333333"));
|
||||||
|
textGirl.setTextColor(Color.parseColor("#999999"));
|
||||||
|
} else if (sex == 2) {
|
||||||
|
ImgLoader.display(getContext(), R.mipmap.icon_male_default, imageMan);
|
||||||
|
ImgLoader.display(getContext(), R.mipmap.icon_female_highlight, imageGirl);
|
||||||
|
textMan.setTextColor(Color.parseColor("#999999"));
|
||||||
|
textGirl.setTextColor(Color.parseColor("#333333"));
|
||||||
|
}
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(linearMan, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onViewClicks() {
|
||||||
|
dismiss();
|
||||||
|
if (callBack != null) {
|
||||||
|
callBack.onSex(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(linearGirl, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onViewClicks() {
|
||||||
|
dismiss();
|
||||||
|
if (callBack != null) {
|
||||||
|
callBack.onSex(2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface UpdateSexCallBack {
|
||||||
|
void onSex(int sex);
|
||||||
|
}
|
||||||
|
}
|
23
common/src/main/res/drawable/bg_blind_progres.xml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<!--设置ProgressBar背景色-->
|
||||||
|
<item android:id="@android:id/background">
|
||||||
|
<shape>
|
||||||
|
<!--设置ProgressBar进度条圆角半径-->
|
||||||
|
<corners android:radius="3dp" />
|
||||||
|
<solid android:color="#90FB712D" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<!--设置ProgressBar进度条颜色-->
|
||||||
|
<item android:id="@android:id/progress">
|
||||||
|
<scale android:scaleWidth="100%">
|
||||||
|
<shape>
|
||||||
|
<corners android:radius="3dp" />
|
||||||
|
<gradient
|
||||||
|
android:endColor="#FCCCA4"
|
||||||
|
android:startColor="#FCAB6A" />
|
||||||
|
</shape>
|
||||||
|
</scale>
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
24
common/src/main/res/drawable/bg_blind_progress.xml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<!--设置ProgressBar背景色-->
|
||||||
|
<item android:id="@android:id/background">
|
||||||
|
<shape>
|
||||||
|
<!--设置ProgressBar进度条圆角半径-->
|
||||||
|
<corners android:radius="3dp" />
|
||||||
|
<solid android:color="#909FFBF6" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<!--设置ProgressBar进度条颜色-->
|
||||||
|
<item android:id="@android:id/progress" >
|
||||||
|
<scale android:scaleWidth="100%" android:scaleHeight="6dp">
|
||||||
|
<shape >
|
||||||
|
<corners android:radius="3dp" />
|
||||||
|
<gradient
|
||||||
|
android:endColor="#10A5FB"
|
||||||
|
android:startColor="#78E2FD" />
|
||||||
|
</shape>
|
||||||
|
</scale>
|
||||||
|
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
23
common/src/main/res/drawable/bg_blind_progress1.xml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<!--设置ProgressBar背景色-->
|
||||||
|
<item android:id="@android:id/background">
|
||||||
|
<shape>
|
||||||
|
<!--设置ProgressBar进度条圆角半径-->
|
||||||
|
<corners android:radius="3dp" />
|
||||||
|
<solid android:color="#90F8B334" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<!--设置ProgressBar进度条颜色-->
|
||||||
|
<item android:id="@android:id/progress">
|
||||||
|
<scale android:scaleWidth="100%">
|
||||||
|
<shape>
|
||||||
|
<corners android:radius="3dp" />
|
||||||
|
<gradient
|
||||||
|
android:startColor="#FFF682"
|
||||||
|
android:endColor="#FDF9C2" />
|
||||||
|
</shape>
|
||||||
|
</scale>
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
@ -246,140 +246,6 @@
|
|||||||
</HorizontalScrollView>
|
</HorizontalScrollView>
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="16dp"
|
|
||||||
android:layout_marginTop="30dp"
|
|
||||||
android:text="@string/live_config"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="14sp" />
|
|
||||||
|
|
||||||
<HorizontalScrollView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
|
|
||||||
android:scrollbars="none">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="16dp"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:layout_marginBottom="20dp"
|
|
||||||
android:paddingEnd="16dp">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/live_tool_beauty"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="40dp"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:src="@mipmap/icon_beauty" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="6dp"
|
|
||||||
android:text="@string/live_beauty"
|
|
||||||
android:textColor="#FF9A9A9A"
|
|
||||||
android:textSize="12sp" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/live_tool_camera"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="23dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="40dp"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:src="@mipmap/icon_live_ready_camera" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="6dp"
|
|
||||||
android:text="@string/live_camera"
|
|
||||||
android:textColor="#FF9A9A9A"
|
|
||||||
android:textSize="12sp" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/live_tool_leave"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="23dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/live_tool_leave_img"
|
|
||||||
android:layout_width="40dp"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:src="@mipmap/icon_leave" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/live_tool_leave_text"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="6dp"
|
|
||||||
android:text="@string/live_zslk"
|
|
||||||
android:textColor="#FF9A9A9A"
|
|
||||||
android:textSize="12sp" />
|
|
||||||
</LinearLayout>
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/live_tool_anchor_say"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="23dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="40dp"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:src="@mipmap/ic_live_fun_anchor_say" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="6dp"
|
|
||||||
android:text="@string/live_fun_anchor_say"
|
|
||||||
android:textColor="#FF9A9A9A"
|
|
||||||
android:textSize="12sp" />
|
|
||||||
</LinearLayout>
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/live_tool_call_me"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="23dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="40dp"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:src="@mipmap/ic_live_fun_anchor_letter" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="6dp"
|
|
||||||
android:text="@string/live_fun_call_me"
|
|
||||||
android:textColor="#FF9A9A9A"
|
|
||||||
android:textSize="12sp" />
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
</HorizontalScrollView>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -493,6 +359,177 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</HorizontalScrollView>
|
</HorizontalScrollView>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
android:text="@string/live_config"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<HorizontalScrollView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
|
||||||
|
android:scrollbars="none">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginBottom="20dp"
|
||||||
|
android:paddingEnd="16dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/live_tool_beauty"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:src="@mipmap/icon_beauty" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:text="@string/live_beauty"
|
||||||
|
android:textColor="#FF9A9A9A"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/live_tool_camera"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="23dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:src="@mipmap/icon_live_ready_camera" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:text="@string/live_camera"
|
||||||
|
android:textColor="#FF9A9A9A"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/live_tool_leave"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="23dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/live_tool_leave_img"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:src="@mipmap/icon_leave" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/live_tool_leave_text"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:text="@string/live_zslk"
|
||||||
|
android:textColor="#FF9A9A9A"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/live_tool_anchor_say"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="23dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:src="@mipmap/ic_live_fun_anchor_say" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:text="@string/live_fun_anchor_say"
|
||||||
|
android:textColor="#FF9A9A9A"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/live_tool_call_me"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="23dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:src="@mipmap/ic_live_fun_anchor_letter" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:text="@string/live_fun_call_me"
|
||||||
|
android:textColor="#FF9A9A9A"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</HorizontalScrollView>
|
||||||
|
|
||||||
|
<HorizontalScrollView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginBottom="20dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/live_tool_qa"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:src="@mipmap/icon_live_qa" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:text="@string/dialog_live_function_qa"
|
||||||
|
android:textColor="#FF9A9A9A"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
</HorizontalScrollView>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
97
common/src/main/res/layout/view_complete_information.xml
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="274dp"
|
||||||
|
android:layout_height="168.5dp"
|
||||||
|
app:cardCornerRadius="15dp"
|
||||||
|
app:cardElevation="16dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/complete_information_hint"
|
||||||
|
android:layout_width="124.5dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="25.5dp"
|
||||||
|
android:layout_marginTop="30.5dp"
|
||||||
|
android:text="@string/complete_information_hint"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<!--表情-->
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/expression"
|
||||||
|
android:layout_width="44dp"
|
||||||
|
android:layout_height="44dp"
|
||||||
|
android:layout_marginTop="22.5dp"
|
||||||
|
android:src="@mipmap/icon_smiling_face" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="2dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/complete_information2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="7dp"
|
||||||
|
android:text="@string/complete_information_hint2"
|
||||||
|
android:textColor="#666666"
|
||||||
|
android:textSize="10sp" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/icon_live"
|
||||||
|
android:layout_width="34dp"
|
||||||
|
android:layout_height="10dp"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
android:layout_marginStart="2dp"
|
||||||
|
android:src="@mipmap/icon_live" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/live_open_cancel"
|
||||||
|
android:layout_width="111dp"
|
||||||
|
android:layout_height="37dp"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:background="@drawable/backgroud_live_open_lfet"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/cancel"
|
||||||
|
android:textColor="#FFC621"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/live_open_ok"
|
||||||
|
android:layout_width="100dp"
|
||||||
|
android:layout_height="36dp"
|
||||||
|
android:layout_gravity="end|center_vertical"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:background="@drawable/backgroud_live_open_right"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/confirm"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
</FrameLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</androidx.cardview.widget.CardView>
|
@ -2,7 +2,7 @@
|
|||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/layout"
|
android:id="@+id/layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="58dp"
|
android:layout_height="63dp"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:layout_marginEnd="10dp"
|
android:layout_marginEnd="10dp"
|
||||||
@ -10,8 +10,8 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/icon"
|
android:id="@+id/icon"
|
||||||
android:layout_width="40dp"
|
android:layout_width="41dp"
|
||||||
android:layout_height="40dp"
|
android:layout_height="41dp"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginStart="9dp"
|
android:layout_marginStart="9dp"
|
||||||
android:scaleType="fitCenter" />
|
android:scaleType="fitCenter" />
|
||||||
@ -27,17 +27,6 @@
|
|||||||
android:textColor="#FFFFFF"
|
android:textColor="#FFFFFF"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/subtitle"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@id/title"
|
|
||||||
android:layout_marginStart="9dp"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:layout_toEndOf="@id/icon"
|
|
||||||
android:text="赠送送玫瑰 (5/5)"
|
|
||||||
android:textColor="#9A9A9A"
|
|
||||||
android:textSize="10sp" />
|
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/to_receive_layout"
|
android:id="@+id/to_receive_layout"
|
||||||
@ -59,5 +48,18 @@
|
|||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/subtitle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@id/title"
|
||||||
|
android:layout_marginStart="9dp"
|
||||||
|
android:layout_marginTop="3dp"
|
||||||
|
android:layout_marginEnd="70dp"
|
||||||
|
android:layout_toLeftOf="@id/to_receive_layout"
|
||||||
|
android:layout_toEndOf="@id/icon"
|
||||||
|
android:text="赠送送玫瑰 (5/5)"
|
||||||
|
android:textColor="#9A9A9A"
|
||||||
|
android:textSize="10sp" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
59
common/src/main/res/layout/view_update_sex_popup.xml
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="213.5dp"
|
||||||
|
android:background="@mipmap/bg_gift_completely"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/linear_man"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/image_man"
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:src="@mipmap/icon_male_highlighted" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/text_man"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="9.5dp"
|
||||||
|
android:text="@string/man_student"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="13sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/linear_girl"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/image_girl"
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:src="@mipmap/icon_female_highlight" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/text_girl"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="9.5dp"
|
||||||
|
android:text="@string/girl_student"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="13sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
BIN
common/src/main/res/mipmap-mdpi/icon_live_qa.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/bg_gift_completely.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_013x.png
Normal file
After Width: | Height: | Size: 4.8 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_cry_face.png
Normal file
After Width: | Height: | Size: 46 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_female_default.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_female_highlight.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_live.png
Normal file
After Width: | Height: | Size: 7.2 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_male_default.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_male_highlighted.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_smiling_face.png
Normal file
After Width: | Height: | Size: 45 KiB |
@ -872,6 +872,7 @@ Limited ride And limited avatar frame</string>
|
|||||||
<string name="activity_center">Activity</string>
|
<string name="activity_center">Activity</string>
|
||||||
<string name="basic_tools">Basic tools</string>
|
<string name="basic_tools">Basic tools</string>
|
||||||
<string name="effects_settings">Effect settings</string>
|
<string name="effects_settings">Effect settings</string>
|
||||||
|
<string name="live_chat_font_settings">Font settings</string>
|
||||||
<string name="shield_gift_effect">Shield gift effect</string>
|
<string name="shield_gift_effect">Shield gift effect</string>
|
||||||
<string name="shield_mount_effect">Shield car effect</string>
|
<string name="shield_mount_effect">Shield car effect</string>
|
||||||
<string name="current_live_room">You are in the current live room</string>
|
<string name="current_live_room">You are in the current live room</string>
|
||||||
@ -1125,6 +1126,11 @@ Limited ride And limited avatar frame</string>
|
|||||||
<string name="unfollow"> Where is the host doing badly~\nBrother, are you sure you want to unfollow?</string>
|
<string name="unfollow"> Where is the host doing badly~\nBrother, are you sure you want to unfollow?</string>
|
||||||
<string name="unfollow_confrim">follow</string>
|
<string name="unfollow_confrim">follow</string>
|
||||||
<string name="heat_add">Heat Add</string>
|
<string name="heat_add">Heat Add</string>
|
||||||
|
<string name="live_room_chat_fount_size_low">LOW</string>
|
||||||
|
<string name="live_room_chat_fount_size_def">DEFAULT</string>
|
||||||
|
<string name="live_room_chat_fount_size_high">HIGH</string>
|
||||||
|
<string name="dialog_live_fount_title">Select font size</string>
|
||||||
|
<string name="dialog_fount_submit">confirm</string>
|
||||||
<string name="chat_prompt">Private chat prompt</string>
|
<string name="chat_prompt">Private chat prompt</string>
|
||||||
<string name="broadcast_oom">A private buoy on the side of the broadcast room</string>
|
<string name="broadcast_oom">A private buoy on the side of the broadcast room</string>
|
||||||
<string name="chat_prompt2">Dynamic message</string>
|
<string name="chat_prompt2">Dynamic message</string>
|
||||||
@ -1143,4 +1149,48 @@ Limited ride And limited avatar frame</string>
|
|||||||
<string name="delete_account1">Do you want to delete the account</string>
|
<string name="delete_account1">Do you want to delete the account</string>
|
||||||
<string name="delete_account2">After clicking delete, it will take effect immediately and cannot be restored. Are you sure you want to continue?</string>
|
<string name="delete_account2">After clicking delete, it will take effect immediately and cannot be restored. Are you sure you want to continue?</string>
|
||||||
<string name="delete_account3">Confirm deletion</string>
|
<string name="delete_account3">Confirm deletion</string>
|
||||||
|
<string name="complete_information">Fill And gift</string>
|
||||||
|
<string name="complete_information_consumable">Fill in the \'*\' option to complete</string>
|
||||||
|
<string name="love_powder">True love powder\nPhoto Frame(7 days)</string>
|
||||||
|
<string name="golden_beans_128">128 Golden Beans</string>
|
||||||
|
<string name="love_powder_medal">True love powder\nMedal (7 days)</string>
|
||||||
|
<string name="man_student">MAN</string>
|
||||||
|
<string name="girl_student">GIRL</string>
|
||||||
|
<string name="complete_information_hint">Backpack, please check</string>
|
||||||
|
<string name="complete_information_hint3">Leave without a gift</string>
|
||||||
|
<string name="complete_information_hint2">Love you</string>
|
||||||
|
<string name="you_guide_me">Can you guide me</string>
|
||||||
|
<string name="dialog_live_gift_noble">This gift is exclusive to the nobility~</string>
|
||||||
|
<string name="dialog_live_gift_guard">"This gift is exclusive to guardianship~ "</string>
|
||||||
|
<string name="dialog_live_gift_fans">This gift is exclusive to the fan group~</string>
|
||||||
|
<string name="dialog_live_gift_open_noble">VIP</string>
|
||||||
|
<string name="dialog_live_gift_open_guard">Open Guard</string>
|
||||||
|
<string name="dialog_live_gift_open_fans">Open Fan group</string>
|
||||||
|
<string name="dialog_live_function_qa">QA</string>
|
||||||
|
<string name="dialog_anchor_create_qa_submit">submit</string>
|
||||||
|
<string name="dialog_anchor_create_qa_cancel">cancel</string>
|
||||||
|
<string name="dialog_anchor_create_qa_question">question:</string>
|
||||||
|
<string name="dialog_anchor_create_qa_answer">answer:</string>
|
||||||
|
<string name="live_vote_close_title">Do you want to end this voting early?</string>
|
||||||
|
<string name="live_vote_close_yes">Yes</string>
|
||||||
|
<string name="live_vote_close_no">No</string>
|
||||||
|
<string name="live_vote_hide_text">VOTE</string>
|
||||||
|
<string name="live_room_vote_over_tip">%s <br/> box disappears after %s seconds</string>
|
||||||
|
<string name="live_anchor_vote_tip">Please complete the form.</string>
|
||||||
|
<string name="live_vote_create_error">Create Vote Error</string>
|
||||||
|
<string name="blind_box_list">Blind box</string>
|
||||||
|
<string name="resend_win">Send%smore must-have%s</string>
|
||||||
|
<string name="get_it_done">Completing a must have</string>
|
||||||
|
<string name="have_already_win">%s has been sent to your personalized dress up</string>
|
||||||
|
<string name="mini_blind_box">Mini blind box</string>
|
||||||
|
<string name="collection_blind_box">Collection blind box</string>
|
||||||
|
<string name="pd_blind_box">PD blind box</string>
|
||||||
|
<string name="individual_dressing">Individual dressing</string>
|
||||||
|
<string name="random_availability">Can be obtained randomly, %s</string>
|
||||||
|
<string name="random_availability2">I got %s %s</string>
|
||||||
|
<string name="random_availability3">Obtained, %s</string>
|
||||||
|
<string name="participate_in">Participate in</string>
|
||||||
|
<string name="extract_to">%s is extracted from %s</string>
|
||||||
|
<string name="extract_to2">%S sent to %s</string>
|
||||||
|
<string name="rebot_config_auto_say_max">Over the maximum value</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1144,4 +1144,48 @@
|
|||||||
<string name="delete_account1">是否刪除賬號</string>
|
<string name="delete_account1">是否刪除賬號</string>
|
||||||
<string name="delete_account2">點擊刪除後即刻生效,且不可恢復,您確認要繼續嗎?</string>
|
<string name="delete_account2">點擊刪除後即刻生效,且不可恢復,您確認要繼續嗎?</string>
|
||||||
<string name="delete_account3">確認刪除</string>
|
<string name="delete_account3">確認刪除</string>
|
||||||
|
<string name="dialog_live_gift_noble">該禮物是貴族專屬禮物噢~</string>
|
||||||
|
<string name="dialog_live_gift_guard">該禮物是守護專屬禮物噢~</string>
|
||||||
|
<string name="dialog_live_gift_fans">"該禮物是粉絲團專屬禮物噢~ "</string>
|
||||||
|
<string name="dialog_live_gift_open_noble">開通貴族</string>
|
||||||
|
<string name="dialog_live_gift_open_guard">開通守護</string>
|
||||||
|
<string name="dialog_live_gift_open_fans">開通粉絲團</string>
|
||||||
|
<string name="dialog_live_function_qa">發啟問答</string>
|
||||||
|
<string name="dialog_anchor_create_qa_submit">發啟問答</string>
|
||||||
|
<string name="dialog_anchor_create_qa_cancel">取消</string>
|
||||||
|
<string name="dialog_anchor_create_qa_question">問題設置:</string>
|
||||||
|
<string name="dialog_anchor_create_qa_answer">答案設置:</string>
|
||||||
|
<string name="live_vote_close_title">是否提前結束本次投票?</string>
|
||||||
|
<string name="live_vote_close_yes">是</string>
|
||||||
|
<string name="live_vote_close_no">否</string>
|
||||||
|
<string name="live_vote_hide_text">投票中</string>
|
||||||
|
<string name="live_room_vote_over_tip">%s <br/> 問答框%s秒后消失</string>
|
||||||
|
<string name="live_anchor_vote_tip">請完整填寫</string>
|
||||||
|
<string name="complete_information_consumable">填寫“*”的選項可完成</string>
|
||||||
|
<string name="love_powder">真愛粉\n頭像框(7天)</string>
|
||||||
|
<string name="golden_beans_128">128金豆</string>
|
||||||
|
<string name="love_powder_medal">真愛粉\n勛章(7天)</string>
|
||||||
|
<string name="man_student">男生</string>
|
||||||
|
<string name="girl_student">女生</string>
|
||||||
|
<string name="complete_information_hint">已將獎勵發送至您的背包,請注意查看。</string>
|
||||||
|
<string name="complete_information_hint3">離開會讓您失去獎勵,您確認離開嗎?</string>
|
||||||
|
<string name="complete_information_hint2">愛你,愛你</string>
|
||||||
|
<string name="you_guide_me">指導下我好嗎</string>
|
||||||
|
<string name="complete_information">完整填寫領大禮</string>
|
||||||
|
<string name="live_vote_create_error">投票創建失敗</string>
|
||||||
|
<string name="mini_blind_box">迷你盲盒</string>
|
||||||
|
<string name="resend_win">再送%s个必得%s</string>
|
||||||
|
<string name="have_already_win">已将%s发送至您的个性装扮</string>
|
||||||
|
<string name="pd_blind_box">PD盲盒</string>
|
||||||
|
<string name="collection_blind_box">典藏盲盒</string>
|
||||||
|
<string name="individual_dressing">个性装扮</string>
|
||||||
|
<string name="random_availability">可随机获得,%s</string>
|
||||||
|
<string name="random_availability2">已获得,%s,%s</string>
|
||||||
|
<string name="random_availability3">已获得,%s</string>
|
||||||
|
<string name="get_it_done">完成必得</string>
|
||||||
|
<string name="blind_box_list">盲盒榜</string>
|
||||||
|
<string name="participate_in">參與</string>
|
||||||
|
<string name="extract_to">%s在%s中抽取到了</string>
|
||||||
|
<string name="extract_to2">%S送给了%s</string>
|
||||||
|
<string name="rebot_config_auto_say_max">超过最大值</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1143,4 +1143,48 @@
|
|||||||
<string name="delete_account1">是否刪除賬號</string>
|
<string name="delete_account1">是否刪除賬號</string>
|
||||||
<string name="delete_account2">點擊刪除後即刻生效,且不可恢復,您確認要繼續嗎?</string>
|
<string name="delete_account2">點擊刪除後即刻生效,且不可恢復,您確認要繼續嗎?</string>
|
||||||
<string name="delete_account3">確認刪除</string>
|
<string name="delete_account3">確認刪除</string>
|
||||||
|
<string name="dialog_live_gift_noble">該禮物是貴族專屬禮物噢~</string>
|
||||||
|
<string name="dialog_live_gift_guard">該禮物是守護專屬禮物噢~</string>
|
||||||
|
<string name="dialog_live_gift_fans">"該禮物是粉絲團專屬禮物噢~ "</string>
|
||||||
|
<string name="dialog_live_gift_open_noble">開通貴族</string>
|
||||||
|
<string name="dialog_live_gift_open_guard">開通守護</string>
|
||||||
|
<string name="dialog_live_gift_open_fans">開通粉絲團</string>
|
||||||
|
<string name="dialog_live_function_qa">發啟問答</string>
|
||||||
|
<string name="dialog_anchor_create_qa_submit">發啟問答</string>
|
||||||
|
<string name="dialog_anchor_create_qa_cancel">取消</string>
|
||||||
|
<string name="dialog_anchor_create_qa_question">問題設置:</string>
|
||||||
|
<string name="dialog_anchor_create_qa_answer">答案設置:</string>
|
||||||
|
<string name="live_vote_close_title">是否提前結束本次投票?</string>
|
||||||
|
<string name="live_vote_close_yes">是</string>
|
||||||
|
<string name="live_vote_close_no">否</string>
|
||||||
|
<string name="live_vote_hide_text">投票中</string>
|
||||||
|
<string name="live_room_vote_over_tip">%s <br/> 問答框%s秒后消失</string>
|
||||||
|
<string name="live_anchor_vote_tip">請完整填寫</string>
|
||||||
|
<string name="complete_information_consumable">填寫“*”的選項可完成</string>
|
||||||
|
<string name="love_powder">真愛粉\n頭像框(7天)</string>
|
||||||
|
<string name="golden_beans_128">128金豆</string>
|
||||||
|
<string name="love_powder_medal">真愛粉\n勛章(7天)</string>
|
||||||
|
<string name="man_student">男生</string>
|
||||||
|
<string name="girl_student">女生</string>
|
||||||
|
<string name="complete_information_hint">已將獎勵發送至您的背包,請注意查看。</string>
|
||||||
|
<string name="complete_information_hint3">離開會讓您失去獎勵,您確認離開嗎?</string>
|
||||||
|
<string name="complete_information_hint2">愛你,愛你</string>
|
||||||
|
<string name="you_guide_me">指導下我好嗎</string>
|
||||||
|
<string name="complete_information">完整填寫領大禮</string>
|
||||||
|
<string name="live_vote_create_error">投票創建失敗</string>
|
||||||
|
<string name="mini_blind_box">迷你盲盒</string>
|
||||||
|
<string name="resend_win">再送%s个必得%s</string>
|
||||||
|
<string name="have_already_win">已将%s发送至您的个性装扮</string>
|
||||||
|
<string name="pd_blind_box">PD盲盒</string>
|
||||||
|
<string name="collection_blind_box">典藏盲盒</string>
|
||||||
|
<string name="individual_dressing">个性装扮</string>
|
||||||
|
<string name="random_availability">可随机获得,%s</string>
|
||||||
|
<string name="random_availability2">已获得,%s,%s</string>
|
||||||
|
<string name="random_availability3">已获得,%s</string>
|
||||||
|
<string name="get_it_done">完成必得</string>
|
||||||
|
<string name="blind_box_list">盲盒榜</string>
|
||||||
|
<string name="participate_in">參與</string>
|
||||||
|
<string name="extract_to">%s在%s中抽取到了</string>
|
||||||
|
<string name="extract_to2">%S送给了%s</string>
|
||||||
|
<string name="rebot_config_auto_say_max">超过最大值</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1144,4 +1144,48 @@
|
|||||||
<string name="delete_account1">是否刪除賬號</string>
|
<string name="delete_account1">是否刪除賬號</string>
|
||||||
<string name="delete_account2">點擊刪除後即刻生效,且不可恢復,您確認要繼續嗎?</string>
|
<string name="delete_account2">點擊刪除後即刻生效,且不可恢復,您確認要繼續嗎?</string>
|
||||||
<string name="delete_account3">確認刪除</string>
|
<string name="delete_account3">確認刪除</string>
|
||||||
|
<string name="complete_information">完整填寫領大禮</string>
|
||||||
|
<string name="dialog_live_gift_noble">該禮物是貴族專屬禮物噢~</string>
|
||||||
|
<string name="dialog_live_gift_guard">該禮物是守護專屬禮物噢~</string>
|
||||||
|
<string name="dialog_live_gift_fans">"該禮物是粉絲團專屬禮物噢~ "</string>
|
||||||
|
<string name="dialog_live_gift_open_noble">開通貴族</string>
|
||||||
|
<string name="dialog_live_gift_open_guard">開通守護</string>
|
||||||
|
<string name="dialog_live_gift_open_fans">開通粉絲團</string>
|
||||||
|
<string name="dialog_live_function_qa">發啟問答</string>
|
||||||
|
<string name="dialog_anchor_create_qa_submit">發啟問答</string>
|
||||||
|
<string name="dialog_anchor_create_qa_cancel">取消</string>
|
||||||
|
<string name="dialog_anchor_create_qa_question">問題設置:</string>
|
||||||
|
<string name="dialog_anchor_create_qa_answer">答案設置:</string>
|
||||||
|
<string name="live_vote_close_title">是否提前結束本次投票?</string>
|
||||||
|
<string name="live_vote_close_yes">是</string>
|
||||||
|
<string name="live_vote_close_no">否</string>
|
||||||
|
<string name="live_vote_hide_text">投票中</string>
|
||||||
|
<string name="live_room_vote_over_tip">%s <br /> 問答框%s秒后消失</string>
|
||||||
|
<string name="live_anchor_vote_tip">請完整填寫</string>
|
||||||
|
<string name="complete_information_consumable">填寫“*”的選項可完成</string>
|
||||||
|
<string name="love_powder">真愛粉\n頭像框(7天)</string>
|
||||||
|
<string name="golden_beans_128">128金豆</string>
|
||||||
|
<string name="love_powder_medal">真愛粉\n勛章(7天)</string>
|
||||||
|
<string name="man_student">男生</string>
|
||||||
|
<string name="girl_student">女生</string>
|
||||||
|
<string name="complete_information_hint">已將獎勵發送至您的背包,請注意查看。</string>
|
||||||
|
<string name="complete_information_hint3">離開會讓您失去獎勵,您確認離開嗎?</string>
|
||||||
|
<string name="complete_information_hint2">愛你,愛你</string>
|
||||||
|
<string name="you_guide_me">指導下我好嗎</string>
|
||||||
|
<string name="resend_win">再送%s个必得%s</string>
|
||||||
|
<string name="have_already_win">已将%s发送至您的个性装扮</string>
|
||||||
|
<string name="mini_blind_box">迷你盲盒</string>
|
||||||
|
<string name="collection_blind_box">典藏盲盒</string>
|
||||||
|
<string name="pd_blind_box">PD盲盒</string>
|
||||||
|
<string name="live_vote_create_error">投票創建失敗</string>
|
||||||
|
<string name="individual_dressing">个性装扮</string>
|
||||||
|
<string name="random_availability">可随机获得,%s</string>
|
||||||
|
<string name="random_availability2">已获得,%s,%s</string>
|
||||||
|
<string name="random_availability3">已获得,%s</string>
|
||||||
|
<string name="get_it_done">完成必得</string>
|
||||||
|
<string name="blind_box_list">盲盒榜</string>
|
||||||
|
<string name="participate_in">參與</string>
|
||||||
|
<string name="extract_to">%s在%s中抽取到了</string>
|
||||||
|
<string name="extract_to2">%S送给了%s</string>
|
||||||
|
<string name="rebot_config_auto_say_max">超过最大值</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1150,4 +1150,48 @@ Limited ride And limited avatar frame</string>
|
|||||||
<string name="delete_account1">Do you want to delete the account</string>
|
<string name="delete_account1">Do you want to delete the account</string>
|
||||||
<string name="delete_account2">After clicking delete, it will take effect immediately and cannot be restored. Are you sure you want to continue?</string>
|
<string name="delete_account2">After clicking delete, it will take effect immediately and cannot be restored. Are you sure you want to continue?</string>
|
||||||
<string name="delete_account3">Confirm deletion</string>
|
<string name="delete_account3">Confirm deletion</string>
|
||||||
|
<string name="dialog_live_gift_noble">This gift is exclusive to the nobility~</string>
|
||||||
|
<string name="dialog_live_gift_guard">This gift is exclusive to guardianship~</string>
|
||||||
|
<string name="dialog_live_gift_fans">This gift is exclusive to the fan group~</string>
|
||||||
|
<string name="dialog_live_gift_open_noble">VIP</string>
|
||||||
|
<string name="dialog_live_gift_open_guard">Open Guard</string>
|
||||||
|
<string name="dialog_live_gift_open_fans">Open Fan group</string>
|
||||||
|
<string name="dialog_live_function_qa">QA</string>
|
||||||
|
<string name="dialog_anchor_create_qa_submit">submit</string>
|
||||||
|
<string name="dialog_anchor_create_qa_cancel">cancel</string>
|
||||||
|
<string name="dialog_anchor_create_qa_question">question:</string>
|
||||||
|
<string name="dialog_anchor_create_qa_answer">answer:</string>
|
||||||
|
<string name="live_vote_close_title">Do you want to end this voting early?</string>
|
||||||
|
<string name="live_vote_close_yes">Yes</string>
|
||||||
|
<string name="live_vote_close_no">No</string>
|
||||||
|
<string name="live_vote_hide_text">VOTE</string>
|
||||||
|
<string name="live_room_vote_over_tip">%s <br /> box disappears after %s seconds</string>
|
||||||
|
<string name="live_anchor_vote_tip">Please complete the form.</string>
|
||||||
|
<string name="complete_information">Fill And gift</string>
|
||||||
|
<string name="complete_information_consumable">Fill in the \'*\' option to complete</string>
|
||||||
|
<string name="love_powder">True love powder\nPhoto Frame(7 days)</string>
|
||||||
|
<string name="golden_beans_128">128 Golden Beans</string>
|
||||||
|
<string name="love_powder_medal">True love powder\nMedal (7 days)</string>
|
||||||
|
<string name="man_student">MAN</string>
|
||||||
|
<string name="girl_student">GIRL</string>
|
||||||
|
<string name="complete_information_hint">Backpack, please check</string>
|
||||||
|
<string name="complete_information_hint3">Leave without a gift</string>
|
||||||
|
<string name="complete_information_hint2">Love you</string>
|
||||||
|
<string name="you_guide_me">Can you guide me</string>
|
||||||
|
<string name="resend_win">Send%smore must-have%s</string>
|
||||||
|
<string name="have_already_win">%s has been sent to your personalized dress up</string>
|
||||||
|
<string name="mini_blind_box">Mini blind box</string>
|
||||||
|
<string name="collection_blind_box">Collection blind box</string>
|
||||||
|
<string name="pd_blind_box">PD blind box</string>
|
||||||
|
<string name="individual_dressing">Individual dressing</string>
|
||||||
|
<string name="random_availability">Can be obtained randomly, %s</string>
|
||||||
|
<string name="random_availability2">I got %s %s</string>
|
||||||
|
<string name="random_availability3">Obtained, %s</string>
|
||||||
|
<string name="get_it_done">Completing a must have</string>
|
||||||
|
<string name="blind_box_list">Blind box</string>
|
||||||
|
<string name="participate_in">Participate in</string>
|
||||||
|
<string name="extract_to">%s is extracted from %s</string>
|
||||||
|
<string name="extract_to2">%S sent to %s</string>
|
||||||
|
<string name="live_vote_create_error">Create Vote Error</string>
|
||||||
|
<string name="rebot_config_auto_say_max">Over the maximum value</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -93,9 +93,10 @@
|
|||||||
|
|
||||||
<style name="edit_profile_group" parent="AppTheme">
|
<style name="edit_profile_group" parent="AppTheme">
|
||||||
<item name="android:layout_width">match_parent</item>
|
<item name="android:layout_width">match_parent</item>
|
||||||
<item name="android:layout_height">60dp</item>
|
<item name="android:layout_height">45dp</item>
|
||||||
<item name="android:paddingLeft">15dp</item>
|
<item name="android:paddingLeft">15dp</item>
|
||||||
<item name="android:paddingRight">15dp</item>
|
<item name="android:paddingRight">15dp</item>
|
||||||
|
<item name="android:background">@color/white</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.PayssionTrans" parent="Theme.AppCompat.Light">
|
<style name="Theme.PayssionTrans" parent="Theme.AppCompat.Light">
|
||||||
|
@ -4,8 +4,8 @@ ext {
|
|||||||
buildToolsVersion: "29.0.2",
|
buildToolsVersion: "29.0.2",
|
||||||
minSdkVersion : 21,
|
minSdkVersion : 21,
|
||||||
targetSdkVersion : 31,
|
targetSdkVersion : 31,
|
||||||
versionCode : 420,
|
versionCode : 423,
|
||||||
versionName : "6.5.1"
|
versionName : "6.5.2"
|
||||||
]
|
]
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
//正式、
|
//正式、
|
||||||
@ -26,7 +26,7 @@ ext {
|
|||||||
// true表示谷歌支付 false
|
// true表示谷歌支付 false
|
||||||
isGooglePlay : false,
|
isGooglePlay : false,
|
||||||
//是否上报异常日志
|
//是否上报异常日志
|
||||||
isUploadLog : true
|
isUploadLog : false
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
//7664 1
|
//7664 1
|
BIN
live/src/main/assets/hdsn.svga
Normal file
@ -1,5 +1,7 @@
|
|||||||
package com.yunbao.live.activity;
|
package com.yunbao.live.activity;
|
||||||
|
|
||||||
|
import static com.yunbao.live.views.LiveRoomViewHolder.mLiveUid;
|
||||||
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.ClipData;
|
import android.content.ClipData;
|
||||||
import android.content.ClipboardManager;
|
import android.content.ClipboardManager;
|
||||||
@ -31,6 +33,7 @@ import com.yunbao.common.bean.NobleRankHideUserListModel;
|
|||||||
import com.yunbao.common.bean.UserBean;
|
import com.yunbao.common.bean.UserBean;
|
||||||
import com.yunbao.common.event.CoinChangeEvent;
|
import com.yunbao.common.event.CoinChangeEvent;
|
||||||
import com.yunbao.common.event.FollowEvent;
|
import com.yunbao.common.event.FollowEvent;
|
||||||
|
import com.yunbao.common.event.SendBlindGiftEvent;
|
||||||
import com.yunbao.common.http.HttpCallback;
|
import com.yunbao.common.http.HttpCallback;
|
||||||
import com.yunbao.common.http.live.LiveNetManager;
|
import com.yunbao.common.http.live.LiveNetManager;
|
||||||
import com.yunbao.common.interfaces.KeyBoardHeightChangeListener;
|
import com.yunbao.common.interfaces.KeyBoardHeightChangeListener;
|
||||||
@ -40,7 +43,6 @@ import com.yunbao.common.utils.L;
|
|||||||
import com.yunbao.common.utils.ProcessImageUtil;
|
import com.yunbao.common.utils.ProcessImageUtil;
|
||||||
import com.yunbao.common.utils.SVGAViewUtils;
|
import com.yunbao.common.utils.SVGAViewUtils;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
|
||||||
import com.yunbao.common.utils.formatBigNum;
|
import com.yunbao.common.utils.formatBigNum;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.live.bean.GuardUserBean;
|
import com.yunbao.live.bean.GuardUserBean;
|
||||||
@ -317,25 +319,27 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
|||||||
* 收到礼物消息
|
* 收到礼物消息
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void onSendGift(LiveReceiveGiftBean bean) {
|
public void onSendGift(LiveReceiveGiftBean bean, SendBlindGiftEvent event) {
|
||||||
|
if (event == null) {
|
||||||
//购买守护
|
//购买守护
|
||||||
if (bean.ismTypeBuyGuard()) {
|
if (bean.ismTypeBuyGuard()) {
|
||||||
if (mLiveRoomViewHolder != null) {
|
if (mLiveRoomViewHolder != null) {
|
||||||
if (!mIsAnchor) {
|
if (!mIsAnchor) {
|
||||||
mLiveRoomViewHolder.showGuardGifMessage(bean);
|
mLiveRoomViewHolder.showGuardGifMessage(bean);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
} else {
|
if (mLiveRoomViewHolder != null) {
|
||||||
if (mLiveRoomViewHolder != null) {
|
if (bean.getmLiveUId().equals(bean.getRoomnum())) {
|
||||||
if (bean.getmLiveUId().equals(bean.getRoomnum())) {
|
mLiveRoomViewHolder.insertChat(bean.getLiveChatBean(), 1);
|
||||||
mLiveRoomViewHolder.insertChat(bean.getLiveChatBean(), 1);
|
}
|
||||||
}
|
mLiveRoomViewHolder.showGiftMessage(bean, mIsAnchor);
|
||||||
mLiveRoomViewHolder.showGiftMessage(bean, mIsAnchor);
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -388,6 +392,17 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onEndPk(long leftUid, long rightUid, long left, long right, LivePKUserListBean bean) {
|
||||||
|
if (mLiveRyLinkMicPkPresenter != null) {
|
||||||
|
if (mLiveUid.equals(leftUid + "")) {
|
||||||
|
mLiveRyLinkMicPkPresenter.onPkProgressEnd(left, right, bean);
|
||||||
|
} else {
|
||||||
|
mLiveRyLinkMicPkPresenter.onPkProgressEnd(right, left, bean);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 收到弹幕消息
|
* 收到弹幕消息
|
||||||
*/
|
*/
|
||||||
@ -1362,6 +1377,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
|||||||
fragment.setArguments(bundle);
|
fragment.setArguments(bundle);
|
||||||
fragment.show(getSupportFragmentManager(), "LiveGuardBuyDialogFragment");
|
fragment.show(getSupportFragmentManager(), "LiveGuardBuyDialogFragment");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 打开购买守护的弹窗
|
* 打开购买守护的弹窗
|
||||||
*/
|
*/
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.yunbao.live.activity;
|
package com.yunbao.live.activity;
|
||||||
|
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
@ -47,6 +48,7 @@ import com.yunbao.common.bean.IMLoginModel;
|
|||||||
import com.yunbao.common.bean.LinkMicUserBean;
|
import com.yunbao.common.bean.LinkMicUserBean;
|
||||||
import com.yunbao.common.bean.LiveBean;
|
import com.yunbao.common.bean.LiveBean;
|
||||||
import com.yunbao.common.bean.LiveGiftBean;
|
import com.yunbao.common.bean.LiveGiftBean;
|
||||||
|
import com.yunbao.common.bean.LiveRoomVoteModel;
|
||||||
import com.yunbao.common.bean.LiveUserGiftBean;
|
import com.yunbao.common.bean.LiveUserGiftBean;
|
||||||
import com.yunbao.common.bean.LiveUserMailBoxModel;
|
import com.yunbao.common.bean.LiveUserMailBoxModel;
|
||||||
import com.yunbao.common.bean.SlideInfoModel;
|
import com.yunbao.common.bean.SlideInfoModel;
|
||||||
@ -79,7 +81,6 @@ import com.yunbao.common.utils.ProcessResultUtil;
|
|||||||
import com.yunbao.common.utils.RouteUtil;
|
import com.yunbao.common.utils.RouteUtil;
|
||||||
import com.yunbao.common.utils.StringUtil;
|
import com.yunbao.common.utils.StringUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
|
||||||
import com.yunbao.common.views.CustomDrawerPopupView;
|
import com.yunbao.common.views.CustomDrawerPopupView;
|
||||||
import com.yunbao.common.views.floatingview.APPEasyFloat;
|
import com.yunbao.common.views.floatingview.APPEasyFloat;
|
||||||
import com.yunbao.common.views.weight.VerticalViewPager;
|
import com.yunbao.common.views.weight.VerticalViewPager;
|
||||||
@ -859,6 +860,9 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
public void showerHtml(String htmlUrl, boolean screen) {
|
public void showerHtml(String htmlUrl, boolean screen) {
|
||||||
if (TextUtils.equals(htmlUrl, "recharge")) {
|
if (TextUtils.equals(htmlUrl, "recharge")) {
|
||||||
RouteUtil.forwardMyCoin(mContext);
|
RouteUtil.forwardMyCoin(mContext);
|
||||||
|
} else if (TextUtils.equals(htmlUrl, "to_me_information")) {
|
||||||
|
onBackPressed();
|
||||||
|
Constants.isShowPage = 3;
|
||||||
} else {
|
} else {
|
||||||
if (!screen) {
|
if (!screen) {
|
||||||
ZhuangBanActivity.forward(mContext, htmlUrl, false);
|
ZhuangBanActivity.forward(mContext, htmlUrl, false);
|
||||||
@ -1029,7 +1033,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
LiveFansFragment liveFansFragment = new LiveFansFragment(mContext);
|
LiveFansFragment liveFansFragment = new LiveFansFragment(mContext);
|
||||||
//粉絲團粉絲團
|
//粉絲團粉絲團
|
||||||
//不是粉絲
|
//不是粉絲
|
||||||
if (LiveAudienceActivity.is_fans != null && LiveAudienceActivity.is_fans.equals("2")) {
|
if (LiveAudienceActivity.is_fans == null || "2".equals(LiveAudienceActivity.is_fans)) {
|
||||||
bundle.putString(Constants.URL,
|
bundle.putString(Constants.URL,
|
||||||
CommonAppConfig.HOST + "/h5/live/joinFansClub.html" +
|
CommonAppConfig.HOST + "/h5/live/joinFansClub.html" +
|
||||||
"?uid=" + userInfo.getId() +
|
"?uid=" + userInfo.getId() +
|
||||||
@ -1044,7 +1048,11 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
liveFansFragment.show(getSupportFragmentManager(), "LiveGuardDialogFragment");
|
liveFansFragment.show(getSupportFragmentManager(), "LiveGuardDialogFragment");
|
||||||
break;
|
break;
|
||||||
case GUARD:
|
case GUARD:
|
||||||
openNewGuardListWindow(mContext instanceof LiveRyAnchorActivity);
|
if (event.getObject() == null) {
|
||||||
|
openNewGuardListWindow(mContext instanceof LiveRyAnchorActivity);
|
||||||
|
} else {
|
||||||
|
openNewBuyGuardWindow(true);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case LIVE_WKS://周星榜
|
case LIVE_WKS://周星榜
|
||||||
String weeklyStarUrl = CommonAppConfig.HOST + "/h5/activity/weekStar/index.html?&uid="
|
String weeklyStarUrl = CommonAppConfig.HOST + "/h5/activity/weekStar/index.html?&uid="
|
||||||
@ -1329,6 +1337,52 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
manager.showXydComplete(event.getXydCompleteModel(), event.getLiveReceiveGiftBean());
|
manager.showXydComplete(event.getXydCompleteModel(), event.getLiveReceiveGiftBean());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case VOTE_CREATE:
|
||||||
|
case VOTE_UPDATE:
|
||||||
|
LiveRoomVoteModel voteModel = new LiveRoomVoteModel();
|
||||||
|
JSONObject map = (JSONObject) event.getObject();
|
||||||
|
try {
|
||||||
|
voteModel.setStatus(1);
|
||||||
|
voteModel.setLiveUid(mLiveUid);
|
||||||
|
voteModel.setContent(map.getString("question"));
|
||||||
|
voteModel.setAnswer1(map.getString("answer1"));
|
||||||
|
voteModel.setAnswer2(map.getString("answer2"));
|
||||||
|
voteModel.setAnswer1Num(map.getInteger("num1"));
|
||||||
|
voteModel.setAnswer2Num(map.getInteger("num2"));
|
||||||
|
manager.mLiveRoomViewHolder.setVoteData(voteModel);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
case VOTE_END:
|
||||||
|
try {
|
||||||
|
voteModel = new LiveRoomVoteModel();
|
||||||
|
map = (JSONObject) event.getObject();
|
||||||
|
voteModel.setStatus(1);
|
||||||
|
voteModel.setContent(map.getString("question"));
|
||||||
|
voteModel.setAnswer1(map.getString("answer1"));
|
||||||
|
voteModel.setAnswer2(map.getString("answer2"));
|
||||||
|
voteModel.setAnswer1Num(map.getInteger("num1"));
|
||||||
|
voteModel.setAnswer2Num(map.getInteger("num2"));
|
||||||
|
voteModel.setResultZh(map.getString("result_zh"));
|
||||||
|
voteModel.setResultEn(map.getString("result_en"));
|
||||||
|
voteModel.setOptionText(map.getString("option_text"));
|
||||||
|
System.out.println(">>>" + voteModel);
|
||||||
|
String content = voteModel.getResult();
|
||||||
|
if (!StringUtil.isEmpty(voteModel.getOptionText())) {
|
||||||
|
content = voteModel.getResult().replace(voteModel.getOptionText(), "<font color='#FF8E43'>" + voteModel.getOptionText() + "</font>");
|
||||||
|
}
|
||||||
|
manager.mLiveRoomViewHolder.dismissVote(voteModel.getResult(), content);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case BLIND_BOX:
|
||||||
|
if (manager != null) {
|
||||||
|
manager.blindBoxAllServerNotify(event.getAllServerNotifyEvent());
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,6 +51,7 @@ import com.yunbao.common.bean.MicUserBean;
|
|||||||
import com.yunbao.common.bean.UserBean;
|
import com.yunbao.common.bean.UserBean;
|
||||||
import com.yunbao.common.dialog.NotCancelableDialog;
|
import com.yunbao.common.dialog.NotCancelableDialog;
|
||||||
import com.yunbao.common.event.LoginInvalidEvent;
|
import com.yunbao.common.event.LoginInvalidEvent;
|
||||||
|
import com.yunbao.common.event.SendBlindGiftEvent;
|
||||||
import com.yunbao.common.http.CommonHttpConsts;
|
import com.yunbao.common.http.CommonHttpConsts;
|
||||||
import com.yunbao.common.http.CommonHttpUtil;
|
import com.yunbao.common.http.CommonHttpUtil;
|
||||||
import com.yunbao.common.http.HttpCallback;
|
import com.yunbao.common.http.HttpCallback;
|
||||||
@ -73,6 +74,7 @@ import com.yunbao.common.views.LiveNewWishListPopup;
|
|||||||
import com.yunbao.common.views.LiveRobotSettingCustomPopup;
|
import com.yunbao.common.views.LiveRobotSettingCustomPopup;
|
||||||
import com.yunbao.faceunity.FaceManager;
|
import com.yunbao.faceunity.FaceManager;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
|
import com.yunbao.live.bean.LiveChatBean;
|
||||||
import com.yunbao.live.bean.LiveGuardInfo;
|
import com.yunbao.live.bean.LiveGuardInfo;
|
||||||
import com.yunbao.live.bean.LiveKsyConfigBean;
|
import com.yunbao.live.bean.LiveKsyConfigBean;
|
||||||
import com.yunbao.live.bean.LiveReceiveGiftBean;
|
import com.yunbao.live.bean.LiveReceiveGiftBean;
|
||||||
@ -1464,14 +1466,13 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSendGift(LiveReceiveGiftBean bean) {
|
public void onSendGift(LiveReceiveGiftBean bean, SendBlindGiftEvent event) {
|
||||||
//购买守护
|
if (event!=null){
|
||||||
if (bean.ismTypeBuyGuard()) {
|
//插入盲盒礼物消息
|
||||||
if (mLiveRoomViewHolder != null) {
|
bean.getLiveChatBean().setType(LiveChatBean.BLIND_BOX);
|
||||||
mLiveRoomViewHolder.showGuardGifMessage(bean);
|
bean.getLiveChatBean().setContent(event.getGiftMsg());
|
||||||
}
|
bean.getLiveChatBean().setGiftName(event.getGiftname());
|
||||||
} else {
|
bean.getLiveChatBean().setUserNiceName(event.getUserNiceName());
|
||||||
|
|
||||||
if (mLiveRoomViewHolder != null) {
|
if (mLiveRoomViewHolder != null) {
|
||||||
if (bean.getmLiveUId().equals(bean.getRoomnum())) {
|
if (bean.getmLiveUId().equals(bean.getRoomnum())) {
|
||||||
mLiveRoomViewHolder.insertChat(bean.getLiveChatBean(), 1);
|
mLiveRoomViewHolder.insertChat(bean.getLiveChatBean(), 1);
|
||||||
@ -1479,8 +1480,25 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
|||||||
mLiveRoomViewHolder.showGiftMessage(bean, false);
|
mLiveRoomViewHolder.showGiftMessage(bean, false);
|
||||||
mLiveRoomViewHolder.updataWishList(bean.getGiftId(), bean.getGiftCount());
|
mLiveRoomViewHolder.updataWishList(bean.getGiftId(), bean.getGiftCount());
|
||||||
}
|
}
|
||||||
|
}else {
|
||||||
|
//购买守护
|
||||||
|
if (bean.ismTypeBuyGuard()) {
|
||||||
|
if (mLiveRoomViewHolder != null) {
|
||||||
|
mLiveRoomViewHolder.showGuardGifMessage(bean);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
|
if (mLiveRoomViewHolder != null) {
|
||||||
|
if (bean.getmLiveUId().equals(bean.getRoomnum())) {
|
||||||
|
mLiveRoomViewHolder.insertChat(bean.getLiveChatBean(), 1);
|
||||||
|
}
|
||||||
|
mLiveRoomViewHolder.showGiftMessage(bean, false);
|
||||||
|
mLiveRoomViewHolder.updataWishList(bean.getGiftId(), bean.getGiftCount());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void printLog(String content) {
|
private void printLog(String content) {
|
||||||
|
@ -46,6 +46,7 @@ import com.yunbao.common.utils.SVGAViewUtils;
|
|||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
import com.yunbao.common.utils.WordUtil;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
|
import com.yunbao.share.ui.InvitePopDialog;
|
||||||
|
|
||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
import org.greenrobot.eventbus.ThreadMode;
|
import org.greenrobot.eventbus.ThreadMode;
|
||||||
@ -369,6 +370,10 @@ public class ZhuangBanActivity extends AbsActivity {
|
|||||||
} catch (MalformedURLException e) {
|
} catch (MalformedURLException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
}else if (event.getMethod().equals("androidInviteShare")) {
|
||||||
|
new InvitePopDialog(mContext)
|
||||||
|
.setUrl(event.getData())
|
||||||
|
.showDialog();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ import static com.yunbao.live.bean.LiveChatBean.LUCKY_100_CHECK;
|
|||||||
import static com.yunbao.live.bean.LiveChatBean.LUCKY_ANGEL;
|
import static com.yunbao.live.bean.LiveChatBean.LUCKY_ANGEL;
|
||||||
import static com.yunbao.live.bean.LiveChatBean.RECOMMEND_CARD_NOTIFY;
|
import static com.yunbao.live.bean.LiveChatBean.RECOMMEND_CARD_NOTIFY;
|
||||||
import static com.yunbao.live.bean.LiveChatBean.STAR_CHALLENGE_UPGRADE_NOTIFY;
|
import static com.yunbao.live.bean.LiveChatBean.STAR_CHALLENGE_UPGRADE_NOTIFY;
|
||||||
|
import static com.yunbao.live.bean.LiveChatBean.SYSTEM3_COLOR;
|
||||||
import static com.yunbao.live.bean.LiveChatBean.WISH_LIST_PROGRESS;
|
import static com.yunbao.live.bean.LiveChatBean.WISH_LIST_PROGRESS;
|
||||||
import static com.yunbao.live.bean.LiveChatBean.XYD_COMPLETE;
|
import static com.yunbao.live.bean.LiveChatBean.XYD_COMPLETE;
|
||||||
|
|
||||||
@ -13,6 +14,7 @@ import android.content.Context;
|
|||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.text.Html;
|
||||||
import android.text.Spannable;
|
import android.text.Spannable;
|
||||||
import android.text.SpannableStringBuilder;
|
import android.text.SpannableStringBuilder;
|
||||||
import android.text.Spanned;
|
import android.text.Spanned;
|
||||||
@ -25,11 +27,9 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.animation.Animation;
|
import android.view.animation.Animation;
|
||||||
import android.view.animation.AnimationUtils;
|
import android.view.animation.AnimationUtils;
|
||||||
import android.widget.FrameLayout;
|
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.recyclerview.widget.GridLayoutManager;
|
import androidx.recyclerview.widget.GridLayoutManager;
|
||||||
@ -82,7 +82,7 @@ public class LiveChatAdapter extends RecyclerView.Adapter {
|
|||||||
|
|
||||||
private int mPosition;
|
private int mPosition;
|
||||||
private boolean isBottom = false;
|
private boolean isBottom = false;
|
||||||
private int fountSize=13;
|
private int fountSize = 13;
|
||||||
|
|
||||||
public LiveChatAdapter(Context context) {
|
public LiveChatAdapter(Context context) {
|
||||||
mContext = context;
|
mContext = context;
|
||||||
@ -100,10 +100,10 @@ public class LiveChatAdapter extends RecyclerView.Adapter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if(SpUtil.getInstance().isExists("pd_live_room_fount_size")){
|
if (SpUtil.getInstance().isExists("pd_live_room_fount_size")) {
|
||||||
try {
|
try {
|
||||||
fountSize=Integer.parseInt(SpUtil.getStringValue("pd_live_room_fount_size"));
|
fountSize = Integer.parseInt(SpUtil.getStringValue("pd_live_room_fount_size"));
|
||||||
}catch (Exception ignored){
|
} catch (Exception ignored) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -173,8 +173,8 @@ public class LiveChatAdapter extends RecyclerView.Adapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void switchFount(int fount) {
|
public void switchFount(int fount) {
|
||||||
fountSize=fount;
|
fountSize = fount;
|
||||||
SpUtil.setStringValue("pd_live_room_fount_size",fountSize+"");
|
SpUtil.setStringValue("pd_live_room_fount_size", fountSize + "");
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -198,7 +198,7 @@ public class LiveChatAdapter extends RecyclerView.Adapter {
|
|||||||
class Vh extends RecyclerView.ViewHolder {
|
class Vh extends RecyclerView.ViewHolder {
|
||||||
|
|
||||||
LinearLayout mBg, view_follow, view_action_game, view_zg, xydComplete;
|
LinearLayout mBg, view_follow, view_action_game, view_zg, xydComplete;
|
||||||
TextView mTextView, tv_chat_active_into, tv_chat_avtive_name, tv_zg_anchorname, textTxt2,automatic_chat;
|
TextView mTextView, tv_chat_active_into, tv_chat_avtive_name, tv_zg_anchorname, textTxt2, automatic_chat;
|
||||||
RoundedImageView avatar;
|
RoundedImageView avatar;
|
||||||
View v_chat_active_close;
|
View v_chat_active_close;
|
||||||
RecyclerView rv_chat_active;
|
RecyclerView rv_chat_active;
|
||||||
@ -357,6 +357,10 @@ public class LiveChatAdapter extends RecyclerView.Adapter {
|
|||||||
mTextView.setText(builder);
|
mTextView.setText(builder);
|
||||||
} else if (bean.getType() == -10) {
|
} else if (bean.getType() == -10) {
|
||||||
mBg.setBackground(null);
|
mBg.setBackground(null);
|
||||||
|
} else if (bean.getType() == LiveChatBean.BLIND_BOX) {
|
||||||
|
Log.e("BLIND_BOX", bean.toString());
|
||||||
|
new LoadDian9TuUtil().loadDian9TuAssets(mContext, mBg, 1);
|
||||||
|
new LiveTextRender().blindBox(mContext, mTextView, bean);
|
||||||
} else if (bean.getType() == LiveChatBean.SYSTEM) {
|
} else if (bean.getType() == LiveChatBean.SYSTEM) {
|
||||||
boolean isContains = false;
|
boolean isContains = false;
|
||||||
for (LiveChatBean model : mList) {
|
for (LiveChatBean model : mList) {
|
||||||
@ -477,6 +481,8 @@ public class LiveChatAdapter extends RecyclerView.Adapter {
|
|||||||
new LoadDian9TuUtil().loadDian9Tu(mContext, mBg, bean.getMsgModel().getSystem_bubble(), 1);
|
new LoadDian9TuUtil().loadDian9Tu(mContext, mBg, bean.getMsgModel().getSystem_bubble(), 1);
|
||||||
new LiveTextRender().lucky100(mContext, mTextView, bean.getMsgModel());
|
new LiveTextRender().lucky100(mContext, mTextView, bean.getMsgModel());
|
||||||
}
|
}
|
||||||
|
} else if (bean.getType() == SYSTEM3_COLOR) {
|
||||||
|
mTextView.setText(Html.fromHtml(bean.getContent()));
|
||||||
} else {
|
} else {
|
||||||
if (bean.getBubble() != null && !bean.getBubble().equals("")) {
|
if (bean.getBubble() != null && !bean.getBubble().equals("")) {
|
||||||
//加载.9图聊天气泡
|
//加载.9图聊天气泡
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package com.yunbao.live.adapter;
|
package com.yunbao.live.adapter;
|
||||||
|
|
||||||
import android.app.Dialog;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
@ -13,14 +12,11 @@ import android.widget.TextView;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.yunbao.common.bean.BaseModel;
|
|
||||||
import com.yunbao.common.bean.LiveUserMailBoxModel;
|
import com.yunbao.common.bean.LiveUserMailBoxModel;
|
||||||
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.interfaces.OnItemClickListener;
|
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||||
import com.yunbao.common.utils.DialogUitl;
|
import com.yunbao.common.utils.DialogUitl;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
|
||||||
import com.yunbao.common.utils.WordUtil;
|
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.live.dialog.LiveUserAnchorMailBoxWebInfoPopDialog;
|
import com.yunbao.live.dialog.LiveUserAnchorMailBoxWebInfoPopDialog;
|
||||||
|
|
||||||
@ -94,7 +90,7 @@ public class LiveUserAnchorMailBoxAdapter extends RecyclerView.Adapter<LiveUserA
|
|||||||
new DialogUitl.Builder(mContext)
|
new DialogUitl.Builder(mContext)
|
||||||
.setTitle(mContext.getString(R.string.live_user_letter_dialog_title))
|
.setTitle(mContext.getString(R.string.live_user_letter_dialog_title))
|
||||||
.setContent(mContext.getString(R.string.live_user_letter_dialog_content))
|
.setContent(mContext.getString(R.string.live_user_letter_dialog_content))
|
||||||
.setConfrimString(mContext.getString(R.string.live_user_letter_dialog_yes))
|
.setConfirmString(mContext.getString(R.string.live_user_letter_dialog_yes))
|
||||||
.setCancelString(mContext.getString(R.string.live_user_letter_dialog_no))
|
.setCancelString(mContext.getString(R.string.live_user_letter_dialog_no))
|
||||||
.setView(R.layout.dialog_live_random_pk)
|
.setView(R.layout.dialog_live_random_pk)
|
||||||
.setCancelable(true)
|
.setCancelable(true)
|
||||||
|
@ -23,9 +23,10 @@ public class LiveChatBean {
|
|||||||
public static final int STAR_CHALLENGE_UPGRADE_NOTIFY = 105;
|
public static final int STAR_CHALLENGE_UPGRADE_NOTIFY = 105;
|
||||||
public static final int LUCKY_ANGEL = 106;//幸运天使
|
public static final int LUCKY_ANGEL = 106;//幸运天使
|
||||||
public static final int LUCKY_100_CHECK = 107;//幸运天使
|
public static final int LUCKY_100_CHECK = 107;//幸运天使
|
||||||
|
public static final int SYSTEM3_COLOR = 108;//带颜色的系统消息,格式 XXXX<font color='#FF8E43'>YYY</font>
|
||||||
public static final int XYD_COMPLETE = 207;//心愿单完成通知
|
public static final int XYD_COMPLETE = 207;//心愿单完成通知
|
||||||
public static final int WISH_LIST_PROGRESS = 307;//心愿单进度通知
|
public static final int WISH_LIST_PROGRESS = 307;//心愿单进度通知
|
||||||
|
public static final int BLIND_BOX = 409;//盲盒礼物消息
|
||||||
|
|
||||||
|
|
||||||
private String id;
|
private String id;
|
||||||
@ -51,6 +52,17 @@ public class LiveChatBean {
|
|||||||
private String prankIcon;
|
private String prankIcon;
|
||||||
private String hot_card;
|
private String hot_card;
|
||||||
private MsgModel msgModel = new MsgModel();//自定义消息体
|
private MsgModel msgModel = new MsgModel();//自定义消息体
|
||||||
|
private String giftName;
|
||||||
|
|
||||||
|
public String getGiftName() {
|
||||||
|
return giftName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveChatBean setGiftName(String giftName) {
|
||||||
|
this.giftName = giftName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
private AiAutomaticSpeechModel aiAutomaticSpeechModel = new AiAutomaticSpeechModel();//机器人消息体
|
private AiAutomaticSpeechModel aiAutomaticSpeechModel = new AiAutomaticSpeechModel();//机器人消息体
|
||||||
|
|
||||||
public AiAutomaticSpeechModel getAiAutomaticSpeechModel() {
|
public AiAutomaticSpeechModel getAiAutomaticSpeechModel() {
|
||||||
@ -368,4 +380,45 @@ public class LiveChatBean {
|
|||||||
public void setMedalLevelImageUrl(String medalLevelImageUrl) {
|
public void setMedalLevelImageUrl(String medalLevelImageUrl) {
|
||||||
this.medalLevelImageUrl = medalLevelImageUrl;
|
this.medalLevelImageUrl = medalLevelImageUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "LiveChatBean{" +
|
||||||
|
"NORMAL=" + NORMAL +
|
||||||
|
", id='" + id + '\'' +
|
||||||
|
", userNiceName='" + userNiceName + '\'' +
|
||||||
|
", level=" + level +
|
||||||
|
", content='" + content + '\'' +
|
||||||
|
", heart=" + heart +
|
||||||
|
", type=" + type +
|
||||||
|
", liangName='" + liangName + '\'' +
|
||||||
|
", vipType=" + vipType +
|
||||||
|
", guardType=" + guardType +
|
||||||
|
", anchor=" + anchor +
|
||||||
|
", manager=" + manager +
|
||||||
|
", medalNmae='" + medalNmae + '\'' +
|
||||||
|
", medalLevelImageUrl='" + medalLevelImageUrl + '\'' +
|
||||||
|
", bubble='" + bubble + '\'' +
|
||||||
|
", medal='" + medal + '\'' +
|
||||||
|
", medal_new='" + medal_new + '\'' +
|
||||||
|
", medal_honor='" + medal_honor + '\'' +
|
||||||
|
", hot_num='" + hot_num + '\'' +
|
||||||
|
", good_nub='" + good_nub + '\'' +
|
||||||
|
", anchorName='" + anchorName + '\'' +
|
||||||
|
", prankIcon='" + prankIcon + '\'' +
|
||||||
|
", hot_card='" + hot_card + '\'' +
|
||||||
|
", msgModel=" + msgModel +
|
||||||
|
", giftName='" + giftName + '\'' +
|
||||||
|
", aiAutomaticSpeechModel=" + aiAutomaticSpeechModel +
|
||||||
|
", nobleId='" + nobleId + '\'' +
|
||||||
|
", nobleIcon='" + nobleIcon + '\'' +
|
||||||
|
", bubbleSrc='" + bubbleSrc + '\'' +
|
||||||
|
", startColor='" + startColor + '\'' +
|
||||||
|
", endColor='" + endColor + '\'' +
|
||||||
|
", contentColor='" + contentColor + '\'' +
|
||||||
|
", atUserName='" + atUserName + '\'' +
|
||||||
|
", atUserID='" + atUserID + '\'' +
|
||||||
|
", isAttention=" + isAttention +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,13 +3,15 @@ package com.yunbao.live.bean;
|
|||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
|
import com.yunbao.common.bean.BaseModel;
|
||||||
|
import com.yunbao.common.event.AllServerNotifyEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by cxf on 2017/8/22.
|
* Created by cxf on 2017/8/22.
|
||||||
* 收到送礼物消息的实体类
|
* 收到送礼物消息的实体类
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class LiveReceiveGiftBean {
|
public class LiveReceiveGiftBean extends BaseModel {
|
||||||
|
|
||||||
private String uid;
|
private String uid;
|
||||||
private String avatar;
|
private String avatar;
|
||||||
@ -51,6 +53,26 @@ public class LiveReceiveGiftBean {
|
|||||||
private String nobilityname;
|
private String nobilityname;
|
||||||
private String opentype;
|
private String opentype;
|
||||||
private String anchorUid;
|
private String anchorUid;
|
||||||
|
private boolean isBlindBox = false;
|
||||||
|
private AllServerNotifyEvent event = new AllServerNotifyEvent();
|
||||||
|
|
||||||
|
public AllServerNotifyEvent getEvent() {
|
||||||
|
return event;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveReceiveGiftBean setEvent(AllServerNotifyEvent event) {
|
||||||
|
this.event = event;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isBlindBox() {
|
||||||
|
return isBlindBox;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveReceiveGiftBean setBlindBox(boolean blindBox) {
|
||||||
|
isBlindBox = blindBox;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public String getAnchorUid() {
|
public String getAnchorUid() {
|
||||||
return anchorUid;
|
return anchorUid;
|
||||||
|
@ -0,0 +1,75 @@
|
|||||||
|
package com.yunbao.live.dialog;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.EditText;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import com.lxj.xpopup.XPopup;
|
||||||
|
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
||||||
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
|
import com.yunbao.live.R;
|
||||||
|
import com.yunbao.live.utils.LiveAnchorVoteManager;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主播创建问答弹框
|
||||||
|
*/
|
||||||
|
public class LiveAnchorCreateQADialog extends AbsDialogPopupWindow {
|
||||||
|
private EditText question, answer1, answer2;
|
||||||
|
private Button submit, cancel;
|
||||||
|
|
||||||
|
private String liveUid;
|
||||||
|
|
||||||
|
public LiveAnchorCreateQADialog setLiveUid(String liveUid) {
|
||||||
|
this.liveUid = liveUid;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public LiveAnchorCreateQADialog(@NonNull Context context) {
|
||||||
|
super(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void buildDialog(XPopup.Builder builder) {
|
||||||
|
builder.dismissOnTouchOutside(false);
|
||||||
|
builder.autoFocusEditText(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int bindLayoutId() {
|
||||||
|
return R.layout.dialog_live_anchor_create_qa;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate() {
|
||||||
|
super.onCreate();
|
||||||
|
question = findViewById(R.id.edit_question);
|
||||||
|
answer1 = findViewById(R.id.edit_answer1);
|
||||||
|
answer2 = findViewById(R.id.edit_answer2);
|
||||||
|
submit = findViewById(R.id.submit);
|
||||||
|
cancel = findViewById(R.id.cancel);
|
||||||
|
cancel.setOnClickListener(v -> dismiss());
|
||||||
|
submit.setOnClickListener(v -> {
|
||||||
|
if (question.getText().toString().trim().length() == 0 ||
|
||||||
|
answer1.getText().toString().trim().length() == 0 ||
|
||||||
|
answer2.getText().toString().trim().length() == 0
|
||||||
|
) {
|
||||||
|
ToastUtil.show(getContext().getString(R.string.live_anchor_vote_tip));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
createVote(question.getText().toString(), answer1.getText().toString(), answer2.getText().toString());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createVote(String question, String answer1, String answer2) {
|
||||||
|
LiveAnchorVoteManager.getInstance().createVote(liveUid, question, answer1, answer2, (bean, position) -> {
|
||||||
|
if(position!=0){
|
||||||
|
ToastUtil.show(bean.getContent());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
dismiss();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -11,7 +11,10 @@ import android.graphics.drawable.Drawable;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
|
import android.text.Spannable;
|
||||||
|
import android.text.SpannableStringBuilder;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
import android.text.style.ForegroundColorSpan;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
@ -19,9 +22,11 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.Window;
|
import android.view.Window;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
|
import android.widget.FrameLayout;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.PopupWindow;
|
import android.widget.PopupWindow;
|
||||||
|
import android.widget.ProgressBar;
|
||||||
import android.widget.RadioButton;
|
import android.widget.RadioButton;
|
||||||
import android.widget.RadioGroup;
|
import android.widget.RadioGroup;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
@ -35,30 +40,45 @@ import com.alibaba.android.arouter.launcher.ARouter;
|
|||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.opensource.svgaplayer.SVGACallback;
|
||||||
|
import com.opensource.svgaplayer.SVGADrawable;
|
||||||
|
import com.opensource.svgaplayer.SVGAImageView;
|
||||||
|
import com.opensource.svgaplayer.SVGAParser;
|
||||||
|
import com.opensource.svgaplayer.SVGAVideoEntity;
|
||||||
import com.yunbao.common.CommonAppConfig;
|
import com.yunbao.common.CommonAppConfig;
|
||||||
import com.yunbao.common.Constants;
|
import com.yunbao.common.Constants;
|
||||||
|
import com.yunbao.common.bean.BlindBoxInfoModel;
|
||||||
|
import com.yunbao.common.bean.IMLoginModel;
|
||||||
import com.yunbao.common.bean.LiveGiftBean;
|
import com.yunbao.common.bean.LiveGiftBean;
|
||||||
import com.yunbao.common.bean.LiveGiftBean2;
|
import com.yunbao.common.bean.LiveGiftBean2;
|
||||||
import com.yunbao.common.bean.UserBean;
|
import com.yunbao.common.bean.UserBean;
|
||||||
import com.yunbao.common.dialog.AbsDialogFragment;
|
import com.yunbao.common.dialog.AbsDialogFragment;
|
||||||
|
import com.yunbao.common.event.SendBlindGiftEvent;
|
||||||
import com.yunbao.common.http.HttpCallback;
|
import com.yunbao.common.http.HttpCallback;
|
||||||
import com.yunbao.common.http.HttpClient;
|
import com.yunbao.common.http.HttpClient;
|
||||||
|
import com.yunbao.common.http.live.LiveNetManager;
|
||||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||||
import com.yunbao.common.manager.IMLoginManager;
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
|
import com.yunbao.common.utils.AppManager;
|
||||||
import com.yunbao.common.utils.Bus;
|
import com.yunbao.common.utils.Bus;
|
||||||
|
import com.yunbao.common.utils.DialogUitl;
|
||||||
import com.yunbao.common.utils.DpUtil;
|
import com.yunbao.common.utils.DpUtil;
|
||||||
import com.yunbao.common.utils.GiftCacheUtil;
|
import com.yunbao.common.utils.GiftCacheUtil;
|
||||||
import com.yunbao.common.utils.NobleUtil;
|
import com.yunbao.common.utils.NobleUtil;
|
||||||
|
import com.yunbao.common.utils.SVGAViewUtils;
|
||||||
import com.yunbao.common.utils.StringUtil;
|
import com.yunbao.common.utils.StringUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.live.activity.LiveActivity;
|
import com.yunbao.live.activity.LiveActivity;
|
||||||
|
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||||
import com.yunbao.live.adapter.GiftTopAdapter;
|
import com.yunbao.live.adapter.GiftTopAdapter;
|
||||||
import com.yunbao.live.adapter.LiveGiftCountAdapter;
|
import com.yunbao.live.adapter.LiveGiftCountAdapter;
|
||||||
import com.yunbao.live.adapter.LiveGiftPagerAdapter;
|
import com.yunbao.live.adapter.LiveGiftPagerAdapter;
|
||||||
import com.yunbao.live.bean.GiftTopBean;
|
import com.yunbao.live.bean.GiftTopBean;
|
||||||
import com.yunbao.live.bean.LiveGuardInfo;
|
import com.yunbao.live.bean.LiveGuardInfo;
|
||||||
import com.yunbao.live.custom.GiftViewPager;
|
import com.yunbao.live.custom.GiftViewPager;
|
||||||
|
import com.yunbao.live.event.LiveAudienceEvent;
|
||||||
import com.yunbao.live.http.LiveHttpConsts;
|
import com.yunbao.live.http.LiveHttpConsts;
|
||||||
import com.yunbao.live.http.LiveHttpUtil;
|
import com.yunbao.live.http.LiveHttpUtil;
|
||||||
import com.yunbao.live.utils.ToolsButton;
|
import com.yunbao.live.utils.ToolsButton;
|
||||||
@ -67,6 +87,8 @@ import org.greenrobot.eventbus.EventBus;
|
|||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
import org.greenrobot.eventbus.ThreadMode;
|
import org.greenrobot.eventbus.ThreadMode;
|
||||||
|
|
||||||
|
import java.net.MalformedURLException;
|
||||||
|
import java.net.URL;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -85,7 +107,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
private ViewPager mVPWrapList;
|
private ViewPager mVPWrapList;
|
||||||
private RadioGroup mRadioGroup, mRGroupWrap;
|
private RadioGroup mRadioGroup, mRGroupWrap;
|
||||||
private View mLoading;
|
private View mLoading;
|
||||||
private View mArrow;
|
private View mArrow, iconMasking;
|
||||||
private View mBtnSend;
|
private View mBtnSend;
|
||||||
private View mBtnSendGroup;
|
private View mBtnSendGroup;
|
||||||
private View mBtnSendLian;
|
private View mBtnSendLian;
|
||||||
@ -117,19 +139,21 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
|
|
||||||
private RecyclerView items;
|
private RecyclerView items;
|
||||||
private LinearLayout mVipGold;
|
private LinearLayout mVipGold;
|
||||||
|
private FrameLayout blindBox, frameBlindTop;
|
||||||
|
private ProgressBar progressBlind, progressBlind1, progressBlind2;
|
||||||
private GiftTopAdapter giftTopAdapter;
|
private GiftTopAdapter giftTopAdapter;
|
||||||
public int type = 0;
|
public int type = 0;
|
||||||
private static String type_name = "熱門";
|
private static String type_name = "熱門";
|
||||||
JSONArray list;
|
JSONArray list;
|
||||||
private ImageView mVipGoldIcon;
|
private ImageView mVipGoldIcon, description;
|
||||||
private TextView mVipGoldTitle;
|
private TextView mVipGoldTitle;
|
||||||
private TextView mVipGoldDesc;
|
private TextView mVipGoldDesc;
|
||||||
private TextView mGiftPackage;
|
private TextView mGiftPackage, blindNumber, textBlindProgress, textBlindGiftName;
|
||||||
private boolean isPk;
|
private boolean isPk;
|
||||||
private int isContactGift = 0;
|
private int isContactGift = 0;
|
||||||
DialogInterface.OnDismissListener onDismissListener;
|
DialogInterface.OnDismissListener onDismissListener;
|
||||||
DialogInterface.OnShowListener onShowListener;
|
DialogInterface.OnShowListener onShowListener;
|
||||||
|
private SVGAImageView blindSvga, blindBoxOpen;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayoutId() {
|
protected int getLayoutId() {
|
||||||
@ -149,9 +173,10 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
@Override
|
@Override
|
||||||
protected void setWindowAttributes(Window window) {
|
protected void setWindowAttributes(Window window) {
|
||||||
window.setWindowAnimations(R.style.bottomToTopAnim);
|
window.setWindowAnimations(R.style.bottomToTopAnim);
|
||||||
|
window.setDimAmount(0f);//去掉遮罩层(全透明)
|
||||||
WindowManager.LayoutParams params = window.getAttributes();
|
WindowManager.LayoutParams params = window.getAttributes();
|
||||||
params.width = WindowManager.LayoutParams.MATCH_PARENT;
|
params.width = WindowManager.LayoutParams.MATCH_PARENT;
|
||||||
params.height = DpUtil.dp2px(355);
|
params.height = DpUtil.dp2px(433);
|
||||||
params.gravity = Gravity.BOTTOM;
|
params.gravity = Gravity.BOTTOM;
|
||||||
window.setAttributes(params);
|
window.setAttributes(params);
|
||||||
}
|
}
|
||||||
@ -163,6 +188,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
@Override
|
@Override
|
||||||
public void onDismiss(DialogInterface dialog) {
|
public void onDismiss(DialogInterface dialog) {
|
||||||
super.onDismiss(dialog);
|
super.onDismiss(dialog);
|
||||||
|
Bus.getOff(this);
|
||||||
if (onDismissListener != null) {
|
if (onDismissListener != null) {
|
||||||
onDismissListener.onDismiss(dialog);
|
onDismissListener.onDismiss(dialog);
|
||||||
}
|
}
|
||||||
@ -183,12 +209,21 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
@Override
|
@Override
|
||||||
public void onActivityCreated(Bundle savedInstanceState) {
|
public void onActivityCreated(Bundle savedInstanceState) {
|
||||||
super.onActivityCreated(savedInstanceState);
|
super.onActivityCreated(savedInstanceState);
|
||||||
|
Bus.getOn(this);
|
||||||
mCoin = (TextView) mRootView.findViewById(R.id.coin);
|
mCoin = (TextView) mRootView.findViewById(R.id.coin);
|
||||||
mTvGoldCoin = (TextView) mRootView.findViewById(R.id.goldCoin);
|
mTvGoldCoin = (TextView) mRootView.findViewById(R.id.goldCoin);
|
||||||
mTvGoCharge = (TextView) mRootView.findViewById(R.id.go_charge);
|
mTvGoCharge = (TextView) mRootView.findViewById(R.id.go_charge);
|
||||||
items = (RecyclerView) mRootView.findViewById(R.id.items);
|
items = (RecyclerView) mRootView.findViewById(R.id.items);
|
||||||
mLoading = mRootView.findViewById(R.id.loading);
|
mLoading = mRootView.findViewById(R.id.loading);
|
||||||
|
blindBox = mRootView.findViewById(R.id.blind_box);
|
||||||
|
frameBlindTop = mRootView.findViewById(R.id.frame_blind_top);
|
||||||
|
progressBlind = mRootView.findViewById(R.id.progress_blind1);
|
||||||
|
progressBlind1 = mRootView.findViewById(R.id.progress_blind2);
|
||||||
|
progressBlind2 = mRootView.findViewById(R.id.progress_blind3);
|
||||||
mArrow = mRootView.findViewById(R.id.arrow);
|
mArrow = mRootView.findViewById(R.id.arrow);
|
||||||
|
iconMasking = mRootView.findViewById(R.id.icon_masking);
|
||||||
|
blindSvga = mRootView.findViewById(R.id.blind_svga);
|
||||||
|
blindBoxOpen = mRootView.findViewById(R.id.blind_box_open);
|
||||||
mBtnSend = mRootView.findViewById(R.id.btn_send);
|
mBtnSend = mRootView.findViewById(R.id.btn_send);
|
||||||
mBtnSendGroup = mRootView.findViewById(R.id.btn_send_group);
|
mBtnSendGroup = mRootView.findViewById(R.id.btn_send_group);
|
||||||
mBtnSendLian = mRootView.findViewById(R.id.btn_send_lian);
|
mBtnSendLian = mRootView.findViewById(R.id.btn_send_lian);
|
||||||
@ -209,6 +244,13 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
type = position;
|
type = position;
|
||||||
type_name = bean.getName();
|
type_name = bean.getName();
|
||||||
upData();
|
upData();
|
||||||
|
if (mBtnSendGroup != null && mBtnSendGroup.getVisibility() == View.VISIBLE) {
|
||||||
|
mBtnChooseCount.setVisibility(View.INVISIBLE);
|
||||||
|
mArrow.setVisibility(View.INVISIBLE);
|
||||||
|
mBtnSend.setVisibility(View.VISIBLE);
|
||||||
|
mBtnSend.setEnabled(false);
|
||||||
|
mBtnSend.setBackgroundDrawable(mDrawable2);
|
||||||
|
}
|
||||||
//点击礼物,展示礼物列表
|
//点击礼物,展示礼物列表
|
||||||
mCurrentId = 0;
|
mCurrentId = 0;
|
||||||
if (mViewPager != null) {
|
if (mViewPager != null) {
|
||||||
@ -271,10 +313,14 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
mTvGoldCoin.setOnClickListener(this);
|
mTvGoldCoin.setOnClickListener(this);
|
||||||
mVipGold = mRootView.findViewById(R.id.btn_luck_gift_tip);
|
mVipGold = mRootView.findViewById(R.id.btn_luck_gift_tip);
|
||||||
mVipGoldIcon = mRootView.findViewById(R.id.vipGoldIcon);
|
mVipGoldIcon = mRootView.findViewById(R.id.vipGoldIcon);
|
||||||
|
description = mRootView.findViewById(R.id.description);
|
||||||
mVipGoldTitle = mRootView.findViewById(R.id.vipGoldTitle);
|
mVipGoldTitle = mRootView.findViewById(R.id.vipGoldTitle);
|
||||||
mVipGoldDesc = mRootView.findViewById(R.id.vipGoldDesc);
|
mVipGoldDesc = mRootView.findViewById(R.id.vipGoldDesc);
|
||||||
mVipGold.setOnClickListener(this);
|
mVipGold.setOnClickListener(this);
|
||||||
mGiftPackage = mRootView.findViewById(R.id.btn_gift_package);
|
mGiftPackage = mRootView.findViewById(R.id.btn_gift_package);
|
||||||
|
blindNumber = mRootView.findViewById(R.id.blind_number);
|
||||||
|
textBlindProgress = mRootView.findViewById(R.id.text_blind_progress);
|
||||||
|
textBlindGiftName = mRootView.findViewById(R.id.text_blind_gift_name);
|
||||||
mGiftPackage.setOnClickListener(this);
|
mGiftPackage.setOnClickListener(this);
|
||||||
mRootView.findViewById(R.id.live_gift_download_all).setOnClickListener(this);
|
mRootView.findViewById(R.id.live_gift_download_all).setOnClickListener(this);
|
||||||
mHandler = new Handler() {
|
mHandler = new Handler() {
|
||||||
@ -309,6 +355,41 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
if (isPk) {
|
if (isPk) {
|
||||||
mVipGold.setVisibility(View.GONE);
|
mVipGold.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
getBlindBoxInfo();
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(description, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onViewClicks() {
|
||||||
|
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
||||||
|
StringBuffer htmlUrl = new StringBuffer();
|
||||||
|
htmlUrl.append(CommonAppConfig.HOST)
|
||||||
|
.append("/h5/info/index.html?uid=")
|
||||||
|
.append(userInfo.getId())
|
||||||
|
.append("&token=")
|
||||||
|
.append(userInfo.getToken());
|
||||||
|
Bundle bundle = new Bundle();
|
||||||
|
bundle.putString("url", htmlUrl.toString());
|
||||||
|
LiveHDDialogFragment fragment = new LiveHDDialogFragment();
|
||||||
|
fragment.setArguments(bundle);
|
||||||
|
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<BlindBoxInfoModel> blindBoxInfoModels = new ArrayList<>();
|
||||||
|
|
||||||
|
private void getBlindBoxInfo() {
|
||||||
|
LiveNetManager.get(mContext)
|
||||||
|
.getBlindBoxInfo(new com.yunbao.common.http.base.HttpCallback<List<BlindBoxInfoModel>>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(List<BlindBoxInfoModel> data) {
|
||||||
|
blindBoxInfoModels = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(String error) {
|
||||||
|
ToastUtil.show(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -363,7 +444,6 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
upData();
|
upData();
|
||||||
mCoin.setText(obj.getString("coin"));
|
mCoin.setText(obj.getString("coin"));
|
||||||
mTvGoldCoin.setText(obj.getString("gold"));
|
mTvGoldCoin.setText(obj.getString("gold"));
|
||||||
Bus.getOn(LiveGiftDialogFragment.this);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -644,6 +724,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void itemCheckOp(LiveGiftBean bean) {
|
private void itemCheckOp(LiveGiftBean bean) {
|
||||||
|
stringBuilders.clear();
|
||||||
mLiveGiftBean = bean;
|
mLiveGiftBean = bean;
|
||||||
hideLianBtn();
|
hideLianBtn();
|
||||||
mBtnSend.setEnabled(true);
|
mBtnSend.setEnabled(true);
|
||||||
@ -655,7 +736,149 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
mBtnChooseCount.setVisibility(View.VISIBLE);
|
mBtnChooseCount.setVisibility(View.VISIBLE);
|
||||||
mArrow.setVisibility(View.VISIBLE);
|
mArrow.setVisibility(View.VISIBLE);
|
||||||
mBtnSend.setBackground(mDrawable1);
|
mBtnSend.setBackground(mDrawable1);
|
||||||
|
mBtnChooseCount.setEnabled(true);
|
||||||
}
|
}
|
||||||
|
if (bean.getType() == 7) {
|
||||||
|
|
||||||
|
showBlindProgress(bean.getBlind_box_type());
|
||||||
|
} else {
|
||||||
|
if (isPk) {
|
||||||
|
mVipGold.setVisibility(View.GONE);
|
||||||
|
} else {
|
||||||
|
mVipGold.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
blindBox.setVisibility(View.INVISIBLE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 展示当前盲盒礼物进度
|
||||||
|
*
|
||||||
|
* @param blindBoxType
|
||||||
|
*/
|
||||||
|
private StringBuffer blindGiftNamesBuffer = null;
|
||||||
|
private int blindBoxType;
|
||||||
|
|
||||||
|
private void showBlindProgress(int blindBoxType) {
|
||||||
|
this.blindBoxType = blindBoxType;
|
||||||
|
blindGiftNamesBuffer = new StringBuffer();
|
||||||
|
BlindBoxInfoModel model = null;
|
||||||
|
for (BlindBoxInfoModel boxInfoModel : blindBoxInfoModels) {
|
||||||
|
if (TextUtils.equals(String.valueOf(blindBoxType), boxInfoModel.getBlindBoxType())) {
|
||||||
|
model = boxInfoModel;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (model == null) return;
|
||||||
|
blindBoxOpen.clear();
|
||||||
|
blindBoxOpen.setVisibility(View.GONE);
|
||||||
|
try {
|
||||||
|
blindSvga.clear();
|
||||||
|
new SVGAParser(mContext).parse(new URL(model.getThresholdEffectSrc()), new SVGAParser.ParseCompletion() {
|
||||||
|
@Override
|
||||||
|
public void onComplete(SVGAVideoEntity videoItem) {
|
||||||
|
SVGADrawable drawable = new SVGADrawable(videoItem);
|
||||||
|
blindSvga.setImageDrawable(drawable);
|
||||||
|
SVGAViewUtils.playEndClear(blindSvga, false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError() {
|
||||||
|
Log.e("errqs", "errl");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} catch (MalformedURLException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
mArrow.setVisibility(View.GONE);
|
||||||
|
mBtnChooseCount.setEnabled(false);
|
||||||
|
mVipGold.setVisibility(View.GONE);
|
||||||
|
blindBox.setVisibility(View.VISIBLE);
|
||||||
|
String boxBlindName = "";
|
||||||
|
switch (blindBoxType) {
|
||||||
|
case 1:
|
||||||
|
boxBlindName = mContext.getString(R.string.mini_blind_box);
|
||||||
|
progressBlind.setVisibility(View.VISIBLE);
|
||||||
|
progressBlind1.setVisibility(View.GONE);
|
||||||
|
progressBlind2.setVisibility(View.GONE);
|
||||||
|
frameBlindTop.setBackgroundResource(R.mipmap.bg_kirin);
|
||||||
|
iconMasking.setBackgroundResource(R.mipmap.icon_masking_kirin);
|
||||||
|
progressBlind.setMax(Integer.parseInt(model.getThresholdValue()));
|
||||||
|
progressBlind.setProgress(Integer.parseInt(model.getDressThresholdValue()));
|
||||||
|
textBlindProgress.setTextColor(Color.parseColor("#047771"));
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
boxBlindName = mContext.getString(R.string.collection_blind_box);
|
||||||
|
progressBlind.setVisibility(View.GONE);
|
||||||
|
progressBlind1.setVisibility(View.VISIBLE);
|
||||||
|
progressBlind2.setVisibility(View.GONE);
|
||||||
|
frameBlindTop.setBackgroundResource(R.mipmap.bg_phoenix);
|
||||||
|
iconMasking.setBackgroundResource(R.mipmap.icon_masking_phoenix);
|
||||||
|
progressBlind1.setMax(Integer.parseInt(model.getThresholdValue()));
|
||||||
|
progressBlind1.setProgress(Integer.parseInt(model.getDressThresholdValue()));
|
||||||
|
textBlindProgress.setTextColor(Color.parseColor("#6D2E0F"));
|
||||||
|
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
boxBlindName = mContext.getString(R.string.pd_blind_box);
|
||||||
|
progressBlind.setVisibility(View.GONE);
|
||||||
|
progressBlind1.setVisibility(View.GONE);
|
||||||
|
progressBlind2.setVisibility(View.VISIBLE);
|
||||||
|
frameBlindTop.setBackgroundResource(R.mipmap.bg_dragon);
|
||||||
|
iconMasking.setBackgroundResource(R.mipmap.icon_masking_dragon);
|
||||||
|
progressBlind2.setMax(Integer.parseInt(model.getThresholdValue()));
|
||||||
|
progressBlind2.setProgress(Integer.parseInt(model.getDressThresholdValue()));
|
||||||
|
textBlindProgress.setTextColor(Color.parseColor("#905E01"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
//进度下方提示语
|
||||||
|
if (TextUtils.equals(model.getThresholdValue(), model.getDressThresholdValue())) {
|
||||||
|
String individualDressing = mContext.getString(R.string.individual_dressing);
|
||||||
|
String msg = mContext.getString(R.string.have_already_win);
|
||||||
|
msg = String.format(msg, model.getThresholdDressName());
|
||||||
|
int dressNameIndexOf = msg.indexOf(model.getThresholdDressName());
|
||||||
|
int individualDressingIndexOf = msg.indexOf(String.valueOf(individualDressing));
|
||||||
|
int dressNameSize = model.getThresholdDressName().length();
|
||||||
|
int individualDressingSize = String.valueOf(individualDressing).length();
|
||||||
|
SpannableStringBuilder builder = new SpannableStringBuilder();
|
||||||
|
builder.append(msg);
|
||||||
|
builder.setSpan(new ForegroundColorSpan(Color.parseColor("#FFF682")), dressNameIndexOf, dressNameIndexOf + dressNameSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
|
builder.setSpan(new ForegroundColorSpan(Color.parseColor("#FFF682")), individualDressingIndexOf, individualDressingIndexOf + individualDressingSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
|
blindNumber.setText(builder);
|
||||||
|
iconMasking.setAlpha(0.f);
|
||||||
|
} else {
|
||||||
|
int progress = Integer.parseInt(model.getThresholdValue()) - Integer.parseInt(model.getDressThresholdValue());
|
||||||
|
String msg = mContext.getString(R.string.resend_win);
|
||||||
|
msg = String.format(msg, String.valueOf(progress), model.getThresholdDressName());
|
||||||
|
int dressNameIndexOf = msg.indexOf(model.getThresholdDressName());
|
||||||
|
int progressIndexOf = msg.indexOf(String.valueOf(progress));
|
||||||
|
int dressNameSize = model.getThresholdDressName().length();
|
||||||
|
int progressSize = String.valueOf(progress).length();
|
||||||
|
SpannableStringBuilder builder = new SpannableStringBuilder();
|
||||||
|
builder.append(msg);
|
||||||
|
builder.setSpan(new ForegroundColorSpan(Color.parseColor("#FFF682")), dressNameIndexOf, dressNameIndexOf + dressNameSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
|
builder.setSpan(new ForegroundColorSpan(Color.parseColor("#FFF682")), progressIndexOf, progressIndexOf + progressSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
|
blindNumber.setText(builder);
|
||||||
|
StringBuffer stringBuffer = new StringBuffer();
|
||||||
|
stringBuffer.append(model.getDressThresholdValue())
|
||||||
|
.append("/")
|
||||||
|
.append(model.getThresholdValue());
|
||||||
|
textBlindProgress.setText(stringBuffer.toString());
|
||||||
|
float maskingAlpha = (float) progress / Float.parseFloat(model.getThresholdValue());
|
||||||
|
iconMasking.setAlpha(maskingAlpha);
|
||||||
|
}
|
||||||
|
//盲盒礼物文字跑马灯
|
||||||
|
for (int i = 0; i < model.getItemName().size(); i++) {
|
||||||
|
blindGiftNamesBuffer
|
||||||
|
.append(model.getItemName().get(i));
|
||||||
|
|
||||||
|
if (i != model.getItemName().size() - 1) {
|
||||||
|
blindGiftNamesBuffer.append(",");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
textBlindGiftName.setText(String.format(mContext.getString(R.string.random_availability), blindGiftNamesBuffer.toString()));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -689,7 +912,11 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
SendGiftCallback callback = new SendGiftCallback(mLiveGiftBean);
|
SendGiftCallback callback = new SendGiftCallback(mLiveGiftBean);
|
||||||
if (!StringUtil.isEmpty(mWishGiftId) && mLiveGiftBean.getId() != Integer.parseInt(mWishGiftId)) {
|
try {
|
||||||
|
if (!StringUtil.isEmpty(mWishGiftId) && mLiveGiftBean.getId() != Integer.parseInt(mWishGiftId)) {
|
||||||
|
isContactGift = 0;
|
||||||
|
}
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
isContactGift = 0;
|
isContactGift = 0;
|
||||||
}
|
}
|
||||||
if (by != null) {
|
if (by != null) {
|
||||||
@ -790,29 +1017,244 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
if (mTvGoldCoin != null) {
|
if (mTvGoldCoin != null) {
|
||||||
mTvGoldCoin.setText(goldCoin);
|
mTvGoldCoin.setText(goldCoin);
|
||||||
}
|
}
|
||||||
if (mContext != null && mGiftBean != null) {
|
// if (mContext != null && mGiftBean != null) {
|
||||||
((LiveActivity) mContext).onCoinChanged(coin);//
|
// ((LiveActivity) mContext).onCoinChanged(coin);//
|
||||||
if (by != null) {
|
// if (by != null) {
|
||||||
((LiveActivity) mContext).sendGiftMessage(mGiftBean, obj.getString("gifttoken")
|
// ((LiveActivity) mContext).sendGiftMessage(mGiftBean, obj.getString("gifttoken")
|
||||||
, obj.getString("ancherName"), "1");
|
// , obj.getString("ancherName"), "1");
|
||||||
} else {
|
// } else {
|
||||||
((LiveActivity) mContext).sendGiftMessage(mGiftBean, obj.getString("gifttoken")
|
// ((LiveActivity) mContext).sendGiftMessage(mGiftBean, obj.getString("gifttoken")
|
||||||
, obj.getString("ancherName"), "0");
|
// , obj.getString("ancherName"), "0");
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
if (mLiveGiftBean.getType() == LiveGiftBean2.TYPE_NORMAL && !mLiveGiftBean.getSwf().contains("svga")) {
|
if (mLiveGiftBean.getType() == LiveGiftBean2.TYPE_NORMAL && !mLiveGiftBean.getSwf().contains("svga")) {
|
||||||
showLianBtn();
|
showLianBtn();
|
||||||
}
|
}
|
||||||
|
if (mLiveGiftBean.getType()==7){
|
||||||
|
showLianBtn();
|
||||||
|
}
|
||||||
//刷新包裹列表wrap_gift_num -1:表示数量没有变化
|
//刷新包裹列表wrap_gift_num -1:表示数量没有变化
|
||||||
mObjGiftSendback = obj;
|
mObjGiftSendback = obj;
|
||||||
isGetNewWrap = true;
|
isGetNewWrap = true;
|
||||||
refreshWrapListAfterSend();
|
refreshWrapListAfterSend();
|
||||||
}
|
}
|
||||||
|
} else if (code == 1007 && mLiveGiftBean.getType() != 0) {
|
||||||
|
hideLianBtn();
|
||||||
|
dismiss();
|
||||||
|
LiveAudienceEvent.LiveAudienceType type = null;
|
||||||
|
String confirmString = mContext.getString(R.string.dialog_fount_submit);
|
||||||
|
String tips = msg;
|
||||||
|
switch (mLiveGiftBean.getType()) {
|
||||||
|
case 1:
|
||||||
|
type = LiveAudienceEvent.LiveAudienceType.NOBLE;
|
||||||
|
tips = mContext.getString(R.string.dialog_live_gift_noble);
|
||||||
|
confirmString = mContext.getString(R.string.dialog_live_gift_open_noble);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
type = LiveAudienceEvent.LiveAudienceType.GUARD;
|
||||||
|
tips = mContext.getString(R.string.dialog_live_gift_guard);
|
||||||
|
confirmString = mContext.getString(R.string.dialog_live_gift_open_guard);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
type = LiveAudienceEvent.LiveAudienceType.FAN_CLUB;
|
||||||
|
tips = mContext.getString(R.string.dialog_live_gift_fans);
|
||||||
|
confirmString = mContext.getString(R.string.dialog_live_gift_open_fans);
|
||||||
|
}
|
||||||
|
LiveAudienceEvent.LiveAudienceType finalType = type;
|
||||||
|
new DialogUitl.Builder(mContext)
|
||||||
|
.setView(R.layout.dialog_live_unfollow)
|
||||||
|
.setConfirmString(confirmString)
|
||||||
|
.setContent(tips)
|
||||||
|
.setClickCallback((dialog, content) -> {
|
||||||
|
LiveAudienceEvent event = new LiveAudienceEvent()
|
||||||
|
.setType(finalType);
|
||||||
|
if (finalType == LiveAudienceEvent.LiveAudienceType.GUARD) {
|
||||||
|
event = event.setObject("");
|
||||||
|
}
|
||||||
|
Bus.get().post(event);
|
||||||
|
}).build().show();
|
||||||
|
|
||||||
|
AppManager.runDebugCode(() -> {
|
||||||
|
Log.i("gifBean", mLiveGiftBean.toString());
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
hideLianBtn();
|
hideLianBtn();
|
||||||
ToastUtil.show(msg);
|
ToastUtil.show(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
|
public void onSendBlindGiftEvent(SendBlindGiftEvent event) {
|
||||||
|
if (!TextUtils.equals(String.valueOf(IMLoginManager.get(mContext).getUserInfo().getId()), event.getUid()))
|
||||||
|
return;
|
||||||
|
BlindBoxInfoModel model = null;
|
||||||
|
for (int i = 0; i < blindBoxInfoModels.size(); i++) {
|
||||||
|
if (TextUtils.equals(blindBoxInfoModels.get(i).getBlindBoxType(), event.getBoxType())) {
|
||||||
|
blindBoxInfoModels.get(i).setDressThresholdValue(event.getDressThresholdValue());
|
||||||
|
blindBoxInfoModels.get(i).setThresholdValue(event.getThresholdValue());
|
||||||
|
model = blindBoxInfoModels.get(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
long userID = IMLoginManager.get(mContext).getUserInfo().getId();
|
||||||
|
String boxBlindName;
|
||||||
|
try {
|
||||||
|
if (!blindBoxOpen.isAnimating()) {
|
||||||
|
new SVGAParser(mContext).parse(new URL(model.getBlindBoxSwf()), new SVGAParser.ParseCompletion() {
|
||||||
|
@Override
|
||||||
|
public void onComplete(SVGAVideoEntity videoItem) {
|
||||||
|
blindBoxOpen.setVisibility(View.VISIBLE);
|
||||||
|
SVGADrawable drawable = new SVGADrawable(videoItem);
|
||||||
|
blindBoxOpen.setImageDrawable(drawable);
|
||||||
|
blindBoxOpen.setLoops(1);
|
||||||
|
blindBoxOpen.startAnimation();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError() {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
blindBoxOpen.setCallback(new SVGACallback() {
|
||||||
|
@Override
|
||||||
|
public void onPause() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFinished() {
|
||||||
|
blindBoxOpen.clear();
|
||||||
|
blindBoxOpen.setVisibility(View.GONE);
|
||||||
|
Log.e("礼物盲盒", "结束播放");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRepeat() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStep(int i, double v) {
|
||||||
|
Log.e("礼物盲盒", "onStep: frame " + i + " percentage " + v);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (MalformedURLException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
//判断送礼用户更新送礼用户进度
|
||||||
|
if (TextUtils.equals(String.valueOf(userID), event.getUid()) && blindBoxType == Integer.parseInt(event.getBoxType())) {
|
||||||
|
switch (blindBoxType) {
|
||||||
|
case 1:
|
||||||
|
boxBlindName = mContext.getString(R.string.mini_blind_box);
|
||||||
|
|
||||||
|
progressBlind.setMax(Integer.parseInt(model.getThresholdValue()));
|
||||||
|
progressBlind.setProgress(Integer.parseInt(model.getDressThresholdValue()));
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
boxBlindName = mContext.getString(R.string.collection_blind_box);
|
||||||
|
|
||||||
|
progressBlind1.setMax(Integer.parseInt(model.getThresholdValue()));
|
||||||
|
progressBlind1.setProgress(Integer.parseInt(model.getDressThresholdValue()));
|
||||||
|
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
boxBlindName = mContext.getString(R.string.pd_blind_box);
|
||||||
|
progressBlind2.setMax(Integer.parseInt(model.getThresholdValue()));
|
||||||
|
progressBlind2.setProgress(Integer.parseInt(model.getDressThresholdValue()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
//进度下方提示语
|
||||||
|
if (TextUtils.equals(model.getThresholdValue(), model.getDressThresholdValue())) {
|
||||||
|
String individualDressing = mContext.getString(R.string.individual_dressing);
|
||||||
|
String msg = mContext.getString(R.string.have_already_win);
|
||||||
|
msg = String.format(msg, model.getThresholdDressName());
|
||||||
|
int dressNameIndexOf = msg.indexOf(model.getThresholdDressName());
|
||||||
|
int individualDressingIndexOf = msg.indexOf(String.valueOf(individualDressing));
|
||||||
|
int dressNameSize = model.getThresholdDressName().length();
|
||||||
|
int individualDressingSize = String.valueOf(individualDressing).length();
|
||||||
|
SpannableStringBuilder builder = new SpannableStringBuilder();
|
||||||
|
builder.append(msg);
|
||||||
|
builder.setSpan(new ForegroundColorSpan(Color.parseColor("#FFF682")), dressNameIndexOf, dressNameIndexOf + dressNameSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
|
builder.setSpan(new ForegroundColorSpan(Color.parseColor("#FFF682")), individualDressingIndexOf, individualDressingIndexOf + individualDressingSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
|
blindNumber.setText(builder);
|
||||||
|
textBlindProgress.setText(R.string.get_it_done);
|
||||||
|
} else {
|
||||||
|
int progress = Integer.parseInt(model.getThresholdValue()) - Integer.parseInt(model.getDressThresholdValue());
|
||||||
|
String msg = mContext.getString(R.string.resend_win);
|
||||||
|
msg = String.format(msg, String.valueOf(progress), model.getThresholdDressName());
|
||||||
|
int dressNameIndexOf = msg.indexOf(model.getThresholdDressName());
|
||||||
|
int progressIndexOf = msg.indexOf(String.valueOf(progress));
|
||||||
|
int dressNameSize = model.getThresholdDressName().length();
|
||||||
|
int progressSize = String.valueOf(progress).length();
|
||||||
|
SpannableStringBuilder builder = new SpannableStringBuilder();
|
||||||
|
builder.append(msg);
|
||||||
|
builder.setSpan(new ForegroundColorSpan(Color.parseColor("#FFF682")), dressNameIndexOf, dressNameIndexOf + dressNameSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
|
builder.setSpan(new ForegroundColorSpan(Color.parseColor("#FFF682")), progressIndexOf, progressIndexOf + progressSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
|
blindNumber.setText(builder);
|
||||||
|
StringBuffer stringBuffer = new StringBuffer();
|
||||||
|
stringBuffer.append(model.getDressThresholdValue())
|
||||||
|
.append("/")
|
||||||
|
.append(model.getThresholdValue());
|
||||||
|
textBlindProgress.setText(stringBuffer.toString());
|
||||||
|
float maskingAlpha = (float) progress / Float.parseFloat(model.getThresholdValue());
|
||||||
|
iconMasking.setAlpha(maskingAlpha);
|
||||||
|
}
|
||||||
|
if (stringBuilders.size() == 0) {
|
||||||
|
boxBlindHandler.postDelayed(boxBlindRunnable, 1500);
|
||||||
|
}
|
||||||
|
if (!TextUtils.isEmpty(event.getDressName()) && !TextUtils.isEmpty(event.getDressMsg())) {
|
||||||
|
SpannableStringBuilder stringBuilder = new SpannableStringBuilder();
|
||||||
|
String boxBlindMsg = String.format(mContext.getString(R.string.random_availability2), event.getGiftname(), event.getDressName());
|
||||||
|
stringBuilder.append(boxBlindMsg);
|
||||||
|
int dressNameIndex = boxBlindMsg.indexOf(event.getDressName());
|
||||||
|
int dressNameSize = event.getDressName().length();
|
||||||
|
int giftNameIndex = boxBlindMsg.indexOf(event.getGiftname());
|
||||||
|
int giftNameSize = event.getGiftname().length();
|
||||||
|
stringBuilder.setSpan(new ForegroundColorSpan(Color.parseColor(event.getDressColour())),
|
||||||
|
dressNameIndex,
|
||||||
|
dressNameIndex + dressNameSize,
|
||||||
|
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
|
stringBuilder.setSpan(new ForegroundColorSpan(Color.parseColor(event.getGiftColour())),
|
||||||
|
giftNameIndex,
|
||||||
|
giftNameIndex + giftNameSize,
|
||||||
|
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
|
stringBuilders.add(stringBuilder);
|
||||||
|
} else {
|
||||||
|
SpannableStringBuilder stringBuilder = new SpannableStringBuilder();
|
||||||
|
String boxBlindMsg = String.format(mContext.getString(R.string.random_availability3), event.getGiftname());
|
||||||
|
stringBuilder.append(boxBlindMsg);
|
||||||
|
int giftNameIndex = boxBlindMsg.indexOf(event.getGiftname());
|
||||||
|
int giftNameSize = event.getGiftname().length();
|
||||||
|
stringBuilder.setSpan(new ForegroundColorSpan(Color.parseColor(event.getGiftColour())),
|
||||||
|
giftNameIndex,
|
||||||
|
giftNameIndex + giftNameSize,
|
||||||
|
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
|
stringBuilders.add(stringBuilder);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<SpannableStringBuilder> stringBuilders = new ArrayList<>();
|
||||||
|
private Handler boxBlindHandler = new Handler();
|
||||||
|
private Runnable boxBlindRunnable = new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
if (stringBuilders != null && stringBuilders.size() > 0) {
|
||||||
|
SpannableStringBuilder stringBuilder = stringBuilders.get(0);
|
||||||
|
textBlindGiftName.setText(stringBuilder);
|
||||||
|
boxBlindHandler.postDelayed(boxBlindRunnable, 1500);
|
||||||
|
stringBuilders.remove(0);
|
||||||
|
} else {
|
||||||
|
textBlindGiftName.setText(String.format(mContext.getString(R.string.random_availability), blindGiftNamesBuffer.toString()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -343,7 +343,7 @@ public class LiveHDDialogFragment extends AbsDialogFragment {
|
|||||||
dismiss();
|
dismiss();
|
||||||
((LiveAudienceActivity) mContext).openGiftWindow();
|
((LiveAudienceActivity) mContext).openGiftWindow();
|
||||||
} else if (TextUtils.equals(event.getMethod(), "androidGoBack")) {
|
} else if (TextUtils.equals(event.getMethod(), "androidGoBack")) {
|
||||||
// dismiss();
|
dismiss();
|
||||||
} else if (TextUtils.equals(event.getMethod(), "androidMethodLookToLive")) {
|
} else if (TextUtils.equals(event.getMethod(), "androidMethodLookToLive")) {
|
||||||
if (mContext instanceof LiveRyAnchorActivity) {
|
if (mContext instanceof LiveRyAnchorActivity) {
|
||||||
return;
|
return;
|
||||||
|
@ -120,6 +120,7 @@ public class LiveNewFunctionDialogFragment extends AbsDialogFragment implements
|
|||||||
findViewById(R.id.live_tool_robot).setOnClickListener(this);
|
findViewById(R.id.live_tool_robot).setOnClickListener(this);
|
||||||
findViewById(R.id.live_tool_call_me).setOnClickListener(this);
|
findViewById(R.id.live_tool_call_me).setOnClickListener(this);
|
||||||
findViewById(R.id.live_tool_anchor_say).setOnClickListener(this);
|
findViewById(R.id.live_tool_anchor_say).setOnClickListener(this);
|
||||||
|
findViewById(R.id.live_tool_qa).setOnClickListener(this);
|
||||||
|
|
||||||
if (leave == 0) {
|
if (leave == 0) {
|
||||||
((ImageView) mLeaveView.findViewById(R.id.live_tool_leave_img)).setImageResource(R.mipmap.icon_leave);
|
((ImageView) mLeaveView.findViewById(R.id.live_tool_leave_img)).setImageResource(R.mipmap.icon_leave);
|
||||||
@ -198,7 +199,9 @@ public class LiveNewFunctionDialogFragment extends AbsDialogFragment implements
|
|||||||
new LiveAnchorEditCallMeDialog(mContext).setLiveUid(liveUid).showDialog();
|
new LiveAnchorEditCallMeDialog(mContext).setLiveUid(liveUid).showDialog();
|
||||||
} else if (id == R.id.live_tool_anchor_say) {
|
} else if (id == R.id.live_tool_anchor_say) {
|
||||||
new LiveAnchorSayPopDialog(mContext).setLiveUid(liveUid).setOnItemClickListener((bean, position)
|
new LiveAnchorSayPopDialog(mContext).setLiveUid(liveUid).setOnItemClickListener((bean, position)
|
||||||
-> mLiveRoomHandler.postDelayed(()-> ((LiveRyAnchorActivity)(mContext)).mLiveRoomViewHolder.initAnchorSayData(),1000)).showDialog();
|
-> mLiveRoomHandler.postDelayed(() -> ((LiveRyAnchorActivity) (mContext)).mLiveRoomViewHolder.initAnchorSayData(), 1000)).showDialog();
|
||||||
|
} else if (id == R.id.live_tool_qa) {
|
||||||
|
new LiveAnchorCreateQADialog(mContext).setLiveUid(liveUid).showDialog();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package com.yunbao.live.dialog;
|
package com.yunbao.live.dialog;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.Html;
|
import android.text.Html;
|
||||||
@ -35,7 +34,6 @@ import com.yunbao.common.http.live.LiveNetManager;
|
|||||||
import com.yunbao.common.utils.DialogUitl;
|
import com.yunbao.common.utils.DialogUitl;
|
||||||
import com.yunbao.common.utils.RouteUtil;
|
import com.yunbao.common.utils.RouteUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.live.activity.LiveActivity;
|
import com.yunbao.live.activity.LiveActivity;
|
||||||
import com.yunbao.live.activity.LiveRyAnchorActivity;
|
import com.yunbao.live.activity.LiveRyAnchorActivity;
|
||||||
@ -438,7 +436,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
|
|||||||
.setView(R.layout.dialog_live_random_pk)
|
.setView(R.layout.dialog_live_random_pk)
|
||||||
.setTitle(mContext.getString(R.string.dialog_tip))
|
.setTitle(mContext.getString(R.string.dialog_tip))
|
||||||
.setCancelString(mContext.getString(R.string.live_use_discount_no))
|
.setCancelString(mContext.getString(R.string.live_use_discount_no))
|
||||||
.setConfrimString(mContext.getString(R.string.live_use_discount_yes))
|
.setConfirmString(mContext.getString(R.string.live_use_discount_yes))
|
||||||
.setClickCallback(new DialogUitl.SimpleCallback2() {
|
.setClickCallback(new DialogUitl.SimpleCallback2() {
|
||||||
@Override
|
@Override
|
||||||
public void onCancelClick() {
|
public void onCancelClick() {
|
||||||
|
@ -64,7 +64,13 @@ public class LiveNewRoomClassDialogFragment extends AbsDialogFragment implements
|
|||||||
if (configBean != null) {
|
if (configBean != null) {
|
||||||
List<LiveClassBean> list1 = configBean.getLiveClass();
|
List<LiveClassBean> list1 = configBean.getLiveClass();
|
||||||
for (int i = 0; i < list1.size(); i++) {
|
for (int i = 0; i < list1.size(); i++) {
|
||||||
if (!list1.get(i).getName().equals("New") && !list1.get(i).getName().equals("Hot") && !list1.get(i).getName().equals("熱門") && !list1.get(i).getName().equals("新秀")) {
|
if (!list1.get(i).getName().equals("New") &&
|
||||||
|
!list1.get(i).getName().equals("新秀") &&
|
||||||
|
!list1.get(i).getName().equals("熱門") &&
|
||||||
|
!list1.get(i).getName().equals("Hot") &&
|
||||||
|
!list1.get(i).getName().equals("男神") &&
|
||||||
|
!list1.get(i).getName().equals("Mr.Right")
|
||||||
|
) {
|
||||||
list.add(list1.get(i));
|
list.add(list1.get(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,6 @@ import android.graphics.Color;
|
|||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
import androidx.core.content.ContextCompat;
|
|
||||||
|
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
@ -46,29 +44,22 @@ import com.yunbao.common.utils.RouteUtil;
|
|||||||
import com.yunbao.common.utils.SVGAViewUtils;
|
import com.yunbao.common.utils.SVGAViewUtils;
|
||||||
import com.yunbao.common.utils.StringUtil;
|
import com.yunbao.common.utils.StringUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.live.activity.LiveActivity;
|
import com.yunbao.live.activity.LiveActivity;
|
||||||
import com.yunbao.live.activity.LiveReportActivity;
|
import com.yunbao.live.activity.LiveReportActivity;
|
||||||
import com.yunbao.live.activity.LiveRyAnchorActivity;
|
import com.yunbao.live.activity.LiveRyAnchorActivity;
|
||||||
import com.yunbao.live.bean.GuardUserBean;
|
|
||||||
import com.yunbao.live.bean.ImpressBean;
|
|
||||||
import com.yunbao.common.bean.LiveBean;
|
import com.yunbao.common.bean.LiveBean;
|
||||||
import com.yunbao.live.custom.MyTextView;
|
|
||||||
import com.yunbao.live.event.LiveAudienceEvent;
|
import com.yunbao.live.event.LiveAudienceEvent;
|
||||||
import com.yunbao.live.event.LiveRoomChangeEvent;
|
import com.yunbao.live.event.LiveRoomChangeEvent;
|
||||||
import com.yunbao.live.http.LiveHttpConsts;
|
|
||||||
import com.yunbao.live.http.LiveHttpUtil;
|
import com.yunbao.live.http.LiveHttpUtil;
|
||||||
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
||||||
import com.yunbao.live.utils.LiveTextRender;
|
import com.yunbao.live.utils.LiveTextRender;
|
||||||
import com.yunbao.live.views.LiveRoomViewHolder;
|
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
|
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import io.rong.imlib.IRongCoreCallback;
|
import io.rong.imlib.IRongCoreCallback;
|
||||||
@ -534,7 +525,7 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
if (mFollowing) {
|
if (mFollowing) {
|
||||||
DialogUitl.Builder builder = new DialogUitl.Builder(mContext)
|
DialogUitl.Builder builder = new DialogUitl.Builder(mContext)
|
||||||
.setContent(mContext.getString(R.string.unfollow))
|
.setContent(mContext.getString(R.string.unfollow))
|
||||||
.setConfrimString(mContext.getString(R.string.unfollow_confrim))
|
.setConfirmString(mContext.getString(R.string.unfollow_confrim))
|
||||||
.setCancelString(mContext.getString(R.string.unfollow_cancel))
|
.setCancelString(mContext.getString(R.string.unfollow_cancel))
|
||||||
.setView(R.layout.dialog_live_unfollow)
|
.setView(R.layout.dialog_live_unfollow)
|
||||||
.setClickCallback3(new DialogUitl.SimpleCallback3() {
|
.setClickCallback3(new DialogUitl.SimpleCallback3() {
|
||||||
|
295
live/src/main/java/com/yunbao/live/event/LiveAnchorEvent.java
Normal file
@ -0,0 +1,295 @@
|
|||||||
|
package com.yunbao.live.event;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.yunbao.common.bean.ActiveModel;
|
||||||
|
import com.yunbao.common.bean.AiAutomaticSpeechModel;
|
||||||
|
import com.yunbao.common.bean.AnchorRecommendItemModel;
|
||||||
|
import com.yunbao.common.bean.BaseModel;
|
||||||
|
import com.yunbao.common.bean.LiveBean;
|
||||||
|
import com.yunbao.common.bean.MsgModel;
|
||||||
|
import com.yunbao.common.bean.WishModel;
|
||||||
|
import com.yunbao.common.bean.XydCompleteModel;
|
||||||
|
import com.yunbao.common.event.CustomFullServiceNotifyEvent;
|
||||||
|
import com.yunbao.live.bean.LivePKUserListBean;
|
||||||
|
import com.yunbao.live.bean.LiveReceiveGiftBean;
|
||||||
|
import com.yunbao.live.bean.OpenParametersModel;
|
||||||
|
|
||||||
|
|
||||||
|
public class LiveAnchorEvent extends BaseModel {
|
||||||
|
private LiveAnchorType type;
|
||||||
|
private ActiveModel model = new ActiveModel();
|
||||||
|
private String avatar = "";
|
||||||
|
private OpenParametersModel parametersModel = new OpenParametersModel();
|
||||||
|
private AnchorRecommendItemModel anchorRecommendItemModel = new AnchorRecommendItemModel();
|
||||||
|
private int micIng = 0;//连麦状态
|
||||||
|
private LiveBean bean;
|
||||||
|
private Object object;
|
||||||
|
private int liveType;
|
||||||
|
private int liveTypeVal;
|
||||||
|
private MsgModel msgModel;//全服消息
|
||||||
|
private AiAutomaticSpeechModel aiAutomaticSpeechModel;//机器人消息
|
||||||
|
private boolean voicePress = false;
|
||||||
|
private boolean isActivity = false;//是否展示趣味活动和增值权益
|
||||||
|
private JSONArray pkScores;
|
||||||
|
private String uid;
|
||||||
|
private int time;
|
||||||
|
private CustomFullServiceNotifyEvent customFullServiceNotifyEvent;
|
||||||
|
private LivePKUserListBean livePKUserListBean;
|
||||||
|
private String votes;
|
||||||
|
private String length;
|
||||||
|
private int nums;
|
||||||
|
private String uname;
|
||||||
|
private WishModel wishListProgress;
|
||||||
|
private XydCompleteModel xydCompleteModel;
|
||||||
|
private LiveReceiveGiftBean liveReceiveGiftBean;
|
||||||
|
|
||||||
|
public LiveReceiveGiftBean getLiveReceiveGiftBean() {
|
||||||
|
return liveReceiveGiftBean;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveAnchorEvent setLiveReceiveGiftBean(LiveReceiveGiftBean liveReceiveGiftBean) {
|
||||||
|
this.liveReceiveGiftBean = liveReceiveGiftBean;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public XydCompleteModel getXydCompleteModel() {
|
||||||
|
return xydCompleteModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveAnchorEvent setXydCompleteModel(XydCompleteModel xydCompleteModel) {
|
||||||
|
this.xydCompleteModel = xydCompleteModel;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public WishModel getWishListProgress() {
|
||||||
|
return wishListProgress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveAnchorEvent setWishListProgress(WishModel wishListProgress) {
|
||||||
|
this.wishListProgress = wishListProgress;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVotes() {
|
||||||
|
return votes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveAnchorEvent setVotes(String votes) {
|
||||||
|
this.votes = votes;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLength() {
|
||||||
|
return length;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveAnchorEvent setLength(String length) {
|
||||||
|
this.length = length;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getNums() {
|
||||||
|
return nums;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveAnchorEvent setNums(int nums) {
|
||||||
|
this.nums = nums;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUname() {
|
||||||
|
return uname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveAnchorEvent setUname(String uname) {
|
||||||
|
this.uname = uname;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LivePKUserListBean getLivePKUserListBean() {
|
||||||
|
return livePKUserListBean;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveAnchorEvent setLivePKUserListBean(LivePKUserListBean livePKUserListBean) {
|
||||||
|
this.livePKUserListBean = livePKUserListBean;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomFullServiceNotifyEvent getCustomFullServiceNotifyEvent() {
|
||||||
|
return customFullServiceNotifyEvent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveAnchorEvent setCustomFullServiceNotifyEvent(CustomFullServiceNotifyEvent customFullServiceNotifyEvent) {
|
||||||
|
this.customFullServiceNotifyEvent = customFullServiceNotifyEvent;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JSONArray getPkScores() {
|
||||||
|
return pkScores;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveAnchorEvent setPkScores(JSONArray pkScores) {
|
||||||
|
this.pkScores = pkScores;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUid() {
|
||||||
|
return uid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveAnchorEvent setUid(String uid) {
|
||||||
|
this.uid = uid;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getTime() {
|
||||||
|
return time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveAnchorEvent setTime(int time) {
|
||||||
|
this.time = time;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isActivity() {
|
||||||
|
return isActivity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveAnchorEvent setActivity(boolean activity) {
|
||||||
|
isActivity = activity;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isVoicePress() {
|
||||||
|
return voicePress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveAnchorEvent setVoicePress(boolean voicePress) {
|
||||||
|
this.voicePress = voicePress;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AiAutomaticSpeechModel getAiAutomaticSpeechModel() {
|
||||||
|
return aiAutomaticSpeechModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveAnchorEvent setAiAutomaticSpeechModel(AiAutomaticSpeechModel aiAutomaticSpeechModel) {
|
||||||
|
this.aiAutomaticSpeechModel = aiAutomaticSpeechModel;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MsgModel getMsgModel() {
|
||||||
|
return msgModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveAnchorEvent setMsgModel(MsgModel msgModel) {
|
||||||
|
this.msgModel = msgModel;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getLiveType() {
|
||||||
|
return liveType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveAnchorEvent setLiveType(int liveType) {
|
||||||
|
this.liveType = liveType;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getLiveTypeVal() {
|
||||||
|
return liveTypeVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveAnchorEvent setLiveTypeVal(int liveTypeVal) {
|
||||||
|
this.liveTypeVal = liveTypeVal;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveBean getBean() {
|
||||||
|
return bean;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveAnchorEvent setBean(LiveBean bean) {
|
||||||
|
this.bean = bean;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMicIng() {
|
||||||
|
return micIng;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveAnchorEvent setMicIng(int micIng) {
|
||||||
|
this.micIng = micIng;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AnchorRecommendItemModel getAnchorRecommendItemModel() {
|
||||||
|
return anchorRecommendItemModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveAnchorEvent setAnchorRecommendItemModel(AnchorRecommendItemModel anchorRecommendItemModel) {
|
||||||
|
this.anchorRecommendItemModel = anchorRecommendItemModel;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OpenParametersModel getParametersModel() {
|
||||||
|
return parametersModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveAnchorEvent setParametersModel(OpenParametersModel parametersModel) {
|
||||||
|
this.parametersModel = parametersModel;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAvatar() {
|
||||||
|
return avatar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveAnchorEvent setAvatar(String avatar) {
|
||||||
|
this.avatar = avatar;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ActiveModel getModel() {
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveAnchorEvent setModel(ActiveModel model) {
|
||||||
|
this.model = model;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveAnchorType getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveAnchorEvent setType(LiveAnchorType type) {
|
||||||
|
this.type = type;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getObject() {
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveAnchorEvent setObject(Object object) {
|
||||||
|
this.object = object;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum LiveAnchorType {
|
||||||
|
VOTE_CREATE(1, "创建投票"),
|
||||||
|
VOTE_ANCHOR_END(2, "投票结束"),
|
||||||
|
VOTE_ANCHOR_UPDATE(3, "投票结束");
|
||||||
|
|
||||||
|
|
||||||
|
private int type;
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
LiveAnchorType(int type, String name) {
|
||||||
|
this.type = type;
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -9,6 +9,7 @@ import com.yunbao.common.bean.LiveBean;
|
|||||||
import com.yunbao.common.bean.MsgModel;
|
import com.yunbao.common.bean.MsgModel;
|
||||||
import com.yunbao.common.bean.WishModel;
|
import com.yunbao.common.bean.WishModel;
|
||||||
import com.yunbao.common.bean.XydCompleteModel;
|
import com.yunbao.common.bean.XydCompleteModel;
|
||||||
|
import com.yunbao.common.event.AllServerNotifyEvent;
|
||||||
import com.yunbao.common.event.CustomFullServiceNotifyEvent;
|
import com.yunbao.common.event.CustomFullServiceNotifyEvent;
|
||||||
import com.yunbao.live.bean.LivePKUserListBean;
|
import com.yunbao.live.bean.LivePKUserListBean;
|
||||||
import com.yunbao.live.bean.LiveReceiveGiftBean;
|
import com.yunbao.live.bean.LiveReceiveGiftBean;
|
||||||
@ -41,6 +42,16 @@ public class LiveAudienceEvent extends BaseModel {
|
|||||||
private WishModel wishListProgress;
|
private WishModel wishListProgress;
|
||||||
private XydCompleteModel xydCompleteModel;
|
private XydCompleteModel xydCompleteModel;
|
||||||
private LiveReceiveGiftBean liveReceiveGiftBean;
|
private LiveReceiveGiftBean liveReceiveGiftBean;
|
||||||
|
private AllServerNotifyEvent allServerNotifyEvent;
|
||||||
|
|
||||||
|
public AllServerNotifyEvent getAllServerNotifyEvent() {
|
||||||
|
return allServerNotifyEvent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveAudienceEvent setAllServerNotifyEvent(AllServerNotifyEvent allServerNotifyEvent) {
|
||||||
|
this.allServerNotifyEvent = allServerNotifyEvent;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public LiveReceiveGiftBean getLiveReceiveGiftBean() {
|
public LiveReceiveGiftBean getLiveReceiveGiftBean() {
|
||||||
return liveReceiveGiftBean;
|
return liveReceiveGiftBean;
|
||||||
@ -341,7 +352,11 @@ public class LiveAudienceEvent extends BaseModel {
|
|||||||
WISH_LIST_PROGRESS(61, "心愿单进度"),
|
WISH_LIST_PROGRESS(61, "心愿单进度"),
|
||||||
CLOSE_LIVE_ROOM(62, "关闭直播间"),
|
CLOSE_LIVE_ROOM(62, "关闭直播间"),
|
||||||
FONT_SIZE(63, "侧边字号设置"),
|
FONT_SIZE(63, "侧边字号设置"),
|
||||||
LIVE_FONT_SIZE(64, "字号设置");
|
LIVE_FONT_SIZE(64, "字号设置"),
|
||||||
|
VOTE_CREATE(65, "创建投票"),
|
||||||
|
VOTE_UPDATE(66, "更新投票"),
|
||||||
|
VOTE_END(67, "投票结束"),
|
||||||
|
BLIND_BOX(68, "盲盒全服通知");
|
||||||
|
|
||||||
private int type;
|
private int type;
|
||||||
private String name;
|
private String name;
|
||||||
|
@ -6,6 +6,7 @@ import android.animation.ObjectAnimator;
|
|||||||
import android.animation.ValueAnimator;
|
import android.animation.ValueAnimator;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
|
import android.os.Bundle;
|
||||||
import android.os.CountDownTimer;
|
import android.os.CountDownTimer;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
@ -23,6 +24,7 @@ import android.view.animation.ScaleAnimation;
|
|||||||
import android.view.animation.TranslateAnimation;
|
import android.view.animation.TranslateAnimation;
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
import android.widget.MediaController;
|
import android.widget.MediaController;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
@ -37,6 +39,7 @@ import com.yunbao.common.Constants;
|
|||||||
import com.yunbao.common.HtmlConfig;
|
import com.yunbao.common.HtmlConfig;
|
||||||
import com.yunbao.common.activity.WebViewActivity;
|
import com.yunbao.common.activity.WebViewActivity;
|
||||||
import com.yunbao.common.bean.LiveBean;
|
import com.yunbao.common.bean.LiveBean;
|
||||||
|
import com.yunbao.common.event.AllServerNotifyEvent;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.http.CommonHttpConsts;
|
import com.yunbao.common.http.CommonHttpConsts;
|
||||||
import com.yunbao.common.http.CommonHttpUtil;
|
import com.yunbao.common.http.CommonHttpUtil;
|
||||||
@ -48,14 +51,14 @@ import com.yunbao.common.utils.GiftCacheUtil;
|
|||||||
import com.yunbao.common.utils.HtmlTagHandler;
|
import com.yunbao.common.utils.HtmlTagHandler;
|
||||||
import com.yunbao.common.utils.L;
|
import com.yunbao.common.utils.L;
|
||||||
import com.yunbao.common.utils.MicStatusManager;
|
import com.yunbao.common.utils.MicStatusManager;
|
||||||
import com.yunbao.common.utils.RouteUtil;
|
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
|
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||||
import com.yunbao.live.bean.LiveGiftPrizePoolWinBean;
|
import com.yunbao.live.bean.LiveGiftPrizePoolWinBean;
|
||||||
import com.yunbao.live.bean.LiveLuckGiftWinBean;
|
import com.yunbao.live.bean.LiveLuckGiftWinBean;
|
||||||
import com.yunbao.live.bean.LiveReceiveGiftBean;
|
import com.yunbao.live.bean.LiveReceiveGiftBean;
|
||||||
import com.yunbao.live.custom.FrameImageView;
|
import com.yunbao.live.custom.FrameImageView;
|
||||||
|
import com.yunbao.live.dialog.LiveGiftDialogFragment;
|
||||||
import com.yunbao.live.event.LiveRoomChangeEvent;
|
import com.yunbao.live.event.LiveRoomChangeEvent;
|
||||||
import com.yunbao.live.http.LiveHttpUtil;
|
import com.yunbao.live.http.LiveHttpUtil;
|
||||||
import com.yunbao.live.utils.AllMsgTextRender;
|
import com.yunbao.live.utils.AllMsgTextRender;
|
||||||
@ -86,7 +89,9 @@ import pl.droidsonroids.gif.GifImageView;
|
|||||||
|
|
||||||
public class LiveGiftAnimPresenter {
|
public class LiveGiftAnimPresenter {
|
||||||
|
|
||||||
private final View mIvLook;
|
private final TextView mIvLook;
|
||||||
|
private View superNotice;
|
||||||
|
private LinearLayout bgAllServer;
|
||||||
private final View mGifGiftTipGroupBuyGuard;
|
private final View mGifGiftTipGroupBuyGuard;
|
||||||
private final View mIvLookBuyGuard;
|
private final View mIvLookBuyGuard;
|
||||||
private final View mGifGiftTipGroupBuyZuoji;
|
private final View mGifGiftTipGroupBuyZuoji;
|
||||||
@ -162,6 +167,8 @@ public class LiveGiftAnimPresenter {
|
|||||||
private boolean mShowBuyLiangName;
|
private boolean mShowBuyLiangName;
|
||||||
private boolean mShowBuyVip;
|
private boolean mShowBuyVip;
|
||||||
|
|
||||||
|
private boolean mShowBlindBox;
|
||||||
|
|
||||||
|
|
||||||
private CommonCallback<File> mDownloadGifCallback;
|
private CommonCallback<File> mDownloadGifCallback;
|
||||||
private CommonCallback<File> mDownloadIconCallback;
|
private CommonCallback<File> mDownloadIconCallback;
|
||||||
@ -216,6 +223,8 @@ public class LiveGiftAnimPresenter {
|
|||||||
mTitleContainer = v.findViewById(R.id.title_container);
|
mTitleContainer = v.findViewById(R.id.title_container);
|
||||||
mSVGAImageViewFront = v.findViewById(R.id.svga_iv_all_server);
|
mSVGAImageViewFront = v.findViewById(R.id.svga_iv_all_server);
|
||||||
mIvLook = v.findViewById(R.id.iv_look);
|
mIvLook = v.findViewById(R.id.iv_look);
|
||||||
|
superNotice = v.findViewById(R.id.super_notice);
|
||||||
|
bgAllServer = v.findViewById(R.id.bg_all_server);
|
||||||
mIvLookBuyGuard = v.findViewById(R.id.iv_look_buy_guard);
|
mIvLookBuyGuard = v.findViewById(R.id.iv_look_buy_guard);
|
||||||
|
|
||||||
svgaImageViewCallback();
|
svgaImageViewCallback();
|
||||||
@ -325,7 +334,25 @@ public class LiveGiftAnimPresenter {
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
//切换直播间
|
//切换直播间
|
||||||
changeLiveRoom();
|
|
||||||
|
if (TextUtils.equals(mIvLook.getText().toString(),mContext.getString(R.string.participate_in))) {
|
||||||
|
new Handler().postDelayed(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
LiveGiftDialogFragment fragment = new LiveGiftDialogFragment();
|
||||||
|
Bundle bundle = new Bundle();
|
||||||
|
bundle.putString(Constants.LIVE_UID, mLiveUid);
|
||||||
|
bundle.putString(Constants.LIVE_STREAM, mStream);
|
||||||
|
bundle.putString(Constants.LIVE_WISH_GIFTID, blindBox.getEvent().getBlindBoxId() + "");
|
||||||
|
bundle.putBoolean("isContactGift", true);
|
||||||
|
fragment.setArguments(bundle);
|
||||||
|
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGiftDialogFragment");
|
||||||
|
}
|
||||||
|
}, 1000);
|
||||||
|
} else {
|
||||||
|
changeLiveRoom();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
mGifGiftTipGroupAllServer.setOnClickListener(new View.OnClickListener() {
|
mGifGiftTipGroupAllServer.setOnClickListener(new View.OnClickListener() {
|
||||||
@ -336,6 +363,14 @@ public class LiveGiftAnimPresenter {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String mLiveUid;
|
||||||
|
public String mStream;
|
||||||
|
|
||||||
|
public void setLiveUidStream(String liveUid, String stream) {
|
||||||
|
mLiveUid = liveUid;
|
||||||
|
mStream = stream;
|
||||||
|
}
|
||||||
|
|
||||||
private void mIvLookBuyZuojiClick() {
|
private void mIvLookBuyZuojiClick() {
|
||||||
mGifGiftTipGroupBuyZuoji.setOnClickListener(new View.OnClickListener() {
|
mGifGiftTipGroupBuyZuoji.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -410,7 +445,7 @@ public class LiveGiftAnimPresenter {
|
|||||||
private void setGitTipAnimatorAllServer() {
|
private void setGitTipAnimatorAllServer() {
|
||||||
mDp500 = DpUtil.dp2px(500);
|
mDp500 = DpUtil.dp2px(500);
|
||||||
mGifGiftTipShowAnimatorAllServer = ObjectAnimator.ofFloat(mGifGiftTipGroupAllServer, "translationX", mDp500, 0);
|
mGifGiftTipShowAnimatorAllServer = ObjectAnimator.ofFloat(mGifGiftTipGroupAllServer, "translationX", mDp500, 0);
|
||||||
mGifGiftTipShowAnimatorAllServer.setDuration(2000);
|
mGifGiftTipShowAnimatorAllServer.setDuration(2500);
|
||||||
mGifGiftTipShowAnimatorAllServer.setInterpolator(new LinearInterpolator());
|
mGifGiftTipShowAnimatorAllServer.setInterpolator(new LinearInterpolator());
|
||||||
mGifGiftTipShowAnimatorAllServer.addListener(new AnimatorListenerAdapter() {
|
mGifGiftTipShowAnimatorAllServer.addListener(new AnimatorListenerAdapter() {
|
||||||
@Override
|
@Override
|
||||||
@ -422,7 +457,7 @@ public class LiveGiftAnimPresenter {
|
|||||||
});
|
});
|
||||||
mDp10 = DpUtil.dp2px(10);
|
mDp10 = DpUtil.dp2px(10);
|
||||||
mGifGiftTipHideAnimatorAllServer = ObjectAnimator.ofFloat(mGifGiftTipGroupAllServer, "translationX", 0);
|
mGifGiftTipHideAnimatorAllServer = ObjectAnimator.ofFloat(mGifGiftTipGroupAllServer, "translationX", 0);
|
||||||
mGifGiftTipHideAnimatorAllServer.setDuration(3000);
|
mGifGiftTipHideAnimatorAllServer.setDuration(3500);
|
||||||
mGifGiftTipHideAnimatorAllServer.setInterpolator(new AccelerateDecelerateInterpolator());
|
mGifGiftTipHideAnimatorAllServer.setInterpolator(new AccelerateDecelerateInterpolator());
|
||||||
mGifGiftTipHideAnimatorAllServer.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
|
mGifGiftTipHideAnimatorAllServer.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -673,10 +708,16 @@ public class LiveGiftAnimPresenter {
|
|||||||
mGifGiftTipHideAnimatorAllServer.start();
|
mGifGiftTipHideAnimatorAllServer.start();
|
||||||
} else if (msg.what == WHAT_ALL_SERVER_2) {
|
} else if (msg.what == WHAT_ALL_SERVER_2) {
|
||||||
mShowAllServer = false;
|
mShowAllServer = false;
|
||||||
|
mShowBlindBox = false;
|
||||||
heightOffsetArr[index4OtherGift] = 0;
|
heightOffsetArr[index4OtherGift] = 0;
|
||||||
LiveReceiveGiftBean bean = mGifAll.poll();
|
LiveReceiveGiftBean bean = mGifAll.poll();
|
||||||
if (bean != null) {
|
if (bean != null) {
|
||||||
chooseInto(bean);
|
if (bean.isBlindBox()) {
|
||||||
|
showSendGiftAnimAllServer2(bean);
|
||||||
|
} else {
|
||||||
|
chooseInto(bean);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} else if (msg.what == WHAT_BUY_GUARD_1) {
|
} else if (msg.what == WHAT_BUY_GUARD_1) {
|
||||||
mGifGiftTipHideAnimatorBuyGuard.setFloatValues(0, -mDp10 - mGifGiftTipGroupBuyGuard.getWidth());
|
mGifGiftTipHideAnimatorBuyGuard.setFloatValues(0, -mDp10 - mGifGiftTipGroupBuyGuard.getWidth());
|
||||||
@ -832,8 +873,6 @@ public class LiveGiftAnimPresenter {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
mShowAllServer = true;
|
mShowAllServer = true;
|
||||||
|
|
||||||
|
|
||||||
index4OtherGift = getFirstIndexOfValue(heightOffsetArr, 0);
|
index4OtherGift = getFirstIndexOfValue(heightOffsetArr, 0);
|
||||||
if (index4OtherGift >= 0) {
|
if (index4OtherGift >= 0) {
|
||||||
heightOffsetArr[index4OtherGift] = 1;
|
heightOffsetArr[index4OtherGift] = 1;
|
||||||
@ -843,16 +882,57 @@ public class LiveGiftAnimPresenter {
|
|||||||
params.topMargin = DpUtil.dp2px(y);
|
params.topMargin = DpUtil.dp2px(y);
|
||||||
mGifGiftTipGroupAllServer.setLayoutParams(params);
|
mGifGiftTipGroupAllServer.setLayoutParams(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
mAncherName = mTempGifGiftBean.getAncherName();
|
mAncherName = mTempGifGiftBean.getAncherName();
|
||||||
mGifGiftTipAllServer.setSelected(false);
|
mGifGiftTipAllServer.setSelected(false);
|
||||||
|
|
||||||
mIvLook.setVisibility(View.VISIBLE);
|
|
||||||
mGifGiftTipGroupAllServer.setAlpha(1f);
|
mGifGiftTipGroupAllServer.setAlpha(1f);
|
||||||
mGifGiftTipGroupAllServer.setVisibility(View.VISIBLE);
|
mGifGiftTipGroupAllServer.setVisibility(View.VISIBLE);
|
||||||
|
textRender.render(mContext, mGifGiftTipAllServer, mTempGifGiftBean.getGiftIcon(), mTempGifGiftBean.getUserNiceName(), mAncherName, mTempGifGiftBean.getGiftName(), 1, mWindowManager, "");
|
||||||
|
mIvLook.setVisibility(View.VISIBLE);
|
||||||
mGifGiftTipShowAnimatorAllServer.start();
|
mGifGiftTipShowAnimatorAllServer.start();
|
||||||
|
|
||||||
textRender.render(mContext, mGifGiftTipAllServer, mTempGifGiftBean.getGiftIcon(), mTempGifGiftBean.getUserNiceName(), mAncherName, mTempGifGiftBean.getGiftName(), 1, mWindowManager, "");
|
}
|
||||||
|
} //送礼物 全服通知
|
||||||
|
|
||||||
|
private LiveReceiveGiftBean blindBox = null;
|
||||||
|
|
||||||
|
public void showSendGiftAnimAllServer2(LiveReceiveGiftBean bean) {
|
||||||
|
blindBox = bean;
|
||||||
|
if (mShowBlindBox) {
|
||||||
|
if (mGifAll != null) {
|
||||||
|
mGifAll.offer(bean);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
mShowBlindBox = true;
|
||||||
|
mAncherName = bean.getAncherName();
|
||||||
|
mGifGiftTipAllServer.setSelected(false);
|
||||||
|
mGifGiftTipGroupAllServer.setAlpha(1f);
|
||||||
|
mGifGiftTipGroupAllServer.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
|
AllServerNotifyEvent serverNotifyEvent = bean.getEvent();
|
||||||
|
switch (Integer.parseInt(serverNotifyEvent.getBoxType())) {
|
||||||
|
case 1:
|
||||||
|
bgAllServer.setBackgroundResource(R.mipmap.bg_kirin_notify);
|
||||||
|
mIvLook.setBackgroundResource(R.drawable.bg_all_server_336cf7);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
bgAllServer.setBackgroundResource(R.mipmap.bg_phoenix_notify);
|
||||||
|
mIvLook.setBackgroundResource(R.drawable.bg_all_server_fd5a9d);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
bgAllServer.setBackgroundResource(R.mipmap.bg_dragon_notify);
|
||||||
|
mIvLook.setBackgroundResource(R.drawable.bg_all_server_fcb50e);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
mIvLook.setText(R.string.participate_in);
|
||||||
|
superNotice.setBackgroundResource(R.mipmap.icon_blind_box_headlines);
|
||||||
|
mIvLook.setVisibility(View.VISIBLE);
|
||||||
|
textRender.blindBoxText(mContext, mGifGiftTipAllServer, serverNotifyEvent);
|
||||||
|
mGifGiftTipShowAnimatorAllServer.start();
|
||||||
|
mGifGiftTipAllServer.postDelayed(() -> {
|
||||||
|
if (mGifGiftTipAllServer != null) {
|
||||||
|
mGifGiftTipAllServer.setSelected(true);
|
||||||
|
}
|
||||||
|
}, delayMarqueen + 600);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -934,7 +1014,7 @@ public class LiveGiftAnimPresenter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String text = mTempGifGiftBean.getUserNiceName() + " <myfont size='24px'>"
|
String text = mTempGifGiftBean.getUserNiceName() + " <myfont size='24px'>"
|
||||||
+mContext.getString(R.string.live_send_buy_zuoji_1)
|
+ mContext.getString(R.string.live_send_buy_zuoji_1)
|
||||||
+ "</myfont> " + (mTempGifGiftBean.getCarName());
|
+ "</myfont> " + (mTempGifGiftBean.getCarName());
|
||||||
Spanned spanned = Html.fromHtml(text, null, new HtmlTagHandler("myfont"));
|
Spanned spanned = Html.fromHtml(text, null, new HtmlTagHandler("myfont"));
|
||||||
mGifGiftTipBuyZuoji.setText(spanned);
|
mGifGiftTipBuyZuoji.setText(spanned);
|
||||||
@ -975,7 +1055,7 @@ public class LiveGiftAnimPresenter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String text = mTempGifGiftBean.getUserNiceName() + " <myfont size='24px'>"
|
String text = mTempGifGiftBean.getUserNiceName() + " <myfont size='24px'>"
|
||||||
+mContext.getString(R.string.live_send_buy_liang_name_1)
|
+ mContext.getString(R.string.live_send_buy_liang_name_1)
|
||||||
+ "</myfont> " + mTempGifGiftBean.getLiangName();
|
+ "</myfont> " + mTempGifGiftBean.getLiangName();
|
||||||
Spanned spanned = Html.fromHtml(text, null, new HtmlTagHandler("myfont"));
|
Spanned spanned = Html.fromHtml(text, null, new HtmlTagHandler("myfont"));
|
||||||
mGifGiftTipBuyLiangName.setText(spanned);
|
mGifGiftTipBuyLiangName.setText(spanned);
|
||||||
@ -1124,7 +1204,7 @@ public class LiveGiftAnimPresenter {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
GiftCacheUtil.getFile(mContext,Constants.GIF_GIFT_PREFIX + bean.getGiftId(), url, "1", mDownloadGifCallback);
|
GiftCacheUtil.getFile(mContext, Constants.GIF_GIFT_PREFIX + bean.getGiftId(), url, "1", mDownloadGifCallback);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,6 @@ import com.yunbao.common.utils.DpUtil;
|
|||||||
import com.yunbao.common.utils.ScreenDimenUtil;
|
import com.yunbao.common.utils.ScreenDimenUtil;
|
||||||
import com.yunbao.common.utils.StringUtil;
|
import com.yunbao.common.utils.StringUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.live.activity.LiveAudienceActivity;
|
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||||
import com.yunbao.live.activity.LiveRyAnchorActivity;
|
import com.yunbao.live.activity.LiveRyAnchorActivity;
|
||||||
@ -207,13 +206,14 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
|
|||||||
Log.d("RYM_DG", "Other onLeaveRoom: room = " + room.getRoomId());
|
Log.d("RYM_DG", "Other onLeaveRoom: room = " + room.getRoomId());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public LiveRyLinkMicPkPresenter(Context context, ILiveLinkMicViewHolder linkMicViewHolder, boolean isAnchor, View root) {
|
public LiveRyLinkMicPkPresenter(Context context, ILiveLinkMicViewHolder linkMicViewHolder, boolean isAnchor, View root) {
|
||||||
mContext = context;
|
mContext = context;
|
||||||
mIsAnchor = isAnchor;
|
mIsAnchor = isAnchor;
|
||||||
mRoot = root;
|
mRoot = root;
|
||||||
mPkContainer = linkMicViewHolder.getPkContainer();
|
mPkContainer = linkMicViewHolder.getPkContainer();
|
||||||
mPkTimeString1 = "";
|
mPkTimeString1 = "";
|
||||||
mPkTimeString2 =mContext.getString(R.string.live_pk_time_2);
|
mPkTimeString2 = mContext.getString(R.string.live_pk_time_2);
|
||||||
//从本地取数据
|
//从本地取数据
|
||||||
String pkTime = CommonAppConfig.getInstance().getAnchorPkTime();
|
String pkTime = CommonAppConfig.getInstance().getAnchorPkTime();
|
||||||
if (!pkTime.isEmpty()) {
|
if (!pkTime.isEmpty()) {
|
||||||
@ -254,7 +254,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
|
|||||||
mPkContainer = linkMicViewHolder.getPkContainer();
|
mPkContainer = linkMicViewHolder.getPkContainer();
|
||||||
livePushRyViewHolder = linkMicViewHolder;
|
livePushRyViewHolder = linkMicViewHolder;
|
||||||
mPkTimeString1 = "";
|
mPkTimeString1 = "";
|
||||||
mPkTimeString2 =mContext.getString(R.string.live_pk_time_2);
|
mPkTimeString2 = mContext.getString(R.string.live_pk_time_2);
|
||||||
//从本地取数据
|
//从本地取数据
|
||||||
String pkTime = CommonAppConfig.getInstance().getAnchorPkTime();
|
String pkTime = CommonAppConfig.getInstance().getAnchorPkTime();
|
||||||
if (!pkTime.isEmpty()) {
|
if (!pkTime.isEmpty()) {
|
||||||
@ -1242,7 +1242,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
|
|||||||
"<font color='#999999' size='12'>有人向您发起PK请求。</font><br/>" +
|
"<font color='#999999' size='12'>有人向您发起PK请求。</font><br/>" +
|
||||||
"<font color='#FB4F4F' size='12'>若拒绝PK,将会10分钟内不会再收到任何随机PK请求。</font>"
|
"<font color='#FB4F4F' size='12'>若拒绝PK,将会10分钟内不会再收到任何随机PK请求。</font>"
|
||||||
))
|
))
|
||||||
.setConfrimString("接受")
|
.setConfirmString("接受")
|
||||||
.setCancelString("拒絕")
|
.setCancelString("拒絕")
|
||||||
.setView(R.layout.dialog_live_random_pk)
|
.setView(R.layout.dialog_live_random_pk)
|
||||||
.setSimpleCallbackView(new DialogUitl.SimpleCallbackView() {
|
.setSimpleCallbackView(new DialogUitl.SimpleCallbackView() {
|
||||||
@ -2185,6 +2185,18 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
|
|||||||
nextPkTimeCountDown(2);
|
nextPkTimeCountDown(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改最终PK数据
|
||||||
|
* @param leftGift 左边数据
|
||||||
|
* @param rightGift 右边数据
|
||||||
|
* @param bean 排位数据
|
||||||
|
*/
|
||||||
|
public void onPkProgressEnd(long leftGift, long rightGift,LivePKUserListBean bean) {
|
||||||
|
if (mLiveLinkMicPkViewHolder != null) {
|
||||||
|
mLiveLinkMicPkViewHolder.onProgressChanged(leftGift, rightGift, bean, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 进房间的时候懲罰开始
|
* 进房间的时候懲罰开始
|
||||||
@ -2313,7 +2325,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
|
|||||||
|
|
||||||
// //恢复播放画面
|
// //恢复播放画面
|
||||||
if (i == 1) {
|
if (i == 1) {
|
||||||
if(btn_close!=null){
|
if (btn_close != null) {
|
||||||
btn_close.setVisibility(View.GONE);
|
btn_close.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
if (rtcRoom != null) {
|
if (rtcRoom != null) {
|
||||||
|
@ -334,7 +334,7 @@ public class SocketClient {
|
|||||||
receiveGiftBean.setUid(uid);
|
receiveGiftBean.setUid(uid);
|
||||||
receiveGiftBean.setGuardType(map.getString("guard_type"));
|
receiveGiftBean.setGuardType(map.getString("guard_type"));
|
||||||
receiveGiftBean.setSendtype(map.getIntValue("action"));
|
receiveGiftBean.setSendtype(map.getIntValue("action"));
|
||||||
mListener.onSendGift(receiveGiftBean);
|
mListener.onSendGift(receiveGiftBean,null);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LiveReceiveGiftBean receiveGiftBean = new LiveReceiveGiftBean();
|
LiveReceiveGiftBean receiveGiftBean = new LiveReceiveGiftBean();
|
||||||
@ -346,7 +346,7 @@ public class SocketClient {
|
|||||||
receiveGiftBean.setUid(map.getString("uid"));
|
receiveGiftBean.setUid(map.getString("uid"));
|
||||||
receiveGiftBean.setGuardType(map.getString("guard_type"));
|
receiveGiftBean.setGuardType(map.getString("guard_type"));
|
||||||
receiveGiftBean.setSendtype(map.getIntValue("action"));
|
receiveGiftBean.setSendtype(map.getIntValue("action"));
|
||||||
mListener.onSendGift(receiveGiftBean);
|
mListener.onSendGift(receiveGiftBean,null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -557,13 +557,13 @@ public class SocketClient {
|
|||||||
LivePKUserListBean livePKUserListBean = JSON.parseObject(receiveGiftBean.getPkTopUsers(), LivePKUserListBean.class);
|
LivePKUserListBean livePKUserListBean = JSON.parseObject(receiveGiftBean.getPkTopUsers(), LivePKUserListBean.class);
|
||||||
if (mLiveUid.equals(map.getString("roomnum"))) {
|
if (mLiveUid.equals(map.getString("roomnum"))) {
|
||||||
if (!mLiveUid.equals(map.getString("roomnum"))) {
|
if (!mLiveUid.equals(map.getString("roomnum"))) {
|
||||||
mListener.onSendGift(receiveGiftBean);
|
mListener.onSendGift(receiveGiftBean,null);
|
||||||
}
|
}
|
||||||
//同一个直播间时才刷新pk
|
//同一个直播间时才刷新pk
|
||||||
mListener.onSendGiftPk(map.getLongValue("pktotal1"), map.getLongValue("pktotal2"), livePKUserListBean);
|
mListener.onSendGiftPk(map.getLongValue("pktotal1"), map.getLongValue("pktotal2"), livePKUserListBean);
|
||||||
} else {
|
} else {
|
||||||
if (!mLiveUid.equals(map.getString("roomnum"))) {
|
if (!mLiveUid.equals(map.getString("roomnum"))) {
|
||||||
mListener.onSendGift(receiveGiftBean);
|
mListener.onSendGift(receiveGiftBean,null);
|
||||||
}
|
}
|
||||||
//同一个直播间时才刷新pk
|
//同一个直播间时才刷新pk
|
||||||
if (mLiveUid.equals(map.getString("pkuid1")) ||
|
if (mLiveUid.equals(map.getString("pkuid1")) ||
|
||||||
@ -574,7 +574,7 @@ public class SocketClient {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!mLiveUid.equals(map.getString("roomnum"))) {
|
if (!mLiveUid.equals(map.getString("roomnum"))) {
|
||||||
mListener.onSendGift(receiveGiftBean);
|
mListener.onSendGift(receiveGiftBean,null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -628,7 +628,7 @@ public class SocketClient {
|
|||||||
try {
|
try {
|
||||||
if (!TextUtils.isEmpty(mLiveUid)) {
|
if (!TextUtils.isEmpty(mLiveUid)) {
|
||||||
if (mLiveUid.equals(map.getString("roomnum"))) {
|
if (mLiveUid.equals(map.getString("roomnum"))) {
|
||||||
mListener.onSendGift(receiveGiftBean);
|
mListener.onSendGift(receiveGiftBean,null);
|
||||||
mListener.onSendGiftPk(map.getLongValue("pktotal1"), map.getLongValue("pktotal2"), livePKUserListBean);
|
mListener.onSendGiftPk(map.getLongValue("pktotal1"), map.getLongValue("pktotal2"), livePKUserListBean);
|
||||||
} else {
|
} else {
|
||||||
mListener.onSendGiftPk(map.getLongValue("pktotal2"), map.getLongValue("pktotal1"), livePKUserListBean);
|
mListener.onSendGiftPk(map.getLongValue("pktotal2"), map.getLongValue("pktotal1"), livePKUserListBean);
|
||||||
@ -640,7 +640,7 @@ public class SocketClient {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
Log.i("tvvs", receiveGiftBean.getLiveChatBean().getContent());
|
Log.i("tvvs", receiveGiftBean.getLiveChatBean().getContent());
|
||||||
mListener.onSendGift(receiveGiftBean);
|
mListener.onSendGift(receiveGiftBean,null);
|
||||||
}
|
}
|
||||||
if (map.getIntValue("drpk_status") == 1) {
|
if (map.getIntValue("drpk_status") == 1) {
|
||||||
LiveRoomViewHolder.UpPkBar(map.getJSONArray("userlist"), mLiveUid, 0);
|
LiveRoomViewHolder.UpPkBar(map.getJSONArray("userlist"), mLiveUid, 0);
|
||||||
|
@ -2,6 +2,7 @@ package com.yunbao.live.socket;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.yunbao.common.bean.UserBean;
|
import com.yunbao.common.bean.UserBean;
|
||||||
|
import com.yunbao.common.event.SendBlindGiftEvent;
|
||||||
import com.yunbao.live.bean.LiveBuyGuardMsgBean;
|
import com.yunbao.live.bean.LiveBuyGuardMsgBean;
|
||||||
import com.yunbao.live.bean.LiveChatBean;
|
import com.yunbao.live.bean.LiveChatBean;
|
||||||
import com.yunbao.live.bean.LiveDanMuBean;
|
import com.yunbao.live.bean.LiveDanMuBean;
|
||||||
@ -57,7 +58,7 @@ public interface SocketMessageListener {
|
|||||||
*
|
*
|
||||||
* @param bean 礼物信息
|
* @param bean 礼物信息
|
||||||
*/
|
*/
|
||||||
void onSendGift(LiveReceiveGiftBean bean);
|
void onSendGift(LiveReceiveGiftBean bean, SendBlindGiftEvent event);
|
||||||
|
|
||||||
void onBuyZuoji(LiveReceiveGiftBean bean);
|
void onBuyZuoji(LiveReceiveGiftBean bean);
|
||||||
|
|
||||||
@ -290,6 +291,16 @@ public interface SocketMessageListener {
|
|||||||
*/
|
*/
|
||||||
void onPrizePoolUp(String level);
|
void onPrizePoolUp(String level);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最终PK数据
|
||||||
|
* @param leftUid 左边uid
|
||||||
|
* @param rightUid 右边uid
|
||||||
|
* @param left 左边分数
|
||||||
|
* @param right 右边分数
|
||||||
|
* @param bean 排位顺序
|
||||||
|
*/
|
||||||
|
void onEndPk(long leftUid,long rightUid,long left,long right,LivePKUserListBean bean);
|
||||||
|
|
||||||
/***********************以下是游戏*********************************/
|
/***********************以下是游戏*********************************/
|
||||||
/**
|
/**
|
||||||
* 游戏 智勇三张 游戏的回调
|
* 游戏 智勇三张 游戏的回调
|
||||||
|
@ -7,8 +7,10 @@ import static com.yunbao.live.views.LivePushRyViewHolder.rtcRoom;
|
|||||||
import static com.yunbao.live.views.LiveRoomViewHolder.getIsHot;
|
import static com.yunbao.live.views.LiveRoomViewHolder.getIsHot;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
|
import android.app.Dialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
|
import android.os.Looper;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
@ -32,12 +34,15 @@ import com.yunbao.common.bean.SocketModel;
|
|||||||
import com.yunbao.common.bean.UserBean;
|
import com.yunbao.common.bean.UserBean;
|
||||||
import com.yunbao.common.bean.WishModel;
|
import com.yunbao.common.bean.WishModel;
|
||||||
import com.yunbao.common.bean.XydCompleteModel;
|
import com.yunbao.common.bean.XydCompleteModel;
|
||||||
|
import com.yunbao.common.event.AllServerNotifyEvent;
|
||||||
import com.yunbao.common.event.CustomFullServiceNotifyEvent;
|
import com.yunbao.common.event.CustomFullServiceNotifyEvent;
|
||||||
|
import com.yunbao.common.event.SendBlindGiftEvent;
|
||||||
import com.yunbao.common.http.HttpCallback;
|
import com.yunbao.common.http.HttpCallback;
|
||||||
import com.yunbao.common.http.HttpClient;
|
import com.yunbao.common.http.HttpClient;
|
||||||
import com.yunbao.common.manager.IMRTCManager;
|
import com.yunbao.common.manager.IMRTCManager;
|
||||||
import com.yunbao.common.manager.RandomPkManager;
|
import com.yunbao.common.manager.RandomPkManager;
|
||||||
import com.yunbao.common.utils.Bus;
|
import com.yunbao.common.utils.Bus;
|
||||||
|
import com.yunbao.common.utils.DialogUitl;
|
||||||
import com.yunbao.common.utils.L;
|
import com.yunbao.common.utils.L;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
@ -52,6 +57,7 @@ import com.yunbao.live.bean.LiveGiftPrizePoolWinBean;
|
|||||||
import com.yunbao.live.bean.LiveLuckGiftWinBean;
|
import com.yunbao.live.bean.LiveLuckGiftWinBean;
|
||||||
import com.yunbao.live.bean.LivePKUserListBean;
|
import com.yunbao.live.bean.LivePKUserListBean;
|
||||||
import com.yunbao.live.bean.LiveReceiveGiftBean;
|
import com.yunbao.live.bean.LiveReceiveGiftBean;
|
||||||
|
import com.yunbao.live.event.LiveAnchorEvent;
|
||||||
import com.yunbao.live.event.LiveAudienceEvent;
|
import com.yunbao.live.event.LiveAudienceEvent;
|
||||||
import com.yunbao.live.views.LiveEndViewHolder;
|
import com.yunbao.live.views.LiveEndViewHolder;
|
||||||
import com.yunbao.live.views.LivePlayKsyViewHolder;
|
import com.yunbao.live.views.LivePlayKsyViewHolder;
|
||||||
@ -63,6 +69,8 @@ import org.greenrobot.eventbus.EventBus;
|
|||||||
|
|
||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Timer;
|
||||||
|
import java.util.TimerTask;
|
||||||
|
|
||||||
import cn.rongcloud.rtc.api.callback.IRCRTCResultCallback;
|
import cn.rongcloud.rtc.api.callback.IRCRTCResultCallback;
|
||||||
import cn.rongcloud.rtc.base.RTCErrorCode;
|
import cn.rongcloud.rtc.base.RTCErrorCode;
|
||||||
@ -72,10 +80,10 @@ import io.rong.imlib.chatroom.base.RongChatRoomClient;
|
|||||||
|
|
||||||
public class SocketRyClient {
|
public class SocketRyClient {
|
||||||
|
|
||||||
private final String TAG = "socket";
|
private final String TAG = "socket";
|
||||||
private String mLiveUid;
|
private String mLiveUid;
|
||||||
private String mStream;
|
private String mStream;
|
||||||
public static SocketRyClient.SocketHandler mSocketHandler;
|
public static SocketRyClient.SocketHandler mSocketHandler;
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
|
|
||||||
public SocketRyClient(String mLiveUid, SocketMessageListener listener, Activity mContext) {
|
public SocketRyClient(String mLiveUid, SocketMessageListener listener, Activity mContext) {
|
||||||
@ -111,11 +119,11 @@ public class SocketRyClient {
|
|||||||
mSocketHandler = null;
|
mSocketHandler = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SocketHandler extends Handler {
|
public class SocketHandler extends Handler {
|
||||||
|
|
||||||
private SocketMessageListener mListener;
|
private SocketMessageListener mListener;
|
||||||
private LivePushRyViewHolder livePushRyViewHolder;
|
private LivePushRyViewHolder livePushRyViewHolder;
|
||||||
private String mLiveUid;
|
private String mLiveUid;
|
||||||
|
|
||||||
public SocketHandler(SocketMessageListener listener) {
|
public SocketHandler(SocketMessageListener listener) {
|
||||||
mListener = new WeakReference<>(listener).get();
|
mListener = new WeakReference<>(listener).get();
|
||||||
@ -361,6 +369,24 @@ public class SocketRyClient {
|
|||||||
buyZuoJiByNotify(map);
|
buyZuoJiByNotify(map);
|
||||||
} else if (action2 == 66) {//购买贵族
|
} else if (action2 == 66) {//购买贵族
|
||||||
buyVipByNotify(map);
|
buyVipByNotify(map);
|
||||||
|
} else if (action2 == 88) {
|
||||||
|
|
||||||
|
AllServerNotifyEvent allServerNotifyEvent
|
||||||
|
= new AllServerNotifyEvent()
|
||||||
|
.setBlindBoxId(map.getString("blind_box_id"))
|
||||||
|
.setBoxType(map.getString("box_type"))
|
||||||
|
.setBoxTypeName(map.getString("box_type_name"))
|
||||||
|
.setDressName(map.getString("dress_name"))
|
||||||
|
.setGiftNotification(map.getString("gift_notification"))
|
||||||
|
.setGiftName(map.getString("giftname"))
|
||||||
|
.setUserNiceName(map.getString("uname"))
|
||||||
|
.setGiftIcon(map.getString("gifticon"))
|
||||||
|
.setAnchorName(map.getString("ancherName"))
|
||||||
|
.setDisplaySrc(map.getString("display_src"));
|
||||||
|
Log.e("AllServerNotifyEvent", allServerNotifyEvent.toString());
|
||||||
|
Bus.get().post(new LiveAudienceEvent()
|
||||||
|
.setType(LiveAudienceEvent.LiveAudienceType.BLIND_BOX)
|
||||||
|
.setAllServerNotifyEvent(allServerNotifyEvent));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Constants.SOCKET_SEND_BARRAGE://发弹幕
|
case Constants.SOCKET_SEND_BARRAGE://发弹幕
|
||||||
@ -621,11 +647,47 @@ public class SocketRyClient {
|
|||||||
.setGiftType(map.getInteger("giftId"))
|
.setGiftType(map.getInteger("giftId"))
|
||||||
.setLuid(conString.toString())).setUname(map.getString("userName")).setLiveType(Integer.parseInt(map.getString("level"))));
|
.setLuid(conString.toString())).setUname(map.getString("userName")).setLiveType(Integer.parseInt(map.getString("level"))));
|
||||||
break;
|
break;
|
||||||
|
case Constants.LIVE_VOTE_CREATE:
|
||||||
|
Bus.get().post(new LiveAudienceEvent()
|
||||||
|
.setType(LiveAudienceEvent.LiveAudienceType.VOTE_CREATE)
|
||||||
|
.setObject(map)
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case Constants.LIVE_VOTE_END:
|
||||||
|
Bus.get().post(new LiveAudienceEvent()
|
||||||
|
.setType(LiveAudienceEvent.LiveAudienceType.VOTE_END)
|
||||||
|
.setObject(map)
|
||||||
|
);
|
||||||
|
EventBus.getDefault().post(new LiveAnchorEvent()
|
||||||
|
.setType(LiveAnchorEvent.LiveAnchorType.VOTE_ANCHOR_END)
|
||||||
|
.setObject(map)
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case Constants.LIVE_VOTE_UPDATE:
|
||||||
|
//通知给观众
|
||||||
|
Bus.get().post(new LiveAudienceEvent()
|
||||||
|
.setType(LiveAudienceEvent.LiveAudienceType.VOTE_UPDATE)
|
||||||
|
.setObject(map)
|
||||||
|
);
|
||||||
|
//通知给主播
|
||||||
|
EventBus.getDefault().post(new LiveAnchorEvent()
|
||||||
|
.setType(LiveAnchorEvent.LiveAnchorType.VOTE_ANCHOR_UPDATE)
|
||||||
|
.setObject(map)
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case Constants.LIVE_PK_END:
|
||||||
|
mListener.onEndPk(map.getLong("uid"),
|
||||||
|
map.getLong("pkuid"),
|
||||||
|
map.getLong("uid_score"),
|
||||||
|
map.getLong("pkuid_score"),
|
||||||
|
JSONObject.parseObject(map.getJSONObject("ct").getJSONObject("pk_top_users").toJSONString(), LivePKUserListBean.class)
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buyGuardInSameRoom(JSONObject map) {
|
private void buyGuardInSameRoom(JSONObject map) {
|
||||||
LiveBuyGuardMsgBean buyGuardMsgBean = new LiveBuyGuardMsgBean();
|
LiveBuyGuardMsgBean buyGuardMsgBean = new LiveBuyGuardMsgBean();
|
||||||
buyGuardMsgBean.setUid(map.getString("uid"));
|
buyGuardMsgBean.setUid(map.getString("uid"));
|
||||||
buyGuardMsgBean.setUserName(map.getString("ct"));
|
buyGuardMsgBean.setUserName(map.getString("ct"));
|
||||||
@ -635,7 +697,7 @@ public class SocketRyClient {
|
|||||||
mListener.onBuyGuard(buyGuardMsgBean);
|
mListener.onBuyGuard(buyGuardMsgBean);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buyGuardByNotify(JSONObject map) {
|
private void buyGuardByNotify(JSONObject map) {
|
||||||
if (mLiveUid.equals(map.getString("liveuid"))) {
|
if (mLiveUid.equals(map.getString("liveuid"))) {
|
||||||
buyGuardInSameRoom(map);
|
buyGuardInSameRoom(map);
|
||||||
//同一直播间,玩家自己开通,也能看到全服通知
|
//同一直播间,玩家自己开通,也能看到全服通知
|
||||||
@ -651,7 +713,7 @@ public class SocketRyClient {
|
|||||||
receiveGiftBean.setUid(uid);
|
receiveGiftBean.setUid(uid);
|
||||||
receiveGiftBean.setGuardType(map.getString("guard_type"));
|
receiveGiftBean.setGuardType(map.getString("guard_type"));
|
||||||
receiveGiftBean.setSendtype(map.getIntValue("action"));
|
receiveGiftBean.setSendtype(map.getIntValue("action"));
|
||||||
mListener.onSendGift(receiveGiftBean);
|
mListener.onSendGift(receiveGiftBean, null);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LiveReceiveGiftBean receiveGiftBean = new LiveReceiveGiftBean();
|
LiveReceiveGiftBean receiveGiftBean = new LiveReceiveGiftBean();
|
||||||
@ -663,12 +725,12 @@ public class SocketRyClient {
|
|||||||
receiveGiftBean.setUid(map.getString("uid"));
|
receiveGiftBean.setUid(map.getString("uid"));
|
||||||
receiveGiftBean.setGuardType(map.getString("guard_type"));
|
receiveGiftBean.setGuardType(map.getString("guard_type"));
|
||||||
receiveGiftBean.setSendtype(map.getIntValue("action"));
|
receiveGiftBean.setSendtype(map.getIntValue("action"));
|
||||||
mListener.onSendGift(receiveGiftBean);
|
mListener.onSendGift(receiveGiftBean, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void buyZuoJiByNotify(JSONObject map) {
|
private void buyZuoJiByNotify(JSONObject map) {
|
||||||
LiveReceiveGiftBean receiveGiftBean = new LiveReceiveGiftBean();
|
LiveReceiveGiftBean receiveGiftBean = new LiveReceiveGiftBean();
|
||||||
receiveGiftBean.setUserNiceName(map.getString("nickname"));
|
receiveGiftBean.setUserNiceName(map.getString("nickname"));
|
||||||
receiveGiftBean.setCarName(map.getString("carname"));
|
receiveGiftBean.setCarName(map.getString("carname"));
|
||||||
@ -677,7 +739,7 @@ public class SocketRyClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void buyLiangNameByNotify(JSONObject map) {
|
private void buyLiangNameByNotify(JSONObject map) {
|
||||||
LiveReceiveGiftBean receiveGiftBean = new LiveReceiveGiftBean();
|
LiveReceiveGiftBean receiveGiftBean = new LiveReceiveGiftBean();
|
||||||
receiveGiftBean.setUserNiceName(map.getString("nickname"));
|
receiveGiftBean.setUserNiceName(map.getString("nickname"));
|
||||||
receiveGiftBean.setLiangName(map.getString("liangname"));
|
receiveGiftBean.setLiangName(map.getString("liangname"));
|
||||||
@ -685,7 +747,7 @@ public class SocketRyClient {
|
|||||||
mListener.onBuyLiangName(receiveGiftBean);
|
mListener.onBuyLiangName(receiveGiftBean);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buyVipByNotify(JSONObject map) {
|
private void buyVipByNotify(JSONObject map) {
|
||||||
LiveReceiveGiftBean receiveGiftBean = new LiveReceiveGiftBean();
|
LiveReceiveGiftBean receiveGiftBean = new LiveReceiveGiftBean();
|
||||||
receiveGiftBean.setUserNiceName(map.getString("nicename"));
|
receiveGiftBean.setUserNiceName(map.getString("nicename"));
|
||||||
receiveGiftBean.setVipName(map.getString("ct"));
|
receiveGiftBean.setVipName(map.getString("ct"));
|
||||||
@ -709,7 +771,7 @@ public class SocketRyClient {
|
|||||||
mListener.onBuyVip(receiveGiftBean);
|
mListener.onBuyVip(receiveGiftBean);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendActiveMsg(JSONObject map, SocketReceiveBean received) {
|
private void sendActiveMsg(JSONObject map, SocketReceiveBean received) {
|
||||||
String msgtype = map.getString("msgtype");
|
String msgtype = map.getString("msgtype");
|
||||||
if ("1".equals(msgtype)) {//新年大作战活动
|
if ("1".equals(msgtype)) {//新年大作战活动
|
||||||
LiveChatBean chatBean = new LiveChatBean();
|
LiveChatBean chatBean = new LiveChatBean();
|
||||||
@ -878,13 +940,13 @@ public class SocketRyClient {
|
|||||||
LivePKUserListBean livePKUserListBean = JSON.parseObject(receiveGiftBean.getPkTopUsers(), LivePKUserListBean.class);
|
LivePKUserListBean livePKUserListBean = JSON.parseObject(receiveGiftBean.getPkTopUsers(), LivePKUserListBean.class);
|
||||||
if (mLiveUid.equals(map.getString("roomnum"))) {
|
if (mLiveUid.equals(map.getString("roomnum"))) {
|
||||||
if (!mLiveUid.equals(map.getString("roomnum"))) {
|
if (!mLiveUid.equals(map.getString("roomnum"))) {
|
||||||
mListener.onSendGift(receiveGiftBean);
|
mListener.onSendGift(receiveGiftBean, null);
|
||||||
}
|
}
|
||||||
//同一个直播间时才刷新pk
|
//同一个直播间时才刷新pk
|
||||||
mListener.onSendGiftPk(map.getLongValue("pktotal1"), map.getLongValue("pktotal2"), livePKUserListBean);
|
mListener.onSendGiftPk(map.getLongValue("pktotal1"), map.getLongValue("pktotal2"), livePKUserListBean);
|
||||||
} else {
|
} else {
|
||||||
if (!mLiveUid.equals(map.getString("roomnum"))) {
|
if (!mLiveUid.equals(map.getString("roomnum"))) {
|
||||||
mListener.onSendGift(receiveGiftBean);
|
mListener.onSendGift(receiveGiftBean, null);
|
||||||
}
|
}
|
||||||
//同一个直播间时才刷新pk
|
//同一个直播间时才刷新pk
|
||||||
if (mLiveUid.equals(map.getString("pkuid1")) ||
|
if (mLiveUid.equals(map.getString("pkuid1")) ||
|
||||||
@ -895,12 +957,12 @@ public class SocketRyClient {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!mLiveUid.equals(map.getString("roomnum"))) {
|
if (!mLiveUid.equals(map.getString("roomnum"))) {
|
||||||
mListener.onSendGift(receiveGiftBean);
|
mListener.onSendGift(receiveGiftBean, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void xydComplete(JSONObject map) {
|
private void xydComplete(JSONObject map) {
|
||||||
LiveReceiveGiftBean receiveGiftBean = new LiveReceiveGiftBean();
|
LiveReceiveGiftBean receiveGiftBean = new LiveReceiveGiftBean();
|
||||||
receiveGiftBean.setAvatar(map.getString("uhead") + "");
|
receiveGiftBean.setAvatar(map.getString("uhead") + "");
|
||||||
receiveGiftBean.setUserNiceName(map.getString("uname"));
|
receiveGiftBean.setUserNiceName(map.getString("uname"));
|
||||||
@ -934,12 +996,15 @@ public class SocketRyClient {
|
|||||||
chatBean.setContent(mContext.getString(R.string.live_send_gift_1) + " " + +receiveGiftBean.getGiftCount() + " " + mContext.getString(R.string.live_send_gift_2) + receiveGiftBean.getGiftnameen());
|
chatBean.setContent(mContext.getString(R.string.live_send_gift_1) + " " + +receiveGiftBean.getGiftCount() + " " + mContext.getString(R.string.live_send_gift_2) + receiveGiftBean.getGiftnameen());
|
||||||
|
|
||||||
}
|
}
|
||||||
mListener.onSendGift(receiveGiftBean);
|
mListener.onSendGift(receiveGiftBean, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 玩家自己送礼物
|
// 玩家自己送礼物
|
||||||
private void sendGiftInSameRoom(JSONObject map) {
|
private void sendGiftInSameRoom(JSONObject map) {
|
||||||
|
String ctJson = map.getString("ct");
|
||||||
|
SendBlindGiftEvent sendBlindGiftEvent = JSON.parseObject(ctJson, SendBlindGiftEvent.class);
|
||||||
LiveReceiveGiftBean receiveGiftBean = JSON.parseObject(map.getString("ct"), LiveReceiveGiftBean.class);
|
LiveReceiveGiftBean receiveGiftBean = JSON.parseObject(map.getString("ct"), LiveReceiveGiftBean.class);
|
||||||
|
sendBlindGiftEvent.setUserNiceName(map.getString("uname"));
|
||||||
receiveGiftBean.setAvatar(map.getString("uhead") + "");
|
receiveGiftBean.setAvatar(map.getString("uhead") + "");
|
||||||
receiveGiftBean.setUserNiceName(map.getString("uname"));
|
receiveGiftBean.setUserNiceName(map.getString("uname"));
|
||||||
receiveGiftBean.setRoomnum(map.getString("roomnum"));
|
receiveGiftBean.setRoomnum(map.getString("roomnum"));
|
||||||
@ -968,11 +1033,11 @@ public class SocketRyClient {
|
|||||||
if (map.get("guard_type") != null && !"".equals(map.get("guard_type")) && !"null".equals(map.get("guard_type"))) {
|
if (map.get("guard_type") != null && !"".equals(map.get("guard_type")) && !"null".equals(map.get("guard_type"))) {
|
||||||
chatBean.setGuardType(map.getInteger("guard_type"));
|
chatBean.setGuardType(map.getInteger("guard_type"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CommonAppContext.lang.equals("chinese")) {
|
if (CommonAppContext.lang.equals("chinese")) {
|
||||||
chatBean.setContent(mContext.getString(R.string.live_send_gift_1) + receiveGiftBean.getGiftCount() + mContext.getString(R.string.live_send_gift_2) + receiveGiftBean.getGiftName());
|
chatBean.setContent(mContext.getString(R.string.live_send_gift_1) + receiveGiftBean.getGiftCount() + mContext.getString(R.string.live_send_gift_2) + receiveGiftBean.getGiftName());
|
||||||
} else {
|
} else {
|
||||||
chatBean.setContent(mContext.getString(R.string.live_send_gift_1) + " " + +receiveGiftBean.getGiftCount() + " " + mContext.getString(R.string.live_send_gift_2) + receiveGiftBean.getGiftnameen());
|
chatBean.setContent(mContext.getString(R.string.live_send_gift_1) + " " + +receiveGiftBean.getGiftCount() + " " + mContext.getString(R.string.live_send_gift_2) + receiveGiftBean.getGiftnameen());
|
||||||
|
|
||||||
}
|
}
|
||||||
//增加粉丝徽章信息
|
//增加粉丝徽章信息
|
||||||
chatBean.setMedalNmae(map.getString("medal_name"));
|
chatBean.setMedalNmae(map.getString("medal_name"));
|
||||||
@ -981,12 +1046,12 @@ public class SocketRyClient {
|
|||||||
chatBean.setMedalLevelImageUrl(fansMedalBean.getThumb());
|
chatBean.setMedalLevelImageUrl(fansMedalBean.getThumb());
|
||||||
|
|
||||||
receiveGiftBean.setLiveChatBean(chatBean);
|
receiveGiftBean.setLiveChatBean(chatBean);
|
||||||
Log.e("tag", "ifpk" + map.getIntValue("ifpk") + "");
|
|
||||||
if (map.getIntValue("ifpk") == 1) {
|
if (map.getIntValue("ifpk") == 1) {
|
||||||
try {
|
try {
|
||||||
if (!TextUtils.isEmpty(mLiveUid)) {
|
if (!TextUtils.isEmpty(mLiveUid)) {
|
||||||
if (mLiveUid.equals(map.getString("roomnum"))) {
|
if (mLiveUid.equals(map.getString("roomnum"))) {
|
||||||
mListener.onSendGift(receiveGiftBean);
|
mListener.onSendGift(receiveGiftBean, sendBlindGiftEvent);
|
||||||
mListener.onSendGiftPk(map.getLongValue("pktotal1"), map.getLongValue("pktotal2"), livePKUserListBean);
|
mListener.onSendGiftPk(map.getLongValue("pktotal1"), map.getLongValue("pktotal2"), livePKUserListBean);
|
||||||
} else {
|
} else {
|
||||||
mListener.onSendGiftPk(map.getLongValue("pktotal2"), map.getLongValue("pktotal1"), livePKUserListBean);
|
mListener.onSendGiftPk(map.getLongValue("pktotal2"), map.getLongValue("pktotal1"), livePKUserListBean);
|
||||||
@ -998,7 +1063,12 @@ public class SocketRyClient {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
Log.i("tvvs", receiveGiftBean.getLiveChatBean().getContent());
|
Log.i("tvvs", receiveGiftBean.getLiveChatBean().getContent());
|
||||||
mListener.onSendGift(receiveGiftBean);
|
if (!TextUtils.isEmpty(sendBlindGiftEvent.getAction()) && TextUtils.equals("blind_box", sendBlindGiftEvent.getAction())) {
|
||||||
|
mListener.onSendGift(receiveGiftBean, sendBlindGiftEvent);
|
||||||
|
} else {
|
||||||
|
mListener.onSendGift(receiveGiftBean, null);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (map.getIntValue("drpk_status") == 1) {
|
if (map.getIntValue("drpk_status") == 1) {
|
||||||
Bus.get().post(new LiveAudienceEvent()
|
Bus.get().post(new LiveAudienceEvent()
|
||||||
@ -1014,7 +1084,7 @@ public class SocketRyClient {
|
|||||||
/**
|
/**
|
||||||
* 接收到系统消息,显示在聊天栏中
|
* 接收到系统消息,显示在聊天栏中
|
||||||
*/
|
*/
|
||||||
private void systemChatMessage(String content) {
|
private void systemChatMessage(String content) {
|
||||||
LiveChatBean bean = new LiveChatBean();
|
LiveChatBean bean = new LiveChatBean();
|
||||||
bean.setContent(content);
|
bean.setContent(content);
|
||||||
bean.setType(LiveChatBean.SYSTEM);
|
bean.setType(LiveChatBean.SYSTEM);
|
||||||
@ -1024,7 +1094,7 @@ public class SocketRyClient {
|
|||||||
/**
|
/**
|
||||||
* 接收到系统消息,显示在聊天栏中
|
* 接收到系统消息,显示在聊天栏中
|
||||||
*/
|
*/
|
||||||
private void systemChatMessage2(String content) {
|
private void systemChatMessage2(String content) {
|
||||||
LiveChatBean bean = new LiveChatBean();
|
LiveChatBean bean = new LiveChatBean();
|
||||||
bean.setContent(content);
|
bean.setContent(content);
|
||||||
bean.setType(LiveChatBean.SYSTEM2);
|
bean.setType(LiveChatBean.SYSTEM2);
|
||||||
@ -1034,7 +1104,7 @@ public class SocketRyClient {
|
|||||||
/**
|
/**
|
||||||
* 处理观众与主播连麦逻辑
|
* 处理观众与主播连麦逻辑
|
||||||
*/
|
*/
|
||||||
private void processLinkMic(JSONObject map) {
|
private void processLinkMic(JSONObject map) {
|
||||||
int action = map.getIntValue("action");
|
int action = map.getIntValue("action");
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case 1://主播收到观众连麦的申请
|
case 1://主播收到观众连麦的申请
|
||||||
@ -1089,7 +1159,7 @@ public class SocketRyClient {
|
|||||||
*
|
*
|
||||||
* @param map
|
* @param map
|
||||||
*/
|
*/
|
||||||
private void processLinkMicAnchor(JSONObject map) {
|
private void processLinkMicAnchor(JSONObject map) {
|
||||||
int action = map.getIntValue("action");
|
int action = map.getIntValue("action");
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case 1://收到其他主播连麦的邀请的回调
|
case 1://收到其他主播连麦的邀请的回调
|
||||||
@ -1128,7 +1198,7 @@ public class SocketRyClient {
|
|||||||
*
|
*
|
||||||
* @param map
|
* @param map
|
||||||
*/
|
*/
|
||||||
private void processAnchorLinkMicPk(JSONObject map) {
|
private void processAnchorLinkMicPk(JSONObject map) {
|
||||||
int action = map.getIntValue("action");
|
int action = map.getIntValue("action");
|
||||||
Log.i("Socket", "action = " + action + " json = " + map.toString());
|
Log.i("Socket", "action = " + action + " json = " + map.toString());
|
||||||
|
|
||||||
|
@ -1,14 +1,18 @@
|
|||||||
package com.yunbao.live.utils;
|
package com.yunbao.live.utils;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.graphics.Color;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.text.Spannable;
|
import android.text.Spannable;
|
||||||
import android.text.SpannableStringBuilder;
|
import android.text.SpannableStringBuilder;
|
||||||
|
import android.text.TextUtils;
|
||||||
import android.text.style.ForegroundColorSpan;
|
import android.text.style.ForegroundColorSpan;
|
||||||
|
import android.text.style.ImageSpan;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.yunbao.common.custom.VerticalImageSpan;
|
import com.yunbao.common.custom.VerticalImageSpan;
|
||||||
|
import com.yunbao.common.event.AllServerNotifyEvent;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.utils.DpUtil;
|
import com.yunbao.common.utils.DpUtil;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
@ -68,7 +72,7 @@ public class AllMsgTextRender {
|
|||||||
ImgLoader.displayDrawable(context, url, new ImgLoader.DrawableCallback() {
|
ImgLoader.displayDrawable(context, url, new ImgLoader.DrawableCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onLoadSuccess(Drawable drawable) {
|
public void onLoadSuccess(Drawable drawable) {
|
||||||
if (builder!=null&&!builder.toString().contains(text)){
|
if (builder != null && !builder.toString().contains(text)) {
|
||||||
builder = createPrefix(drawable, builder);
|
builder = createPrefix(drawable, builder);
|
||||||
builder = renderMsg(color2, builder, text);
|
builder = renderMsg(color2, builder, text);
|
||||||
textView.setText(builder);
|
textView.setText(builder);
|
||||||
@ -124,6 +128,95 @@ public class AllMsgTextRender {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 盲盒字体组装
|
||||||
|
*
|
||||||
|
* @param context
|
||||||
|
* @param textView
|
||||||
|
* @param serverNotifyEvent
|
||||||
|
*/
|
||||||
|
public void blindBoxText(Context context, TextView textView, AllServerNotifyEvent serverNotifyEvent) {
|
||||||
|
String space = " ";
|
||||||
|
SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder();
|
||||||
|
String extractTo = context.getString(R.string.extract_to);
|
||||||
|
extractTo = String.format(extractTo, serverNotifyEvent.getUserNiceName(), serverNotifyEvent.getBoxTypeName());
|
||||||
|
spannableStringBuilder.append(extractTo);
|
||||||
|
int indexImage = spannableStringBuilder.length();
|
||||||
|
int endImage = indexImage + space.length();
|
||||||
|
spannableStringBuilder.append(space);
|
||||||
|
String giftName;
|
||||||
|
int giftNameIndex;
|
||||||
|
int endName;
|
||||||
|
if (!TextUtils.isEmpty(serverNotifyEvent.getGiftNotification())
|
||||||
|
&& TextUtils.equals(serverNotifyEvent.getGiftNotification(), "1")) {
|
||||||
|
giftName = context.getString(R.string.extract_to2);
|
||||||
|
giftName = String.format(giftName, serverNotifyEvent.getGiftName(), serverNotifyEvent.getAnchorName());
|
||||||
|
spannableStringBuilder.append(giftName);
|
||||||
|
giftNameIndex = spannableStringBuilder.toString().indexOf(serverNotifyEvent.getGiftName());
|
||||||
|
endName = giftNameIndex + serverNotifyEvent.getGiftName().length();
|
||||||
|
ImgLoader.displayDrawable(context, serverNotifyEvent.getGiftIcon(), new ImgLoader.DrawableCallback() {
|
||||||
|
@Override
|
||||||
|
public void onLoadSuccess(Drawable drawable) {
|
||||||
|
drawable.setBounds(0, 0, DpUtil.dp2px(21), DpUtil.dp2px(21));
|
||||||
|
//用这个drawable对象代替字符串easy
|
||||||
|
ImageSpan span = new ImageSpan(drawable, ImageSpan.ALIGN_BASELINE);
|
||||||
|
spannableStringBuilder.setSpan(span, indexImage, endImage, Spannable.SPAN_EXCLUSIVE_INCLUSIVE);
|
||||||
|
blind(spannableStringBuilder,textView,serverNotifyEvent,giftNameIndex,endName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLoadFailed() {
|
||||||
|
blind(spannableStringBuilder,textView,serverNotifyEvent,giftNameIndex,endName);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
giftName = serverNotifyEvent.getDressName();
|
||||||
|
spannableStringBuilder.append(giftName);
|
||||||
|
giftNameIndex = spannableStringBuilder.toString().indexOf(giftName);
|
||||||
|
endName = giftNameIndex + giftName.length();
|
||||||
|
ImgLoader.displayDrawable(context, serverNotifyEvent.getDisplaySrc(), new ImgLoader.DrawableCallback() {
|
||||||
|
@Override
|
||||||
|
public void onLoadSuccess(Drawable drawable) {
|
||||||
|
drawable.setBounds(0, 0, DpUtil.dp2px(21), DpUtil.dp2px(21));
|
||||||
|
//用这个drawable对象代替字符串easy
|
||||||
|
ImageSpan span = new ImageSpan(drawable, ImageSpan.ALIGN_BASELINE);
|
||||||
|
spannableStringBuilder.setSpan(span, indexImage, endImage, Spannable.SPAN_EXCLUSIVE_INCLUSIVE);
|
||||||
|
blind(spannableStringBuilder,textView,serverNotifyEvent,giftNameIndex,endName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLoadFailed() {
|
||||||
|
blind(spannableStringBuilder,textView,serverNotifyEvent,giftNameIndex,endName);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void blind( SpannableStringBuilder spannableStringBuilder, TextView textView, AllServerNotifyEvent serverNotifyEvent, int giftNameIndex,int endName) {
|
||||||
|
switch (Integer.parseInt(serverNotifyEvent.getBoxType())) {
|
||||||
|
case 1:
|
||||||
|
spannableStringBuilder.setSpan(new ForegroundColorSpan(Color.parseColor("#336DF7")),
|
||||||
|
giftNameIndex,
|
||||||
|
endName,
|
||||||
|
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
spannableStringBuilder.setSpan(new ForegroundColorSpan(Color.parseColor("#FD5A9D")),
|
||||||
|
giftNameIndex,
|
||||||
|
endName,
|
||||||
|
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
spannableStringBuilder.setSpan(new ForegroundColorSpan(Color.parseColor("#FCB514")),
|
||||||
|
giftNameIndex,
|
||||||
|
endName,
|
||||||
|
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
textView.setText(spannableStringBuilder);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 渲染消息
|
* 渲染消息
|
||||||
*/
|
*/
|
||||||
|
@ -0,0 +1,122 @@
|
|||||||
|
package com.yunbao.live.utils;
|
||||||
|
|
||||||
|
import android.os.Handler;
|
||||||
|
import android.os.Looper;
|
||||||
|
|
||||||
|
import com.yunbao.common.CommonAppContext;
|
||||||
|
import com.yunbao.common.bean.LiveRoomVoteModel;
|
||||||
|
import com.yunbao.common.http.base.HttpCallback;
|
||||||
|
import com.yunbao.common.http.live.LiveNetManager;
|
||||||
|
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||||
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
|
import com.yunbao.live.event.LiveAnchorEvent;
|
||||||
|
|
||||||
|
import org.greenrobot.eventbus.EventBus;
|
||||||
|
|
||||||
|
import java.util.Timer;
|
||||||
|
import java.util.TimerTask;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主播投票管理器,可以创建投票和手动结束投票
|
||||||
|
*/
|
||||||
|
public class LiveAnchorVoteManager {
|
||||||
|
private static LiveAnchorVoteManager manager;
|
||||||
|
private String liveUid;
|
||||||
|
private boolean isVoting = false;
|
||||||
|
private LiveRoomVoteModel vote;
|
||||||
|
private TimerTask task;
|
||||||
|
|
||||||
|
|
||||||
|
private LiveAnchorVoteManager() {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static LiveAnchorVoteManager getInstance() {
|
||||||
|
if (manager == null) {
|
||||||
|
manager = new LiveAnchorVoteManager();
|
||||||
|
}
|
||||||
|
return manager;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void createVote(String liveUid, String question, String answer1, String answer2, OnItemClickListener<LiveRoomVoteModel> listener) {
|
||||||
|
if (isVoting) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.liveUid = liveUid;
|
||||||
|
LiveNetManager.get(CommonAppContext.getTopActivity())
|
||||||
|
.createLiveVote(liveUid, question, answer1, answer2, new HttpCallback<LiveRoomVoteModel>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(LiveRoomVoteModel data) {
|
||||||
|
data.setAnswer1(answer1);
|
||||||
|
data.setAnswer2(answer2);
|
||||||
|
data.setLiveUid(liveUid);
|
||||||
|
data.setContent(question);
|
||||||
|
data.setStatus(1);
|
||||||
|
vote = data;
|
||||||
|
createTimerTask();
|
||||||
|
EventBus.getDefault().post(new LiveAnchorEvent()
|
||||||
|
.setType(LiveAnchorEvent.LiveAnchorType.VOTE_CREATE)
|
||||||
|
.setObject(data)
|
||||||
|
);
|
||||||
|
listener.onItemClick(vote, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(String error) {
|
||||||
|
LiveRoomVoteModel voteModel = new LiveRoomVoteModel();
|
||||||
|
voteModel.setContent(CommonAppContext.getTopActivity().getString(com.yunbao.common.R.string.live_vote_create_error));
|
||||||
|
listener.onItemClick(voteModel, -1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createTimerTask() {
|
||||||
|
if (isVoting) {
|
||||||
|
task.cancel();
|
||||||
|
}
|
||||||
|
task = new TimerTask() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
isVoting = true;
|
||||||
|
new Handler(Looper.getMainLooper()).post(() -> {
|
||||||
|
entVote((bean, position) -> {
|
||||||
|
EventBus.getDefault().post(new LiveAnchorEvent()
|
||||||
|
.setType(LiveAnchorEvent.LiveAnchorType.VOTE_ANCHOR_END)
|
||||||
|
.setObject(bean)
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
new Timer().schedule(task, vote.getTime() * 1000L);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void entVote(OnItemClickListener<String> msg) {
|
||||||
|
if (isVoting) {
|
||||||
|
task.cancel();
|
||||||
|
}
|
||||||
|
LiveNetManager.get(CommonAppContext.getTopActivity())
|
||||||
|
.endLiveVote(liveUid, new HttpCallback<String>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(String data) {
|
||||||
|
isVoting = false;
|
||||||
|
msg.onItemClick(data, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(String error) {
|
||||||
|
msg.onItemClick(error, -1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void clear() {
|
||||||
|
if (task != null) {
|
||||||
|
task.cancel();
|
||||||
|
task = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -339,6 +339,9 @@ public class LiveExoPlayerManager {
|
|||||||
if (getNowPlayer() != null) {
|
if (getNowPlayer() != null) {
|
||||||
getNowPlayer().stop();
|
getNowPlayer().stop();
|
||||||
}
|
}
|
||||||
|
if (getNextPlayer() != null && getNextPlayer().isPlaying()) {
|
||||||
|
getNextPlayer().stop();
|
||||||
|
}
|
||||||
clearUrl();
|
clearUrl();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,300 @@
|
|||||||
|
package com.yunbao.live.utils;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.os.Handler;
|
||||||
|
import android.os.Looper;
|
||||||
|
import android.text.Html;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.animation.Animation;
|
||||||
|
import android.view.animation.AnimationUtils;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.ProgressBar;
|
||||||
|
import android.widget.RelativeLayout;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.yunbao.common.bean.LiveRoomVoteModel;
|
||||||
|
import com.yunbao.common.http.base.HttpCallback;
|
||||||
|
import com.yunbao.common.http.live.LiveNetManager;
|
||||||
|
import com.yunbao.common.utils.StringUtil;
|
||||||
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
|
import com.yunbao.live.R;
|
||||||
|
import com.yunbao.live.activity.LiveRyAnchorActivity;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Timer;
|
||||||
|
import java.util.TimerTask;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 直播间投票控件管理器
|
||||||
|
*/
|
||||||
|
public class LiveRoomVoteManager {
|
||||||
|
private final Context mContext;
|
||||||
|
private final View voteLayout;
|
||||||
|
private final View voteRoot;
|
||||||
|
private final View mVoteShow;
|
||||||
|
private final View mClose;
|
||||||
|
private final ImageView mAnchorVoteHide;
|
||||||
|
private final boolean isAnchor;
|
||||||
|
|
||||||
|
private final TextView mTitle;
|
||||||
|
private final TextView mSubmit;
|
||||||
|
private final TextView mCancel;
|
||||||
|
private final ProgressBar mProgress;
|
||||||
|
|
||||||
|
|
||||||
|
LiveRoomVoteModel createVoteModel;
|
||||||
|
|
||||||
|
public LiveRoomVoteManager(Context mContext, View root) {
|
||||||
|
this.mContext = mContext;
|
||||||
|
mAnchorVoteHide = root.findViewById(R.id.vote_hide);
|
||||||
|
mVoteShow = root.findViewById(R.id.vote_show);
|
||||||
|
mClose = root.findViewById(R.id.vote_close);
|
||||||
|
voteLayout = root.findViewById(R.id.vote_layout);
|
||||||
|
voteRoot = root.findViewById(R.id.live_room_vote);
|
||||||
|
mTitle = root.findViewById(R.id.title);
|
||||||
|
mSubmit = root.findViewById(R.id.vote_sub1);
|
||||||
|
mCancel = root.findViewById(R.id.vote_sub2);
|
||||||
|
mProgress = root.findViewById(R.id.vote_progress);
|
||||||
|
mAnchorVoteHide.setOnClickListener(v -> hideAnchorVote());
|
||||||
|
mVoteShow.setOnClickListener(v -> hideAnchorVote());
|
||||||
|
mClose.setOnClickListener(v -> close());
|
||||||
|
if (mContext instanceof LiveRyAnchorActivity) {
|
||||||
|
isAnchor = true;
|
||||||
|
} else {
|
||||||
|
isAnchor = false;
|
||||||
|
mClose.setVisibility(View.INVISIBLE);
|
||||||
|
}
|
||||||
|
hide();
|
||||||
|
initClick();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void close() {
|
||||||
|
if(mClose.getTag()!=null){
|
||||||
|
mClose.setTag(null);
|
||||||
|
hide();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
mTitle.setText(R.string.live_vote_close_title);
|
||||||
|
mSubmit.setText(R.string.live_vote_close_yes);
|
||||||
|
mCancel.setText(R.string.live_vote_close_no);
|
||||||
|
mCancel.setOnClickListener(v -> {
|
||||||
|
mTitle.setText(createVoteModel.getContent());
|
||||||
|
mSubmit.setText(getAnswerText(createVoteModel.getAnswer1()));
|
||||||
|
mCancel.setText(getAnswerText(createVoteModel.getAnswer2()));
|
||||||
|
initClick();
|
||||||
|
});
|
||||||
|
mSubmit.setOnClickListener(v -> endAnchorVote());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initClick() {
|
||||||
|
if (isAnchor) {
|
||||||
|
mCancel.setOnClickListener(null);
|
||||||
|
mSubmit.setOnClickListener(null);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
mSubmit.setOnClickListener(v -> updateVote(true));
|
||||||
|
mCancel.setOnClickListener(v -> updateVote(false));
|
||||||
|
}
|
||||||
|
private String getAnswerText(String answer){
|
||||||
|
if(answer.length()>4){
|
||||||
|
return answer.substring(0,4)+"\n"+answer.substring(4);
|
||||||
|
}
|
||||||
|
return answer;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateVote(boolean isSubmit) {
|
||||||
|
LiveNetManager.get(mContext)
|
||||||
|
.updateLiveVote(createVoteModel.getLiveUid(), isSubmit, new HttpCallback<String>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(String data) {
|
||||||
|
mCancel.setOnClickListener(null);
|
||||||
|
mSubmit.setOnClickListener(null);
|
||||||
|
|
||||||
|
if (isSubmit) {
|
||||||
|
mSubmit.setTextColor(Color.parseColor("#FFB800"));
|
||||||
|
mCancel.setTextColor(Color.parseColor("#999999"));
|
||||||
|
} else {
|
||||||
|
mCancel.setTextColor(Color.parseColor("#FFB800"));
|
||||||
|
mSubmit.setTextColor(Color.parseColor("#999999"));
|
||||||
|
}
|
||||||
|
mSubmit.setTag(createVoteModel.getLiveUid());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(String error) {
|
||||||
|
ToastUtil.show(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void endAnchorVote() {
|
||||||
|
LiveAnchorVoteManager.getInstance().entVote((bean, position) -> {
|
||||||
|
if (position == -1) {
|
||||||
|
ToastUtil.show(bean);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
mClose.setTag(true);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void endTimerTask(String msg) {
|
||||||
|
if (isAnchor) {
|
||||||
|
LiveAnchorVoteManager.getInstance().clear();
|
||||||
|
}
|
||||||
|
mCancel.setOnClickListener(null);
|
||||||
|
mSubmit.setOnClickListener(null);
|
||||||
|
|
||||||
|
mSubmit.setText(getAnswerText(createVoteModel.getAnswer1()));
|
||||||
|
mCancel.setText(getAnswerText(createVoteModel.getAnswer2()));
|
||||||
|
|
||||||
|
new Timer().schedule(new TimerTask() {
|
||||||
|
int time = 6;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
new Handler(Looper.getMainLooper()).post(() -> {
|
||||||
|
if (--time == 0) {
|
||||||
|
hide();
|
||||||
|
cancel();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
mTitle.setText(Html.fromHtml(String.format(mContext.getString(R.string.live_room_vote_over_tip), msg+"<br/>", time + "")));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, 0, 1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateVoteModel(LiveRoomVoteModel createVoteModel) {
|
||||||
|
try {
|
||||||
|
if (createVoteModel.getStatus() == 0) {
|
||||||
|
hide();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.createVoteModel = createVoteModel;
|
||||||
|
if (createVoteModel.isVote()) {
|
||||||
|
fold();
|
||||||
|
}else{
|
||||||
|
expansion();
|
||||||
|
}
|
||||||
|
mTitle.setText(createVoteModel.getContent());
|
||||||
|
mSubmit.setText(getAnswerText(createVoteModel.getAnswer1()));
|
||||||
|
mCancel.setText(getAnswerText(createVoteModel.getAnswer2()));
|
||||||
|
mCancel.setOnClickListener(null);
|
||||||
|
mSubmit.setOnClickListener(null);
|
||||||
|
mClose.setTag(null);
|
||||||
|
if (mSubmit.getTag() == null || !mSubmit.getTag().equals(createVoteModel.getLiveUid())) {
|
||||||
|
mSubmit.setTextColor(Color.WHITE);
|
||||||
|
mCancel.setTextColor(Color.WHITE);
|
||||||
|
initClick();
|
||||||
|
}
|
||||||
|
if (!StringUtil.isEmpty(createVoteModel.getVote())) {
|
||||||
|
mCancel.setOnClickListener(null);
|
||||||
|
mSubmit.setOnClickListener(null);
|
||||||
|
|
||||||
|
if (createVoteModel.isVoteLeft()) {
|
||||||
|
mSubmit.setTextColor(Color.parseColor("#FFB800"));
|
||||||
|
mCancel.setTextColor(Color.parseColor("#999999"));
|
||||||
|
} else {
|
||||||
|
mCancel.setTextColor(Color.parseColor("#FFB800"));
|
||||||
|
mSubmit.setTextColor(Color.parseColor("#999999"));
|
||||||
|
}
|
||||||
|
mSubmit.setTag(createVoteModel.getLiveUid());
|
||||||
|
}
|
||||||
|
if (createVoteModel.getAnswer1Num() == 0 && createVoteModel.getAnswer2Num() == 0) {
|
||||||
|
mProgress.setMax(20);
|
||||||
|
setLength(10);
|
||||||
|
} else {
|
||||||
|
mProgress.setMax(createVoteModel.getAnswer1Num() + createVoteModel.getAnswer2Num());
|
||||||
|
setLength(createVoteModel.getAnswer1Num());
|
||||||
|
}
|
||||||
|
if (isAnchor) {
|
||||||
|
mClose.setVisibility(View.VISIBLE);
|
||||||
|
} else {
|
||||||
|
if (mSubmit.getTag() != null && mSubmit.getTag().equals(createVoteModel.getLiveUid())) {
|
||||||
|
new Handler(Looper.getMainLooper()).postDelayed(this::fold,300);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
show();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLength(int length) {
|
||||||
|
length = mProgress.getMax() - length;
|
||||||
|
mProgress.setProgress(length);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void hideAnchorVote() {
|
||||||
|
boolean hide = mAnchorVoteHide.getTag() == null || (boolean) mAnchorVoteHide.getTag();
|
||||||
|
Animation animation;
|
||||||
|
if (hide) {
|
||||||
|
animation = AnimationUtils.loadAnimation(mContext, R.anim.view_live_anchor_vote_out);
|
||||||
|
} else {
|
||||||
|
animation = AnimationUtils.loadAnimation(mContext, R.anim.view_live_anchor_vote_in);
|
||||||
|
}
|
||||||
|
animation.setAnimationListener(new Animation.AnimationListener() {
|
||||||
|
@Override
|
||||||
|
public void onAnimationStart(Animation animation) {
|
||||||
|
if (!hide) {
|
||||||
|
voteRoot.setVisibility(View.VISIBLE);
|
||||||
|
mAnchorVoteHide.setVisibility(View.VISIBLE);
|
||||||
|
mVoteShow.setVisibility(View.GONE);
|
||||||
|
if (isAnchor) {
|
||||||
|
mClose.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAnimationEnd(Animation animation) {
|
||||||
|
if (hide) {
|
||||||
|
voteRoot.setVisibility(View.INVISIBLE);
|
||||||
|
mAnchorVoteHide.setVisibility(View.GONE);
|
||||||
|
mVoteShow.setVisibility(View.VISIBLE);
|
||||||
|
if (isAnchor) {
|
||||||
|
mClose.setVisibility(View.INVISIBLE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mAnchorVoteHide.setTag(!hide);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAnimationRepeat(Animation animation) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
voteRoot.startAnimation(animation);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMarginPosition(int position) {
|
||||||
|
RelativeLayout.LayoutParams voteLayoutParams = (RelativeLayout.LayoutParams) voteLayout.getLayoutParams();
|
||||||
|
voteLayoutParams.topMargin = position;
|
||||||
|
voteLayout.setLayoutParams(voteLayoutParams);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void show() {
|
||||||
|
voteLayout.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void hide() {
|
||||||
|
voteLayout.setVisibility(View.GONE);
|
||||||
|
mSubmit.setTag(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void fold() {
|
||||||
|
if (mVoteShow.getVisibility() != View.VISIBLE) {
|
||||||
|
hideAnchorVote();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void expansion() {
|
||||||
|
if (mVoteShow.getVisibility() == View.VISIBLE) {
|
||||||
|
hideAnchorVote();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -86,6 +86,19 @@ public class LiveTextRender {
|
|||||||
sFontSizeSpan3 = new AbsoluteSizeSpan(14, true);
|
sFontSizeSpan3 = new AbsoluteSizeSpan(14, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void blindBox(Context context, TextView textView, LiveChatBean bean) {
|
||||||
|
String chatMsg = bean.getContent();
|
||||||
|
int userNiceNameIndex = chatMsg.indexOf(bean.getUserNiceName());
|
||||||
|
int userNiceNameSize = bean.getUserNiceName().length();
|
||||||
|
int giftNameIndex = chatMsg.indexOf(bean.getGiftName());
|
||||||
|
int giftNameSize = bean.getGiftName().length();
|
||||||
|
SpannableStringBuilder builder = new SpannableStringBuilder();
|
||||||
|
builder.append(chatMsg);
|
||||||
|
builder.setSpan(new ForegroundColorSpan(Color.parseColor("#78FEFF")), userNiceNameIndex, userNiceNameIndex + userNiceNameSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
|
builder.setSpan(new ForegroundColorSpan(Color.parseColor("#FFF86C")), giftNameIndex, giftNameIndex + giftNameSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
|
textView.setText(builder);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 直播间推荐卡
|
* 直播间推荐卡
|
||||||
*
|
*
|
||||||
|
@ -5,6 +5,7 @@ import android.animation.AnimatorListenerAdapter;
|
|||||||
import android.animation.ObjectAnimator;
|
import android.animation.ObjectAnimator;
|
||||||
import android.animation.ValueAnimator;
|
import android.animation.ValueAnimator;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.graphics.Color;
|
||||||
import android.graphics.Path;
|
import android.graphics.Path;
|
||||||
import android.graphics.PathMeasure;
|
import android.graphics.PathMeasure;
|
||||||
import android.graphics.RectF;
|
import android.graphics.RectF;
|
||||||
@ -84,8 +85,8 @@ public class LiveLinkMicPkViewHolder extends AbsViewHolder {
|
|||||||
public void init() {
|
public void init() {
|
||||||
|
|
||||||
mHalfScreenWidth = ScreenDimenUtil.getInstance().getScreenWdith() / 2;
|
mHalfScreenWidth = ScreenDimenUtil.getInstance().getScreenWdith() / 2;
|
||||||
mLeftString =mContext.getString(R.string.live_link_mic_pk_1);
|
mLeftString = mContext.getString(R.string.live_link_mic_pk_1);
|
||||||
mRightString =mContext.getString(R.string.live_link_mic_pk_2);
|
mRightString = mContext.getString(R.string.live_link_mic_pk_2);
|
||||||
mFrameImageView = (FrameImageView) findViewById(R.id.frame_img);
|
mFrameImageView = (FrameImageView) findViewById(R.id.frame_img);
|
||||||
mFrameImageView.setImageList(LiveIconUtil.getLinkMicPkAnim());//PK开始动画
|
mFrameImageView.setImageList(LiveIconUtil.getLinkMicPkAnim());//PK开始动画
|
||||||
frame_img_pk = (ImageView) findViewById(R.id.frame_img_pk);
|
frame_img_pk = (ImageView) findViewById(R.id.frame_img_pk);
|
||||||
@ -155,7 +156,7 @@ public class LiveLinkMicPkViewHolder extends AbsViewHolder {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
Log.i("女神说", "倒计时状态:"+s);
|
Log.i("女神说", "倒计时状态:" + s);
|
||||||
if (mTime.getVisibility() == View.VISIBLE) {
|
if (mTime.getVisibility() == View.VISIBLE) {
|
||||||
EventBus.getDefault().post(new LiveAudienceEvent()
|
EventBus.getDefault().post(new LiveAudienceEvent()
|
||||||
.setType(LiveAudienceEvent.LiveAudienceType.LIVE_PK_ING));
|
.setType(LiveAudienceEvent.LiveAudienceType.LIVE_PK_ING));
|
||||||
@ -198,6 +199,7 @@ public class LiveLinkMicPkViewHolder extends AbsViewHolder {
|
|||||||
animationDrawable = (AnimationDrawable) frame_img_pk.getBackground();
|
animationDrawable = (AnimationDrawable) frame_img_pk.getBackground();
|
||||||
animationDrawable.start();
|
animationDrawable.start();
|
||||||
}
|
}
|
||||||
|
mLeft.setTag(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showTime() {
|
public void showTime() {
|
||||||
@ -233,6 +235,7 @@ public class LiveLinkMicPkViewHolder extends AbsViewHolder {
|
|||||||
}
|
}
|
||||||
if (mLeft != null) {
|
if (mLeft != null) {
|
||||||
mLeft.setTranslationX(0);
|
mLeft.setTranslationX(0);
|
||||||
|
mLeft.setTag(null);
|
||||||
mLeft2.setTranslationX(0);
|
mLeft2.setTranslationX(0);
|
||||||
}
|
}
|
||||||
if (mRight != null) {
|
if (mRight != null) {
|
||||||
@ -241,7 +244,27 @@ public class LiveLinkMicPkViewHolder extends AbsViewHolder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改PK进度条进度
|
||||||
|
* @param leftGift 左边进度
|
||||||
|
* @param rightGift 右边进度
|
||||||
|
* @param bean 排位信息
|
||||||
|
*/
|
||||||
public void onProgressChanged(long leftGift, long rightGift, LivePKUserListBean bean) {
|
public void onProgressChanged(long leftGift, long rightGift, LivePKUserListBean bean) {
|
||||||
|
onProgressChanged(leftGift, rightGift, bean, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改PK进度条进度
|
||||||
|
* @param leftGift 左边进度
|
||||||
|
* @param rightGift 右边进度
|
||||||
|
* @param bean 排位信息
|
||||||
|
* @param isEnd 是否为最终数据,是的话就不再接收后续修改数据,默认false
|
||||||
|
*/
|
||||||
|
public void onProgressChanged(long leftGift, long rightGift, LivePKUserListBean bean, boolean isEnd) {
|
||||||
|
if (mLeft.getTag() != null && ((boolean) mLeft.getTag())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
mLeft.setText(mLeftString + " " + leftGift);
|
mLeft.setText(mLeftString + " " + leftGift);
|
||||||
mRight.setText(rightGift + " " + mRightString);
|
mRight.setText(rightGift + " " + mRightString);
|
||||||
if (leftGift == rightGift) {
|
if (leftGift == rightGift) {
|
||||||
@ -262,8 +285,10 @@ public class LiveLinkMicPkViewHolder extends AbsViewHolder {
|
|||||||
animationDrawable = (AnimationDrawable) frame_img_pk.getBackground();
|
animationDrawable = (AnimationDrawable) frame_img_pk.getBackground();
|
||||||
animationDrawable.start();
|
animationDrawable.start();
|
||||||
}
|
}
|
||||||
|
mLeft.setTag(isEnd);
|
||||||
EventBus.getDefault().post(new LiveAudienceEvent().setType(LiveAudienceEvent.LiveAudienceType.PK_TWO_UPDATE_HEAD_DATA).setLivePKUserListBean(bean));
|
if (bean != null) {
|
||||||
|
EventBus.getDefault().post(new LiveAudienceEvent().setType(LiveAudienceEvent.LiveAudienceType.PK_TWO_UPDATE_HEAD_DATA).setLivePKUserListBean(bean));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void changeLine(float nowIndex, long leftGift, long rightGift) {
|
private void changeLine(float nowIndex, long leftGift, long rightGift) {
|
||||||
|
@ -46,7 +46,6 @@ import com.yunbao.common.utils.ProcessImageUtil;
|
|||||||
import com.yunbao.common.utils.RouteUtil;
|
import com.yunbao.common.utils.RouteUtil;
|
||||||
import com.yunbao.common.utils.StringUtil;
|
import com.yunbao.common.utils.StringUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
|
||||||
import com.yunbao.common.views.AbsViewHolder;
|
import com.yunbao.common.views.AbsViewHolder;
|
||||||
import com.yunbao.common.views.LiveClarityCustomPopup;
|
import com.yunbao.common.views.LiveClarityCustomPopup;
|
||||||
import com.yunbao.common.views.LiveNewWishListPopup;
|
import com.yunbao.common.views.LiveNewWishListPopup;
|
||||||
@ -62,7 +61,6 @@ import com.yunbao.live.dialog.LiveAnchorSayPopDialog;
|
|||||||
import com.yunbao.live.dialog.LiveFaceUnityDialogFragment;
|
import com.yunbao.live.dialog.LiveFaceUnityDialogFragment;
|
||||||
import com.yunbao.live.dialog.LiveNewRoomClassDialogFragment;
|
import com.yunbao.live.dialog.LiveNewRoomClassDialogFragment;
|
||||||
import com.yunbao.live.dialog.LiveNewRoomTypeDialogFragment;
|
import com.yunbao.live.dialog.LiveNewRoomTypeDialogFragment;
|
||||||
import com.yunbao.live.dialog.LiveNewWishListDialogFragment;
|
|
||||||
import com.yunbao.live.dialog.LiveTimeDialogFragment;
|
import com.yunbao.live.dialog.LiveTimeDialogFragment;
|
||||||
import com.yunbao.live.event.LiveAudienceEvent;
|
import com.yunbao.live.event.LiveAudienceEvent;
|
||||||
import com.yunbao.live.http.LiveHttpConsts;
|
import com.yunbao.live.http.LiveHttpConsts;
|
||||||
@ -664,7 +662,7 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
|||||||
new DialogUitl.Builder(mContext)
|
new DialogUitl.Builder(mContext)
|
||||||
.setContent(mContext.getString(R.string.live_location_close_3))
|
.setContent(mContext.getString(R.string.live_location_close_3))
|
||||||
.setCancelable(true)
|
.setCancelable(true)
|
||||||
.setConfrimString(mContext.getString(R.string.live_location_close_2))
|
.setConfirmString(mContext.getString(R.string.live_location_close_2))
|
||||||
.setClickCallback(new DialogUitl.SimpleCallback() {
|
.setClickCallback(new DialogUitl.SimpleCallback() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -7,25 +7,19 @@ import android.app.Dialog;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.media.AudioManager;
|
import android.media.AudioManager;
|
||||||
import android.os.Bundle;
|
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
import android.os.SystemClock;
|
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.ViewParent;
|
import android.view.ViewParent;
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
|
||||||
import android.widget.RelativeLayout;
|
import android.widget.RelativeLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.google.android.exoplayer2.PlaybackException;
|
import com.google.android.exoplayer2.PlaybackException;
|
||||||
import com.google.android.exoplayer2.Player;
|
import com.google.android.exoplayer2.Player;
|
||||||
import com.google.android.exoplayer2.ui.StyledPlayerView;
|
import com.google.android.exoplayer2.ui.StyledPlayerView;
|
||||||
@ -35,10 +29,8 @@ import com.lxj.xpopup.core.BasePopupView;
|
|||||||
import com.lxj.xpopup.interfaces.XPopupCallback;
|
import com.lxj.xpopup.interfaces.XPopupCallback;
|
||||||
import com.lzf.easyfloat.EasyFloat;
|
import com.lzf.easyfloat.EasyFloat;
|
||||||
import com.lzy.okserver.OkDownload;
|
import com.lzy.okserver.OkDownload;
|
||||||
import com.yunbao.common.Constants;
|
|
||||||
import com.yunbao.common.bean.EnterRoomNewModel;
|
import com.yunbao.common.bean.EnterRoomNewModel;
|
||||||
import com.yunbao.common.dialog.LiveFontSizeSettingDialog;
|
import com.yunbao.common.dialog.LiveFontSizeSettingDialog;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
|
||||||
import com.yunbao.common.http.HttpCallback;
|
import com.yunbao.common.http.HttpCallback;
|
||||||
import com.yunbao.common.http.HttpClient;
|
import com.yunbao.common.http.HttpClient;
|
||||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||||
@ -50,14 +42,11 @@ import com.yunbao.common.utils.L;
|
|||||||
import com.yunbao.common.utils.MicStatusManager;
|
import com.yunbao.common.utils.MicStatusManager;
|
||||||
import com.yunbao.common.utils.ScreenDimenUtil;
|
import com.yunbao.common.utils.ScreenDimenUtil;
|
||||||
import com.yunbao.common.utils.SpUtil;
|
import com.yunbao.common.utils.SpUtil;
|
||||||
import com.yunbao.common.utils.StringUtil;
|
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
|
||||||
import com.yunbao.common.views.LiveClarityCustomPopup;
|
import com.yunbao.common.views.LiveClarityCustomPopup;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.live.activity.LiveActivity;
|
import com.yunbao.live.activity.LiveActivity;
|
||||||
import com.yunbao.live.activity.LiveAudienceActivity;
|
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||||
import com.yunbao.live.dialog.LiveUserDialogFragment;
|
|
||||||
import com.yunbao.live.event.LiveAudienceEvent;
|
import com.yunbao.live.event.LiveAudienceEvent;
|
||||||
import com.yunbao.live.utils.LiveExoPlayerManager;
|
import com.yunbao.live.utils.LiveExoPlayerManager;
|
||||||
|
|
||||||
@ -298,6 +287,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
|||||||
public void play(String url, int playModel) {
|
public void play(String url, int playModel) {
|
||||||
srcUrl = url;
|
srcUrl = url;
|
||||||
PLAY_MODEL = playModel;
|
PLAY_MODEL = playModel;
|
||||||
|
waitNextUrl = null;
|
||||||
Log.i(TAG, "play" + " url:" + url + " playModel: " + playModel + " landscape: " + landscape + " videoLandscape" + videoLandscape);
|
Log.i(TAG, "play" + " url:" + url + " playModel: " + playModel + " landscape: " + landscape + " videoLandscape" + videoLandscape);
|
||||||
if (playModel != PLAY_MODEL_DEF && !url.contains(videoFps[0] + ".flv")) {
|
if (playModel != PLAY_MODEL_DEF && !url.contains(videoFps[0] + ".flv")) {
|
||||||
mPlayer.setViewResizeMode(landscape == VIDEO_VERTICAL);
|
mPlayer.setViewResizeMode(landscape == VIDEO_VERTICAL);
|
||||||
@ -690,7 +680,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
|||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void onUpdata(String str) {
|
public void onUpdata(String str) {
|
||||||
if ("UsertoRY".equals(str)) {
|
if ("UsertoRY".equals(str)) {
|
||||||
DialogUitl.showSimpleDialog(mContext,mContext.getString(R.string.mic_tag), new DialogUitl.SimpleCallback() {
|
DialogUitl.showSimpleDialog(mContext, mContext.getString(R.string.mic_tag), new DialogUitl.SimpleCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onConfirmClick(Dialog dialog, String content) {
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
UsertoRY();
|
UsertoRY();
|
||||||
@ -700,7 +690,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
|||||||
DialogUitl.Builder builder = new DialogUitl.Builder(mContext)
|
DialogUitl.Builder builder = new DialogUitl.Builder(mContext)
|
||||||
.setContent("邀請您進行語音連麥")
|
.setContent("邀請您進行語音連麥")
|
||||||
.setTitle(mLiveBean.getUserNiceName())
|
.setTitle(mLiveBean.getUserNiceName())
|
||||||
.setConfrimString("接受")
|
.setConfirmString("接受")
|
||||||
.setCancelString("拒絕")
|
.setCancelString("拒絕")
|
||||||
.setView(R.layout.dialog_live_mic_invite)
|
.setView(R.layout.dialog_live_mic_invite)
|
||||||
.setClickCallback(new DialogUitl.SimpleCallback() {
|
.setClickCallback(new DialogUitl.SimpleCallback() {
|
||||||
@ -886,13 +876,13 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
|||||||
.asCustom(liveClarityCustomPopup)
|
.asCustom(liveClarityCustomPopup)
|
||||||
.show();
|
.show();
|
||||||
} else if (event.getType() == LiveAudienceEvent.LiveAudienceType.FONT_SIZE) {
|
} else if (event.getType() == LiveAudienceEvent.LiveAudienceType.FONT_SIZE) {
|
||||||
int fount=0;
|
int fount = 0;
|
||||||
try {
|
try {
|
||||||
fount=Integer.parseInt(SpUtil.getStringValue("pd_live_room_fount_size"));
|
fount = Integer.parseInt(SpUtil.getStringValue("pd_live_room_fount_size"));
|
||||||
}catch (Exception ignored){
|
} catch (Exception ignored) {
|
||||||
|
|
||||||
}
|
}
|
||||||
new LiveFontSizeSettingDialog(mContext,fount).setOnItemClickListener(new OnItemClickListener<Integer>() {
|
new LiveFontSizeSettingDialog(mContext, fount).setOnItemClickListener(new OnItemClickListener<Integer>() {
|
||||||
@Override
|
@Override
|
||||||
public void onItemClick(Integer bean, int position) {
|
public void onItemClick(Integer bean, int position) {
|
||||||
EventBus.getDefault().post(new LiveAudienceEvent()
|
EventBus.getDefault().post(new LiveAudienceEvent()
|
||||||
|
@ -29,7 +29,6 @@ import com.yunbao.common.utils.L;
|
|||||||
import com.yunbao.common.utils.ProcessImageUtil;
|
import com.yunbao.common.utils.ProcessImageUtil;
|
||||||
import com.yunbao.common.utils.StringUtil;
|
import com.yunbao.common.utils.StringUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
|
||||||
import com.yunbao.common.views.AbsViewHolder;
|
import com.yunbao.common.views.AbsViewHolder;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.live.activity.LiveActivity;
|
import com.yunbao.live.activity.LiveActivity;
|
||||||
@ -231,7 +230,7 @@ public class LiveReadyRyViewHolder extends AbsViewHolder implements View.OnClick
|
|||||||
new DialogUitl.Builder(mContext)
|
new DialogUitl.Builder(mContext)
|
||||||
.setContent(mContext.getString(R.string.live_location_close_3))
|
.setContent(mContext.getString(R.string.live_location_close_3))
|
||||||
.setCancelable(true)
|
.setCancelable(true)
|
||||||
.setConfrimString(mContext.getString(R.string.live_location_close_2))
|
.setConfirmString(mContext.getString(R.string.live_location_close_2))
|
||||||
.setClickCallback(new DialogUitl.SimpleCallback() {
|
.setClickCallback(new DialogUitl.SimpleCallback() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -41,7 +41,6 @@ import com.yunbao.common.utils.L;
|
|||||||
import com.yunbao.common.utils.ProcessImageUtil;
|
import com.yunbao.common.utils.ProcessImageUtil;
|
||||||
import com.yunbao.common.utils.StringUtil;
|
import com.yunbao.common.utils.StringUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
|
||||||
import com.yunbao.common.views.AbsViewHolder;
|
import com.yunbao.common.views.AbsViewHolder;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.live.activity.LiveActivity;
|
import com.yunbao.live.activity.LiveActivity;
|
||||||
@ -255,7 +254,7 @@ public class LiveReadyViewHolder extends AbsViewHolder implements View.OnClickLi
|
|||||||
new DialogUitl.Builder(mContext)
|
new DialogUitl.Builder(mContext)
|
||||||
.setContent(mContext.getString(R.string.live_location_close_3))
|
.setContent(mContext.getString(R.string.live_location_close_3))
|
||||||
.setCancelable(true)
|
.setCancelable(true)
|
||||||
.setConfrimString(mContext.getString(R.string.live_location_close_2))
|
.setConfirmString(mContext.getString(R.string.live_location_close_2))
|
||||||
.setClickCallback(new DialogUitl.SimpleCallback() {
|
.setClickCallback(new DialogUitl.SimpleCallback() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -75,6 +75,7 @@ import com.yunbao.common.bean.LiveAnchorSayModel;
|
|||||||
import com.yunbao.common.bean.LiveBean;
|
import com.yunbao.common.bean.LiveBean;
|
||||||
import com.yunbao.common.bean.LiveGiftBean;
|
import com.yunbao.common.bean.LiveGiftBean;
|
||||||
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
||||||
|
import com.yunbao.common.bean.LiveRoomVoteModel;
|
||||||
import com.yunbao.common.bean.LiveUserGiftBean;
|
import com.yunbao.common.bean.LiveUserGiftBean;
|
||||||
import com.yunbao.common.bean.LiveUserMailBoxModel;
|
import com.yunbao.common.bean.LiveUserMailBoxModel;
|
||||||
import com.yunbao.common.bean.MsgModel;
|
import com.yunbao.common.bean.MsgModel;
|
||||||
@ -87,6 +88,7 @@ import com.yunbao.common.bean.TaskModel;
|
|||||||
import com.yunbao.common.bean.UserBean;
|
import com.yunbao.common.bean.UserBean;
|
||||||
import com.yunbao.common.bean.WishModel;
|
import com.yunbao.common.bean.WishModel;
|
||||||
import com.yunbao.common.bean.XydCompleteModel;
|
import com.yunbao.common.bean.XydCompleteModel;
|
||||||
|
import com.yunbao.common.event.AllServerNotifyEvent;
|
||||||
import com.yunbao.common.event.AnchorInfoEvent;
|
import com.yunbao.common.event.AnchorInfoEvent;
|
||||||
import com.yunbao.common.event.CustomFullServiceNotifyEvent;
|
import com.yunbao.common.event.CustomFullServiceNotifyEvent;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
@ -99,6 +101,7 @@ import com.yunbao.common.interfaces.CommonCallback;
|
|||||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||||
import com.yunbao.common.manager.IMLoginManager;
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
import com.yunbao.common.manager.RandomPkManager;
|
import com.yunbao.common.manager.RandomPkManager;
|
||||||
|
import com.yunbao.common.utils.AppManager;
|
||||||
import com.yunbao.common.utils.Bus;
|
import com.yunbao.common.utils.Bus;
|
||||||
import com.yunbao.common.utils.DeviceUtils;
|
import com.yunbao.common.utils.DeviceUtils;
|
||||||
import com.yunbao.common.utils.DialogUitl;
|
import com.yunbao.common.utils.DialogUitl;
|
||||||
@ -148,6 +151,7 @@ import com.yunbao.live.dialog.LiveHDDialogFragment;
|
|||||||
import com.yunbao.live.dialog.LiveUserAnchorMailBoxWebInfoPopDialog;
|
import com.yunbao.live.dialog.LiveUserAnchorMailBoxWebInfoPopDialog;
|
||||||
import com.yunbao.live.dialog.LiveUserDialogFragment;
|
import com.yunbao.live.dialog.LiveUserDialogFragment;
|
||||||
import com.yunbao.live.dialog.LiveWishListDialogFragment4Audience;
|
import com.yunbao.live.dialog.LiveWishListDialogFragment4Audience;
|
||||||
|
import com.yunbao.live.event.LiveAnchorEvent;
|
||||||
import com.yunbao.live.event.LiveAudienceEvent;
|
import com.yunbao.live.event.LiveAudienceEvent;
|
||||||
import com.yunbao.live.event.LiveRoomChangeEvent;
|
import com.yunbao.live.event.LiveRoomChangeEvent;
|
||||||
import com.yunbao.live.http.LiveHttpConsts;
|
import com.yunbao.live.http.LiveHttpConsts;
|
||||||
@ -157,6 +161,7 @@ import com.yunbao.live.presenter.LiveEnterRoomAnimPresenter;
|
|||||||
import com.yunbao.live.presenter.LiveGiftAnimPresenter;
|
import com.yunbao.live.presenter.LiveGiftAnimPresenter;
|
||||||
import com.yunbao.live.presenter.LiveLightAnimPresenter;
|
import com.yunbao.live.presenter.LiveLightAnimPresenter;
|
||||||
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
||||||
|
import com.yunbao.live.utils.LiveRoomVoteManager;
|
||||||
import com.yunbao.live.utils.LiveTextRender;
|
import com.yunbao.live.utils.LiveTextRender;
|
||||||
import com.yunbao.live.utils.LoadDian9TuUtil;
|
import com.yunbao.live.utils.LoadDian9TuUtil;
|
||||||
|
|
||||||
@ -352,6 +357,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
private TextView mAnchorSayText;
|
private TextView mAnchorSayText;
|
||||||
private ImageView mAnchorSayHide;
|
private ImageView mAnchorSayHide;
|
||||||
//----!主播说组件---//
|
//----!主播说组件---//
|
||||||
|
//----投票组件---//
|
||||||
|
private LiveRoomVoteManager voteManager;
|
||||||
|
//----!投票组件---//
|
||||||
private Banner topBanner1, topBanner2;//心愿单&联系方式
|
private Banner topBanner1, topBanner2;//心愿单&联系方式
|
||||||
public SVGAImageView svga_new_user_gif, svga_new_user_double, svga_new_user_follow;
|
public SVGAImageView svga_new_user_gif, svga_new_user_double, svga_new_user_follow;
|
||||||
private String mAnchorName;//主播名字
|
private String mAnchorName;//主播名字
|
||||||
@ -996,6 +1004,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
};
|
};
|
||||||
|
|
||||||
mRoot = (ViewGroup) findViewById(R.id.root);
|
mRoot = (ViewGroup) findViewById(R.id.root);
|
||||||
|
voteManager = new LiveRoomVoteManager(mContext, mRoot);
|
||||||
mAvatar = (ImageView) findViewById(R.id.avatar);
|
mAvatar = (ImageView) findViewById(R.id.avatar);
|
||||||
|
|
||||||
mLevelAnchor = (ImageView) findViewById(R.id.level_anchor);
|
mLevelAnchor = (ImageView) findViewById(R.id.level_anchor);
|
||||||
@ -1085,10 +1094,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
RelativeLayout.LayoutParams msgLayoutLayoutParams = (RelativeLayout.LayoutParams) msgLayout.getLayoutParams();
|
RelativeLayout.LayoutParams msgLayoutLayoutParams = (RelativeLayout.LayoutParams) msgLayout.getLayoutParams();
|
||||||
msgLayoutLayoutParams.topMargin = topMargin + DpUtil.dp2px(50);
|
msgLayoutLayoutParams.topMargin = topMargin + DpUtil.dp2px(50);
|
||||||
msgLayout.setLayoutParams(msgLayoutLayoutParams);
|
msgLayout.setLayoutParams(msgLayoutLayoutParams);
|
||||||
|
voteManager.setMarginPosition(topMargin + DpUtil.dp2px(50));
|
||||||
|
|
||||||
RelativeLayout.LayoutParams params1 = (RelativeLayout.LayoutParams)
|
RelativeLayout.LayoutParams params1 = (RelativeLayout.LayoutParams)
|
||||||
mChatRecyclerView.getLayoutParams();
|
mChatRecyclerView.getLayoutParams();
|
||||||
params1.topMargin = 180;
|
params1.topMargin = DpUtil.dp2px(65);
|
||||||
mChatRecyclerView.setLayoutParams(params1);
|
mChatRecyclerView.setLayoutParams(params1);
|
||||||
|
|
||||||
mChatRecyclerView.setHasFixedSize(true);
|
mChatRecyclerView.setHasFixedSize(true);
|
||||||
@ -1475,6 +1485,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
if (!IMLoginManager.get(mContext).hintChat()) {
|
if (!IMLoginManager.get(mContext).hintChat()) {
|
||||||
msgLayout.setVisibility(View.VISIBLE);
|
msgLayout.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
AppManager.runDebugCode(() -> msgLayout.setVisibility(View.GONE));
|
||||||
|
voteManager.hide();
|
||||||
if (d_pk_view != null) {
|
if (d_pk_view != null) {
|
||||||
d_pk_view.setVisibility(View.GONE);
|
d_pk_view.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
@ -1501,6 +1513,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
mBannerList4.clear();
|
mBannerList4.clear();
|
||||||
if (mTopBannerList != null) {
|
if (mTopBannerList != null) {
|
||||||
mTopBannerList.clear();
|
mTopBannerList.clear();
|
||||||
|
mTopBannerList = null;
|
||||||
}
|
}
|
||||||
sayModel = null;
|
sayModel = null;
|
||||||
updataCleanMic();
|
updataCleanMic();
|
||||||
@ -1508,7 +1521,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
enterRoomLeave.setVisibility(View.GONE);
|
enterRoomLeave.setVisibility(View.GONE);
|
||||||
topBanner1.setVisibility(View.GONE);
|
topBanner1.setVisibility(View.GONE);
|
||||||
topBanner2.setVisibility(View.GONE);
|
topBanner2.setVisibility(View.GONE);
|
||||||
|
topBanner1.update(mTopBannerList);
|
||||||
|
topBanner2.update(mTopBannerList);
|
||||||
removeDetailView();
|
removeDetailView();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2464,7 +2478,12 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
*/
|
*/
|
||||||
public void setRoomNum(String roomNum) {
|
public void setRoomNum(String roomNum) {
|
||||||
if (mID != null) {
|
if (mID != null) {
|
||||||
mID.setText(roomNum);
|
if (roomNum.contains("ID")){
|
||||||
|
mID.setText(roomNum);
|
||||||
|
}else {
|
||||||
|
mID.setText(String.format("ID:%s", roomNum));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3104,7 +3123,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
if (mContext instanceof LiveAudienceActivity) {
|
if (mContext instanceof LiveAudienceActivity) {
|
||||||
int type = 0;
|
int type = 0;
|
||||||
GuardUserModel model = new GuardUserModel();
|
GuardUserModel model = new GuardUserModel();
|
||||||
if (TextUtils.isEmpty(guardUserModel.getGuardType())) {
|
if (guardUserModel != null && TextUtils.isEmpty(guardUserModel.getGuardType())) {
|
||||||
type = Integer.parseInt(guardUserModel.getGuardType());
|
type = Integer.parseInt(guardUserModel.getGuardType());
|
||||||
}
|
}
|
||||||
if (chatBean.getGuardType() != 0 && chatBean.getGuardType() > type) {
|
if (chatBean.getGuardType() != 0 && chatBean.getGuardType() > type) {
|
||||||
@ -3664,11 +3683,31 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
public void setAnchorGoodNumber(String goodNumber) {
|
public void setAnchorGoodNumber(String goodNumber) {
|
||||||
if (!StringUtil.isEmpty(goodNumber) && !goodNumber.equals("0")) {
|
if (!StringUtil.isEmpty(goodNumber) && !goodNumber.equals("0")) {
|
||||||
mAnchorLayout.setBackgroundResource(R.drawable.bg_live_anchor_goodnum);
|
mAnchorLayout.setBackgroundResource(R.drawable.bg_live_anchor_goodnum);
|
||||||
mID.setText(goodNumber);
|
|
||||||
|
if (goodNumber.contains("ID")){
|
||||||
|
mID.setText(goodNumber);
|
||||||
|
}else {
|
||||||
|
mID.setText(String.format("ID:%s", goodNumber));
|
||||||
|
}
|
||||||
mGoodNumberIcon.setVisibility(View.VISIBLE);
|
mGoodNumberIcon.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void dismissVote(String msg, String data) {
|
||||||
|
voteManager.endTimerTask(data);
|
||||||
|
LiveChatBean bean = new LiveChatBean();
|
||||||
|
bean.setType(LiveChatBean.SYSTEM3_COLOR);
|
||||||
|
bean.setContent(data);
|
||||||
|
mLiveChatAdapter.insertItem(bean);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVoteData(LiveRoomVoteModel voteModel) {
|
||||||
|
Log.i("voteModel", voteModel.toString());
|
||||||
|
voteModel.setLiveUid(mLiveUid);
|
||||||
|
voteManager.setCreateVoteModel(voteModel);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private static class LiveRoomHandler extends Handler {
|
private static class LiveRoomHandler extends Handler {
|
||||||
|
|
||||||
private LiveRoomViewHolder mLiveRoomViewHolder;
|
private LiveRoomViewHolder mLiveRoomViewHolder;
|
||||||
@ -4232,6 +4271,35 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
|
public void updateSubForAnchor(LiveAnchorEvent event) {
|
||||||
|
if (mContext instanceof LiveAudienceActivity) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (event.getType() == LiveAnchorEvent.LiveAnchorType.VOTE_CREATE) {
|
||||||
|
voteManager.setCreateVoteModel((LiveRoomVoteModel) event.getObject());
|
||||||
|
} else if (event.getType() == LiveAnchorEvent.LiveAnchorType.VOTE_ANCHOR_END) {
|
||||||
|
LiveRoomVoteModel voteModel = JSONObject.parseObject(event.getObject().toString(), LiveRoomVoteModel.class);
|
||||||
|
Log.i(">>>", voteModel.toString());
|
||||||
|
String content = voteModel.getResult();
|
||||||
|
if (!StringUtil.isEmpty(voteModel.getOptionText())) {
|
||||||
|
content = voteModel.getResult().replace(voteModel.getOptionText(), "<font color='#FF8E43'>" + voteModel.getOptionText() + "</font>");
|
||||||
|
}
|
||||||
|
dismissVote(voteModel.getResult(), content);
|
||||||
|
} else if (event.getType() == LiveAnchorEvent.LiveAnchorType.VOTE_ANCHOR_UPDATE) {
|
||||||
|
LiveRoomVoteModel voteModel = new LiveRoomVoteModel();
|
||||||
|
JSONObject map = (JSONObject) event.getObject();
|
||||||
|
voteModel.setStatus(1);
|
||||||
|
voteModel.setLiveUid(mLiveUid);
|
||||||
|
voteModel.setContent(map.getString("question"));
|
||||||
|
voteModel.setAnswer1(map.getString("answer1"));
|
||||||
|
voteModel.setAnswer2(map.getString("answer2"));
|
||||||
|
voteModel.setAnswer1Num(map.getInteger("num1"));
|
||||||
|
voteModel.setAnswer2Num(map.getInteger("num2"));
|
||||||
|
setVoteData(voteModel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void updateSub(LiveAudienceEvent event) {
|
public void updateSub(LiveAudienceEvent event) {
|
||||||
switch (event.getType()) {
|
switch (event.getType()) {
|
||||||
@ -4337,6 +4405,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
// mLiveChatAdapter.insertItem(bean);
|
// mLiveChatAdapter.insertItem(bean);
|
||||||
if (mTopBannerList.size() == 0) {
|
if (mTopBannerList.size() == 0) {
|
||||||
topBanner1.setVisibility(View.GONE);
|
topBanner1.setVisibility(View.GONE);
|
||||||
|
topBanner2.setVisibility(View.GONE);
|
||||||
} else {
|
} else {
|
||||||
topBanner1.update(mTopBannerList);
|
topBanner1.update(mTopBannerList);
|
||||||
topBanner2.update(mTopBannerList);
|
topBanner2.update(mTopBannerList);
|
||||||
@ -4838,7 +4907,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
.setOnBannerClickListener(new OnBannerClickListener() {
|
.setOnBannerClickListener(new OnBannerClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onBannerClick(List datas, int position) {
|
public void onBannerClick(List datas, int position) {
|
||||||
if (datas.size() > 0) {
|
if (datas.size() > 0 && mTopBannerList != null && mTopBannerList.size() > 0) {
|
||||||
if (mTopBannerList.get(position).getType() == TopBannerCustomViewHolder.TYPE_CALL_ANCHOR) {
|
if (mTopBannerList.get(position).getType() == TopBannerCustomViewHolder.TYPE_CALL_ANCHOR) {
|
||||||
Dialog loading = DialogUitl.loadingDialog(mContext);
|
Dialog loading = DialogUitl.loadingDialog(mContext);
|
||||||
loading.show();
|
loading.show();
|
||||||
@ -4914,6 +4983,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
@Override
|
@Override
|
||||||
public void onBannerClick(List datas, int position) {
|
public void onBannerClick(List datas, int position) {
|
||||||
if (datas.size() > 0) {
|
if (datas.size() > 0) {
|
||||||
|
if (position >= mTopBannerList.size()) {
|
||||||
|
position = 0;
|
||||||
|
}
|
||||||
if (mTopBannerList.get(position).getType() == TopBannerCustomViewHolder.TYPE_CALL_ANCHOR) {
|
if (mTopBannerList.get(position).getType() == TopBannerCustomViewHolder.TYPE_CALL_ANCHOR) {
|
||||||
Dialog loading = DialogUitl.loadingDialog(mContext);
|
Dialog loading = DialogUitl.loadingDialog(mContext);
|
||||||
loading.show();
|
loading.show();
|
||||||
@ -4985,6 +5057,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateCallMe() {
|
private void updateCallMe() {
|
||||||
|
|
||||||
LiveNetManager.get(mContext)
|
LiveNetManager.get(mContext)
|
||||||
.getContactInfo(mLiveUid, new com.yunbao.common.http.base.HttpCallback<LiveAnchorCallMeModel>() {
|
.getContactInfo(mLiveUid, new com.yunbao.common.http.base.HttpCallback<LiveAnchorCallMeModel>() {
|
||||||
@Override
|
@Override
|
||||||
@ -5002,6 +5075,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
topBanner2.update(mTopBannerList);
|
topBanner2.update(mTopBannerList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -5030,4 +5104,15 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void blindBoxAllServerNotify(AllServerNotifyEvent event) {
|
||||||
|
LiveReceiveGiftBean receiveGiftBean = new LiveReceiveGiftBean();
|
||||||
|
receiveGiftBean.setBlindBox(true);
|
||||||
|
receiveGiftBean.setEvent(event);
|
||||||
|
if (mLiveGiftAnimPresenter == null) {
|
||||||
|
mLiveGiftAnimPresenter = new LiveGiftAnimPresenter(mContext, mContentView, mGifImageView, mSVGAImageView, mLiveGiftPrizePoolContainer, windowManager);
|
||||||
|
}
|
||||||
|
mLiveGiftAnimPresenter.showSendGiftAnimAllServer2(receiveGiftBean);
|
||||||
|
mLiveGiftAnimPresenter.setLiveUidStream(mLiveUid, mStream);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.yunbao.live.views;
|
package com.yunbao.live.views;
|
||||||
|
|
||||||
import static com.yunbao.live.views.LiveRoomViewHolder.isStayRoomfive;
|
import static com.yunbao.live.views.LiveRoomViewHolder.isStayRoomfive;
|
||||||
|
import static com.yunbao.live.views.LiveRoomViewHolder.mLiveUid;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
@ -43,8 +44,10 @@ import com.yunbao.common.bean.UserBean;
|
|||||||
import com.yunbao.common.bean.WishModel;
|
import com.yunbao.common.bean.WishModel;
|
||||||
import com.yunbao.common.bean.XydCompleteModel;
|
import com.yunbao.common.bean.XydCompleteModel;
|
||||||
import com.yunbao.common.custom.MyViewPager;
|
import com.yunbao.common.custom.MyViewPager;
|
||||||
|
import com.yunbao.common.event.AllServerNotifyEvent;
|
||||||
import com.yunbao.common.event.FollowEvent;
|
import com.yunbao.common.event.FollowEvent;
|
||||||
import com.yunbao.common.event.LiveFloatEvent;
|
import com.yunbao.common.event.LiveFloatEvent;
|
||||||
|
import com.yunbao.common.event.SendBlindGiftEvent;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.http.CommonHttpConsts;
|
import com.yunbao.common.http.CommonHttpConsts;
|
||||||
import com.yunbao.common.http.CommonHttpUtil;
|
import com.yunbao.common.http.CommonHttpUtil;
|
||||||
@ -269,101 +272,107 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Log.e("ImgLoader1", data.getAvatar());
|
try {
|
||||||
if (mLiveRyLinkMicPkPresenter != null) {
|
|
||||||
mLiveRyLinkMicPkPresenter.clearData();
|
|
||||||
mLiveRyLinkMicPkPresenter.release();
|
|
||||||
mLiveRyLinkMicPkPresenter = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
mLiveBean = data;
|
Log.e("ImgLoader1", data.getAvatar());
|
||||||
mLiveSDK = liveSdk;
|
if (mLiveRyLinkMicPkPresenter != null) {
|
||||||
mLiveType = liveType;
|
mLiveRyLinkMicPkPresenter.clearData();
|
||||||
mLiveTypeVal = liveTypeVal;
|
mLiveRyLinkMicPkPresenter.release();
|
||||||
liveID = data.getUid();
|
mLiveRyLinkMicPkPresenter = null;
|
||||||
Bus.get().post(new LiveAudienceEvent()
|
}
|
||||||
.setType(LiveAudienceEvent.LiveAudienceType.OPEN_PARAMETERS)
|
|
||||||
.setParametersModel(openParametersModel
|
mLiveBean = data;
|
||||||
.setmLiveType(mLiveType)
|
mLiveSDK = liveSdk;
|
||||||
.setmLiveTypeVal(mLiveTypeVal)));
|
mLiveType = liveType;
|
||||||
loading.setVisibility(View.VISIBLE);
|
mLiveTypeVal = liveTypeVal;
|
||||||
ImgLoader.displayBlurLive(mContext, mLiveBean.getAvatar(), ivBg);
|
liveID = data.getUid();
|
||||||
AnimationDrawable frameAnimation = (AnimationDrawable) ivLoading.getBackground();
|
Bus.get().post(new LiveAudienceEvent()
|
||||||
frameAnimation.start();
|
.setType(LiveAudienceEvent.LiveAudienceType.OPEN_PARAMETERS)
|
||||||
liveHandler.removeCallbacks(loadRunnableGone);
|
.setParametersModel(openParametersModel
|
||||||
if (mLivePlayViewHolder == null) {
|
.setmLiveType(mLiveType)
|
||||||
mLivePlayViewHolder = new LivePlayRyViewHolder(mContext, playContainer, 1);
|
.setmLiveTypeVal(mLiveTypeVal)));
|
||||||
mLiveRoomViewHolder = new LiveRoomViewHolder(false, 1, mContext, mContainer, mSecondPage.findViewById(R.id.gift_gif), mSecondPage.findViewById(R.id.gift_svga), mContainerWrap, mContext.getWindowManager());
|
loading.setVisibility(View.VISIBLE);
|
||||||
mLiveAudienceViewHolder = new LiveAudienceViewHolder(mContext, mContainer);
|
ImgLoader.displayBlurLive(mContext, mLiveBean.getAvatar(), ivBg);
|
||||||
mLiveLinkMicPresenter = new LiveLinkMicPresenter(mContext, mLivePlayViewHolder, false, mLiveSDK, mLiveAudienceViewHolder.getContentView());
|
AnimationDrawable frameAnimation = (AnimationDrawable) ivLoading.getBackground();
|
||||||
mLiveLinkMicAnchorPresenter = new LiveLinkMicAnchorPresenter(mContext, mLivePlayViewHolder, false, mLiveSDK, null);
|
frameAnimation.start();
|
||||||
mLiveRyLinkMicPkPresenter = new LiveRyLinkMicPkPresenter(mContext, mLivePlayViewHolder, false, null);
|
liveHandler.removeCallbacks(loadRunnableGone);
|
||||||
mLivePlayViewHolder.addToParent();
|
if (mLivePlayViewHolder == null) {
|
||||||
mLivePlayViewHolder.subscribeActivityLifeCycle();
|
mLivePlayViewHolder = new LivePlayRyViewHolder(mContext, playContainer, 1);
|
||||||
mLivePlayViewHolder.setLoadViewListener(new LiveRoomPlayViewHolder.LoadingListener() {
|
mLiveRoomViewHolder = new LiveRoomViewHolder(false, 1, mContext, mContainer, mSecondPage.findViewById(R.id.gift_gif), mSecondPage.findViewById(R.id.gift_svga), mContainerWrap, mContext.getWindowManager());
|
||||||
|
mLiveAudienceViewHolder = new LiveAudienceViewHolder(mContext, mContainer);
|
||||||
|
mLiveLinkMicPresenter = new LiveLinkMicPresenter(mContext, mLivePlayViewHolder, false, mLiveSDK, mLiveAudienceViewHolder.getContentView());
|
||||||
|
mLiveLinkMicAnchorPresenter = new LiveLinkMicAnchorPresenter(mContext, mLivePlayViewHolder, false, mLiveSDK, null);
|
||||||
|
mLiveRyLinkMicPkPresenter = new LiveRyLinkMicPkPresenter(mContext, mLivePlayViewHolder, false, null);
|
||||||
|
mLivePlayViewHolder.addToParent();
|
||||||
|
mLivePlayViewHolder.subscribeActivityLifeCycle();
|
||||||
|
mLivePlayViewHolder.setLoadViewListener(new LiveRoomPlayViewHolder.LoadingListener() {
|
||||||
|
@Override
|
||||||
|
public void onPlayer() {
|
||||||
|
liveHandler.postDelayed(loadRunnableGone, 350);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
mLiveRoomViewHolder.subscribeActivityLifeCycle();
|
||||||
|
mLiveAudienceViewHolder.addToParent();
|
||||||
|
mLiveRoomViewHolder.addToParent();
|
||||||
|
mLiveAudienceViewHolder.subscribeActivityLifeCycle();
|
||||||
|
} else {
|
||||||
|
mLivePlayViewHolder.setLiveBeanLandscape(1);
|
||||||
|
mLiveLinkMicPresenter.setLiveSdk(mLiveSDK);
|
||||||
|
mLiveLinkMicAnchorPresenter.setLiveSdk(mLiveSDK);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mLiveRyLinkMicPkPresenter == null) {
|
||||||
|
mLiveRyLinkMicPkPresenter = new LiveRyLinkMicPkPresenter(mContext, mLivePlayViewHolder, false, null);
|
||||||
|
}
|
||||||
|
//去除主播离开画面
|
||||||
|
if (LivePlayKsyViewHolder.leave != null) {
|
||||||
|
LivePlayKsyViewHolder.leave.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
if (LivePlayRyViewHolder.leave != null) {
|
||||||
|
LivePlayRyViewHolder.leave.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
//直播间背景
|
||||||
|
|
||||||
|
ImgLoader.displayBlurLive(mContext, mLiveBean.getAvatar(), liveBack, 400, 600);
|
||||||
|
|
||||||
|
mask.setVisibility(View.VISIBLE);
|
||||||
|
mLivePlayViewHolder.clearFrame();
|
||||||
|
mLivePlayViewHolder.setLiveBean(mLiveBean);
|
||||||
|
mLivePlayViewHolder.removeDetailView();
|
||||||
|
mLivePlayViewHolder.setCover(mLiveBean.getAvatar());
|
||||||
|
mLivePlayViewHolder.setLiveBeanLandscape(mLiveBean.getLandscape());
|
||||||
|
mLiveRoomViewHolder.changeMessageLandscape(mLiveBean.getLandscape());
|
||||||
|
//mLivePlayViewHolder.play(mLiveBean.getPull(), LiveRoomPlayViewHolder.PLAY_MODEL_DEF);
|
||||||
|
mLivePlayViewHolder.setOnMicCallback(new LiveRoomPlayViewHolder.OnMicCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onPlayer() {
|
public void onMikUpdate() {
|
||||||
liveHandler.postDelayed(loadRunnableGone, 350);
|
if (mContext instanceof LiveActivity) {
|
||||||
|
((LiveActivity) mContext).showMicList(mLiveBean.getUid(), mLiveRoomViewHolder);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
mLiveRoomViewHolder.subscribeActivityLifeCycle();
|
mLiveRoomViewHolder.resetView();
|
||||||
mLiveAudienceViewHolder.addToParent();
|
enterRoomModel.clear();
|
||||||
mLiveRoomViewHolder.addToParent();
|
enterRoomLeaveHandler.removeCallbacks(enterRoomLeaveRunnable);
|
||||||
mLiveAudienceViewHolder.subscribeActivityLifeCycle();
|
mLiveRoomViewHolder.setAvatar(data.getAvatar());
|
||||||
} else {
|
mLiveRoomViewHolder.setAnchorLevel(data.getLevelAnchor());
|
||||||
mLivePlayViewHolder.setLiveBeanLandscape(1);
|
mLiveRoomViewHolder.setName(data.getUserNiceName());
|
||||||
mLiveLinkMicPresenter.setLiveSdk(mLiveSDK);
|
mLiveRoomViewHolder.setRoomNum(data.getLiangNameTip());
|
||||||
mLiveLinkMicAnchorPresenter.setLiveSdk(mLiveSDK);
|
mLiveRoomViewHolder.setTitle(data.getTitle());
|
||||||
}
|
mLiveRoomViewHolder.setAnchorGoodNumber(data.getGoodNum());
|
||||||
|
mLiveRoomViewHolder.clearGuardIcon();
|
||||||
if (mLiveRyLinkMicPkPresenter == null) {
|
mLiveRoomViewHolder.clearChat();
|
||||||
mLiveRyLinkMicPkPresenter = new LiveRyLinkMicPkPresenter(mContext, mLivePlayViewHolder, false, null);
|
mLiveRoomViewHolder.releaseGift();
|
||||||
}
|
mLiveRyLinkMicPkPresenter.setLiveUid(data.getUid(), "");
|
||||||
//去除主播离开画面
|
mSocketRyClient = new SocketRyClient(mLiveBean.getUid(), PortraitLiveManager.this, mContext);
|
||||||
if (LivePlayKsyViewHolder.leave != null) {
|
if (mLiveLinkMicPresenter != null) {
|
||||||
LivePlayKsyViewHolder.leave.setVisibility(View.GONE);
|
mLiveLinkMicPresenter.setSocketClient(mSocketClient);
|
||||||
}
|
|
||||||
if (LivePlayRyViewHolder.leave != null) {
|
|
||||||
LivePlayRyViewHolder.leave.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
//直播间背景
|
|
||||||
|
|
||||||
ImgLoader.displayBlurLive(mContext, mLiveBean.getAvatar(), liveBack, 400, 600);
|
|
||||||
|
|
||||||
mask.setVisibility(View.VISIBLE);
|
|
||||||
mLivePlayViewHolder.clearFrame();
|
|
||||||
mLivePlayViewHolder.setLiveBean(mLiveBean);
|
|
||||||
mLivePlayViewHolder.removeDetailView();
|
|
||||||
mLivePlayViewHolder.setCover(mLiveBean.getAvatar());
|
|
||||||
mLivePlayViewHolder.setLiveBeanLandscape(mLiveBean.getLandscape());
|
|
||||||
mLiveRoomViewHolder.changeMessageLandscape(mLiveBean.getLandscape());
|
|
||||||
//mLivePlayViewHolder.play(mLiveBean.getPull(), LiveRoomPlayViewHolder.PLAY_MODEL_DEF);
|
|
||||||
mLivePlayViewHolder.setOnMicCallback(new LiveRoomPlayViewHolder.OnMicCallback() {
|
|
||||||
@Override
|
|
||||||
public void onMikUpdate() {
|
|
||||||
if (mContext instanceof LiveActivity) {
|
|
||||||
((LiveActivity) mContext).showMicList(mLiveBean.getUid(), mLiveRoomViewHolder);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
enterRoomNew();
|
||||||
mLiveRoomViewHolder.resetView();
|
|
||||||
enterRoomModel.clear();
|
} catch (Exception e) {
|
||||||
enterRoomLeaveHandler.removeCallbacks(enterRoomLeaveRunnable);
|
e.printStackTrace();
|
||||||
mLiveRoomViewHolder.setAvatar(data.getAvatar());
|
|
||||||
mLiveRoomViewHolder.setAnchorLevel(data.getLevelAnchor());
|
|
||||||
mLiveRoomViewHolder.setName(data.getUserNiceName());
|
|
||||||
mLiveRoomViewHolder.setRoomNum(data.getLiangNameTip());
|
|
||||||
mLiveRoomViewHolder.setTitle(data.getTitle());
|
|
||||||
mLiveRoomViewHolder.setAnchorGoodNumber(data.getGoodNum());
|
|
||||||
mLiveRoomViewHolder.clearGuardIcon();
|
|
||||||
mLiveRoomViewHolder.clearChat();
|
|
||||||
mLiveRoomViewHolder.releaseGift();
|
|
||||||
mLiveRyLinkMicPkPresenter.setLiveUid(data.getUid(), "");
|
|
||||||
mSocketRyClient = new SocketRyClient(mLiveBean.getUid(), PortraitLiveManager.this, mContext);
|
|
||||||
if (mLiveLinkMicPresenter != null) {
|
|
||||||
mLiveLinkMicPresenter.setSocketClient(mSocketClient);
|
|
||||||
}
|
}
|
||||||
enterRoomNew();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -497,6 +506,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
|||||||
//初始化顶部banner
|
//初始化顶部banner
|
||||||
mLiveRoomViewHolder.initTopBanner();
|
mLiveRoomViewHolder.initTopBanner();
|
||||||
mLiveRoomViewHolder.updateTopBanner();
|
mLiveRoomViewHolder.updateTopBanner();
|
||||||
|
mLiveRoomViewHolder.setVoteData(data.getEnterRoomInfo().getVoteModel());
|
||||||
|
|
||||||
isattention = Integer.parseInt(data.getEnterRoomInfo().getIsattention());
|
isattention = Integer.parseInt(data.getEnterRoomInfo().getIsattention());
|
||||||
if (isattention == 0) {
|
if (isattention == 0) {
|
||||||
@ -1112,21 +1122,53 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSendGift(LiveReceiveGiftBean bean) {
|
public void onSendGift(LiveReceiveGiftBean bean, SendBlindGiftEvent event) {
|
||||||
//购买守护
|
if (event != null) {
|
||||||
if (bean.ismTypeBuyGuard()) {
|
LiveChatBean liveChatBean = null;
|
||||||
if (mLiveRoomViewHolder != null) {
|
if (!TextUtils.isEmpty(event.isBlindBoxStatus()) && TextUtils.equals(event.isBlindBoxStatus(), "true")) {
|
||||||
mLiveRoomViewHolder.showGuardGifMessage(bean);
|
if (!TextUtils.isEmpty(event.getDressName()) && !TextUtils.isEmpty(event.getDressMsg())) {
|
||||||
|
liveChatBean = new LiveChatBean();
|
||||||
|
liveChatBean.setUserNiceName(event.getUserNiceName());
|
||||||
|
liveChatBean.setType(LiveChatBean.BLIND_BOX);
|
||||||
|
liveChatBean.setGiftName(event.getDressName());
|
||||||
|
liveChatBean.setContent(event.getDressMsg());
|
||||||
|
}
|
||||||
|
//插入盲盒礼物消息
|
||||||
|
bean.getLiveChatBean().setType(LiveChatBean.BLIND_BOX);
|
||||||
|
bean.getLiveChatBean().setContent(event.getGiftMsg());
|
||||||
|
bean.getLiveChatBean().setGiftName(event.getGiftname());
|
||||||
|
bean.getLiveChatBean().setUserNiceName(event.getUserNiceName());
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
|
|
||||||
if (mLiveRoomViewHolder != null) {
|
if (mLiveRoomViewHolder != null) {
|
||||||
if (bean.getmLiveUId().equals(bean.getRoomnum())) {
|
if (bean.getmLiveUId().equals(bean.getRoomnum())) {
|
||||||
|
if (liveChatBean != null) {
|
||||||
|
mLiveRoomViewHolder.insertChat(liveChatBean, 1);
|
||||||
|
}
|
||||||
mLiveRoomViewHolder.insertChat(bean.getLiveChatBean(), 1);
|
mLiveRoomViewHolder.insertChat(bean.getLiveChatBean(), 1);
|
||||||
}
|
}
|
||||||
mLiveRoomViewHolder.showGiftMessage(bean, false);
|
mLiveRoomViewHolder.showGiftMessage(bean, false);
|
||||||
mLiveRoomViewHolder.updataWishList(bean.getGiftId(), bean.getGiftCount());
|
mLiveRoomViewHolder.updataWishList(bean.getGiftId(), bean.getGiftCount());
|
||||||
}
|
}
|
||||||
|
Bus.get().post(event);
|
||||||
|
} else {
|
||||||
|
//购买守护
|
||||||
|
if (bean.ismTypeBuyGuard()) {
|
||||||
|
if (mLiveRoomViewHolder != null) {
|
||||||
|
mLiveRoomViewHolder.showGuardGifMessage(bean);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
|
if (mLiveRoomViewHolder != null) {
|
||||||
|
if (bean.getmLiveUId().equals(bean.getRoomnum())) {
|
||||||
|
mLiveRoomViewHolder.insertChat(bean.getLiveChatBean(), 1);
|
||||||
|
}
|
||||||
|
mLiveRoomViewHolder.showGiftMessage(bean, false);
|
||||||
|
mLiveRoomViewHolder.updataWishList(bean.getGiftId(), bean.getGiftCount());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1166,6 +1208,17 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onEndPk(long leftUid, long rightUid, long left, long right, LivePKUserListBean bean) {
|
||||||
|
if (mLiveRyLinkMicPkPresenter != null) {
|
||||||
|
if (mLiveUid.equals(leftUid + "")) {
|
||||||
|
mLiveRyLinkMicPkPresenter.onPkProgressEnd(left, right, bean);
|
||||||
|
} else {
|
||||||
|
mLiveRyLinkMicPkPresenter.onPkProgressEnd(right, left, bean);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSendDanMu(LiveDanMuBean bean) {
|
public void onSendDanMu(LiveDanMuBean bean) {
|
||||||
if (mLiveRoomViewHolder != null) {
|
if (mLiveRoomViewHolder != null) {
|
||||||
@ -1962,4 +2015,10 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
|||||||
mLiveRoomViewHolder.showXydComplete(model, false, liveReceiveGiftBean);
|
mLiveRoomViewHolder.showXydComplete(model, false, liveReceiveGiftBean);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void blindBoxAllServerNotify(AllServerNotifyEvent event) {
|
||||||
|
if (mLiveRoomViewHolder != null) {
|
||||||
|
mLiveRoomViewHolder.blindBoxAllServerNotify(event);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
12
live/src/main/res/anim/view_live_anchor_vote_in.xml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
<translate
|
||||||
|
android:duration="300"
|
||||||
|
android:fromXDelta="100%"
|
||||||
|
android:toXDelta="0" />
|
||||||
|
<alpha
|
||||||
|
android:duration="300"
|
||||||
|
android:fromAlpha="0"
|
||||||
|
android:toAlpha="1" />
|
||||||
|
</set>
|
12
live/src/main/res/anim/view_live_anchor_vote_out.xml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
<translate
|
||||||
|
android:duration="300"
|
||||||
|
android:fromXDelta="0"
|
||||||
|
android:toXDelta="100%" />
|
||||||
|
<alpha
|
||||||
|
android:duration="300"
|
||||||
|
android:fromAlpha="1"
|
||||||
|
android:toAlpha="0.2" />
|
||||||
|
</set>
|
9
live/src/main/res/drawable/background_292929.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>
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<corners android:radius="10dp" />
|
||||||
|
<solid android:color="#292929" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</selector>
|
9
live/src/main/res/drawable/background_cc000.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>
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<corners android:radius="15dp" />
|
||||||
|
<solid android:color="#cc000000" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</selector>
|
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item>
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<corners android:radius="5dp" />
|
||||||
|
<solid android:color="#cc000000" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</selector>
|
5
live/src/main/res/drawable/bg_all_server_336cf7.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||||
|
<corners android:radius="13dp" />
|
||||||
|
<solid android:color="#336CF7" />
|
||||||
|
</shape>
|
5
live/src/main/res/drawable/bg_all_server_fcb50e.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||||
|
<corners android:radius="13dp" />
|
||||||
|
<solid android:color="#FCB50E" />
|
||||||
|
</shape>
|
6
live/src/main/res/drawable/bg_all_server_fd5a9d.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<corners android:radius="13dp" />
|
||||||
|
<solid android:color="#FD5A9D" />
|
||||||
|
</shape>
|
10
live/src/main/res/drawable/bg_live_room_vote_hide.xml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:width="9dp" android:height="22dp">
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<solid android:color="#ffff2b75" />
|
||||||
|
<gradient android:type="linear" android:useLevel="true" android:startColor="#ff6170ff" android:endColor="#ff7cd6ff" android:angle="45" />
|
||||||
|
<corners android:topLeftRadius="5dp" android:topRightRadius="5dp" android:bottomLeftRadius="5dp" android:bottomRightRadius="5dp" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</selector>
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 4.3 KiB |
36
live/src/main/res/drawable/live_room_qa_progress.xml
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
<!--背景色从左到右色值,渐变-->
|
||||||
|
<item android:id="@android:id/background">
|
||||||
|
|
||||||
|
<shape>
|
||||||
|
<corners android:radius="5dp" />
|
||||||
|
<gradient
|
||||||
|
android:angle="0"
|
||||||
|
android:centerColor="#7CD6FF"
|
||||||
|
android:endColor="#6170FF"
|
||||||
|
android:startColor="#6170FF" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<!--进度条从左到右色值,渐变-->
|
||||||
|
<item android:id="@android:id/progress">
|
||||||
|
<clip
|
||||||
|
>
|
||||||
|
<scale android:scaleWidth="100%">
|
||||||
|
<shape>
|
||||||
|
<corners
|
||||||
|
android:bottomLeftRadius="5dp"
|
||||||
|
android:radius="5dp"
|
||||||
|
android:topLeftRadius="5dp" />
|
||||||
|
|
||||||
|
<gradient
|
||||||
|
android:angle="0"
|
||||||
|
android:endColor="#FF35BF"
|
||||||
|
android:startColor="#FD2F5A" />
|
||||||
|
</shape>
|
||||||
|
</scale>
|
||||||
|
</clip>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
</layer-list>
|