Merge branch 'master' into tmp_mon
# Conflicts: # live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java
@@ -172,6 +172,7 @@ public class Constants {
|
||||
public static final String RECOMMEND_CARD_NOTIFY = "recommendCardNotify";//推荐卡通知消息
|
||||
public static final String STAR_CHALLENGE_UPDATE = "starChallengeUpdate";//星级助力
|
||||
public static final String AI_AUTOMATIC_SPEECH = "aiAutomaticSpeech";//机器人助手
|
||||
public static final String AI_AUTOMATIC_SPEECH_LIVE = "aiAutomaticSpeechNew";//机器人助手
|
||||
public static final String STAR_CHALLENGE_UPGRADE_NOTIFY = "starChallengeUpgradeNotify";//星级挑战成功
|
||||
public static final String SUPER_VISION = "supervision";//超级发言警告
|
||||
public static final String PK_RANK_UPDATE = "RankingRankUpdate";//PK排位赛更新数据
|
||||
@@ -190,6 +191,7 @@ public class Constants {
|
||||
public static final String LOVE_CHECK = "LoveCheck";//热度卡消息
|
||||
public static final String TRUMPET_NOTIFY = "TrumpetNotify";//全栈喇叭
|
||||
public static final String LuckyAngel = "LuckyCheck";//幸运天使
|
||||
public static final String Lucky100Check = "Lucky100Check";//幸运天使
|
||||
|
||||
public static final int SOCKET_WHAT_CONN = 0;
|
||||
public static final int SOCKET_WHAT_DISCONN = 2;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -475,6 +476,9 @@ public class EnterRoomInfoModel extends BaseModel {
|
||||
}
|
||||
|
||||
public String getIsconnection() {
|
||||
if(StringUtil.isEmpty(isconnection)){
|
||||
isconnection="0";
|
||||
}
|
||||
return isconnection;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,8 @@ public class EnterRoomNewModel extends BaseModel {
|
||||
private String isUseHotCard = "";//是否使用热度卡
|
||||
@SerializedName("liveRoomActivity")
|
||||
private List<LiveRoomActivityModel> liveRoomActivityModels = new ArrayList<>();//活动列表
|
||||
@SerializedName("clarityType")
|
||||
private int clarityType;
|
||||
|
||||
public List<LiveRoomActivityModel> getLiveRoomActivityModels() {
|
||||
return liveRoomActivityModels;
|
||||
@@ -109,4 +111,28 @@ public class EnterRoomNewModel extends BaseModel {
|
||||
this.isUseHotCard = isUseHotCard;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getClarityType() {
|
||||
return clarityType;
|
||||
}
|
||||
|
||||
public void setClarityType(int clarityType) {
|
||||
this.clarityType = clarityType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "EnterRoomNewModel{" +
|
||||
"liveInfo=" + liveInfo +
|
||||
", enterRoomInfo=" + enterRoomInfo +
|
||||
", rankHour=" + rankHour +
|
||||
", newPeopleTask=" + newPeopleTask +
|
||||
", wishList=" + wishList +
|
||||
", guardUserAvatar=" + guardUserAvatar +
|
||||
", activeList=" + activeList +
|
||||
", isUseHotCard='" + isUseHotCard + '\'' +
|
||||
", liveRoomActivityModels=" + liveRoomActivityModels +
|
||||
", clarityType=" + clarityType +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -493,6 +493,44 @@ public class LiveBean implements Parcelable {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "uid: " + uid + " , userNiceName: " + userNiceName + " ,playUrl: " + pull;
|
||||
return "LiveBean{" +
|
||||
"uid='" + uid + '\'' +
|
||||
", avatar='" + avatar + '\'' +
|
||||
", avatarThumb='" + avatarThumb + '\'' +
|
||||
", userNiceName='" + userNiceName + '\'' +
|
||||
", title='" + title + '\'' +
|
||||
", city='" + city + '\'' +
|
||||
", stream='" + stream + '\'' +
|
||||
", pull='" + pull + '\'' +
|
||||
", thumb='" + thumb + '\'' +
|
||||
", nums='" + nums + '\'' +
|
||||
", sex=" + sex +
|
||||
", distance='" + distance + '\'' +
|
||||
", levelAnchor=" + levelAnchor +
|
||||
", type=" + type +
|
||||
", typeVal='" + typeVal + '\'' +
|
||||
", goodNum='" + goodNum + '\'' +
|
||||
", gameAction=" + gameAction +
|
||||
", game='" + game + '\'' +
|
||||
", islive='" + islive + '\'' +
|
||||
", isTop='" + isTop + '\'' +
|
||||
", pk_avatar_thumb='" + pk_avatar_thumb + '\'' +
|
||||
", landscape=" + landscape +
|
||||
", hot_num='" + hot_num + '\'' +
|
||||
", content_pic_size_one='" + content_pic_size_one + '\'' +
|
||||
", content_pic_size_two='" + content_pic_size_two + '\'' +
|
||||
", content_pic_size_three='" + content_pic_size_three + '\'' +
|
||||
", is_week='" + is_week + '\'' +
|
||||
", img='" + img + '\'' +
|
||||
", url='" + url + '\'' +
|
||||
", drpk_status='" + drpk_status + '\'' +
|
||||
", is_rong=" + is_rong +
|
||||
", isattention='" + isattention + '\'' +
|
||||
", recommendCardtype='" + recommendCardtype + '\'' +
|
||||
", recommendCardIconSizeTwo='" + recommendCardIconSizeTwo + '\'' +
|
||||
", recommendCardIconSizeThree='" + recommendCardIconSizeThree + '\'' +
|
||||
", params=" + params +
|
||||
", mWeekList=" + mWeekList +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/10/8.
|
||||
* 直播房间类型
|
||||
*/
|
||||
|
||||
public class LiveRoomTypeBean {
|
||||
|
||||
private int mId;
|
||||
private String mName;
|
||||
private int mCheckedIcon;
|
||||
private int mUnCheckedIcon;
|
||||
private boolean mChecked;
|
||||
|
||||
public LiveRoomTypeBean() {
|
||||
}
|
||||
|
||||
public LiveRoomTypeBean(int id, String name) {
|
||||
mId = id;
|
||||
mName = name;
|
||||
}
|
||||
|
||||
public LiveRoomTypeBean(int id, String name, int checkedIcon, int unCheckedIcon) {
|
||||
mId = id;
|
||||
mName = name;
|
||||
mCheckedIcon = checkedIcon;
|
||||
mUnCheckedIcon = unCheckedIcon;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return mId;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
mId = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return mName;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
mName = name;
|
||||
}
|
||||
|
||||
public int getCheckedIcon() {
|
||||
return mCheckedIcon;
|
||||
}
|
||||
|
||||
public void setCheckedIcon(int checkedIcon) {
|
||||
mCheckedIcon = checkedIcon;
|
||||
}
|
||||
|
||||
public int getUnCheckedIcon() {
|
||||
return mUnCheckedIcon;
|
||||
}
|
||||
|
||||
public void setUnCheckedIcon(int unCheckedIcon) {
|
||||
mUnCheckedIcon = unCheckedIcon;
|
||||
}
|
||||
|
||||
public boolean isChecked() {
|
||||
return mChecked;
|
||||
}
|
||||
|
||||
public void setChecked(boolean checked) {
|
||||
mChecked = checked;
|
||||
}
|
||||
|
||||
public static List<LiveRoomTypeBean> getLiveTypeList(String[][] liveTypes) {
|
||||
List<LiveRoomTypeBean> list = new ArrayList<>();
|
||||
if (liveTypes != null) {
|
||||
for (String[] arr : liveTypes) {
|
||||
LiveRoomTypeBean bean = new LiveRoomTypeBean(Integer.parseInt(arr[0]), arr[1]);
|
||||
switch (bean.getId()) {
|
||||
case Constants.LIVE_TYPE_NORMAL:
|
||||
bean.setCheckedIcon(R.mipmap.icon_live_type_normal_1);
|
||||
bean.setUnCheckedIcon(R.mipmap.icon_live_type_normal_2);
|
||||
break;
|
||||
case Constants.LIVE_TYPE_PWD:
|
||||
bean.setCheckedIcon(R.mipmap.icon_live_type_pwd_1);
|
||||
bean.setUnCheckedIcon(R.mipmap.icon_live_type_pwd_2);
|
||||
break;
|
||||
case Constants.LIVE_TYPE_PAY:
|
||||
bean.setCheckedIcon(R.mipmap.icon_live_type_pay_1);
|
||||
bean.setUnCheckedIcon(R.mipmap.icon_live_type_pay_2);
|
||||
break;
|
||||
case Constants.LIVE_TYPE_TIME:
|
||||
bean.setCheckedIcon(R.mipmap.icon_live_type_time_1);
|
||||
bean.setUnCheckedIcon(R.mipmap.icon_live_type_time_2);
|
||||
break;
|
||||
}
|
||||
list.add(bean);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class LiveStetUpStatusModel extends BaseModel {
|
||||
|
||||
@SerializedName("wishList")
|
||||
private String wishList;
|
||||
@SerializedName("ai_state")
|
||||
private String aiState;
|
||||
|
||||
/**
|
||||
* wishList 1设置 0 未设置
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean getWishListState() {
|
||||
return TextUtils.equals(wishList, "1");
|
||||
}
|
||||
|
||||
/**
|
||||
* aiState 1打开机器人 0 未设置
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean getAiStateState() {
|
||||
return TextUtils.equals(aiState, "1");
|
||||
}
|
||||
|
||||
public String getWishList() {
|
||||
return wishList;
|
||||
}
|
||||
|
||||
public LiveStetUpStatusModel setWishList(String wishList) {
|
||||
this.wishList = wishList;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAiState() {
|
||||
return aiState;
|
||||
}
|
||||
|
||||
public LiveStetUpStatusModel setAiState(String aiState) {
|
||||
this.aiState = aiState;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import android.text.TextUtils;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2017/8/14.
|
||||
@@ -116,6 +117,9 @@ public class UserBean implements Parcelable {
|
||||
}
|
||||
|
||||
public String getIs_bind() {
|
||||
if(StringUtil.isEmpty(is_bind)){
|
||||
is_bind="0";
|
||||
}
|
||||
return is_bind;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
public class AnchorInfoEvent {
|
||||
protected boolean clear;
|
||||
protected String id;
|
||||
protected String userNiceName;
|
||||
protected String avatar;
|
||||
|
||||
public AnchorInfoEvent(boolean clears,String ids, String userNiceNames,String avatars) {
|
||||
clear = clears;
|
||||
id = ids;
|
||||
userNiceName = userNiceNames;
|
||||
avatar = avatars;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getUserNiceName() {
|
||||
return userNiceName;
|
||||
}
|
||||
|
||||
public void setUserNiceName(String userNiceName) {
|
||||
this.userNiceName = userNiceName;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
public boolean isClear() {
|
||||
return clear;
|
||||
}
|
||||
|
||||
public void setClear(boolean clear) {
|
||||
this.clear = clear;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
public class LivePushRyEvent extends BaseModel {
|
||||
}
|
||||
@@ -239,6 +239,7 @@ public class ImgLoader {
|
||||
public void onResourceReady(@NonNull Drawable resource, @Nullable Transition<? super Drawable> transition) {
|
||||
if (callback != null) {
|
||||
callback.onLoadSuccess(resource);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ import com.yunbao.common.activity.ErrorActivity;
|
||||
import com.yunbao.common.bean.ConfigBean;
|
||||
import com.yunbao.common.event.FollowEvent;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.manager.APKManager;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.manager.NewLevelManager;
|
||||
import com.yunbao.common.utils.L;
|
||||
@@ -199,6 +200,24 @@ public class CommonHttpUtil {
|
||||
JSONArray levelArray = obj.getJSONArray("levelanchor_new");
|
||||
new NewLevelManager(context).UpAnchorDataLevel(levelArray.toJSONString());
|
||||
}
|
||||
if (obj.containsKey("apk_ver")) {
|
||||
APKManager.get().setApkVer(obj.getString("apk_ver"));
|
||||
}
|
||||
if (obj.containsKey("apk_url")) {
|
||||
APKManager.get().setAPKUrl(obj.getString("apk_url"));
|
||||
}
|
||||
if (obj.containsKey("apk_des")) {
|
||||
APKManager.get().setAPKDes(obj.getString("apk_des"));
|
||||
}
|
||||
if (obj.containsKey("google_isup")) {
|
||||
APKManager.get().setAPKGoogleIsUp(obj.getInteger("google_isup"));
|
||||
}
|
||||
if (obj.containsKey("isup")) {
|
||||
APKManager.get().setAPKIsUp(obj.getInteger("isup"));
|
||||
}
|
||||
if (obj.containsKey("clarity")) {
|
||||
IMLoginManager.get(context).setClarity(obj.getString("clarity"));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
String error = "info[0]:" + info[0] + "\n\n\n" + "Exception:" + e.getClass() + "---message--->" + e.getMessage();
|
||||
ErrorActivity.forward("GetConfig接口返回数据异常", error);
|
||||
|
||||
@@ -15,6 +15,7 @@ import com.yunbao.common.bean.LinkMicUserBeanV2;
|
||||
import com.yunbao.common.bean.LiveAiRobotBean;
|
||||
import com.yunbao.common.bean.LiveInfoModel;
|
||||
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
||||
import com.yunbao.common.bean.LiveStetUpStatusModel;
|
||||
import com.yunbao.common.bean.MsgSwitchDetailModel;
|
||||
import com.yunbao.common.bean.NewPeopleInfo;
|
||||
import com.yunbao.common.bean.NobleRankHideUserListModel;
|
||||
@@ -522,11 +523,23 @@ public interface PDLiveApi {
|
||||
/**
|
||||
* 机器人修改话术
|
||||
*/
|
||||
@GET("/api/public/?service=Live.updateAiAutomaticSpeech ")
|
||||
@GET("/api/public/?service=Live.updateAiAutomaticSpeech")
|
||||
Observable<ResponseModel<List<String>>> updateAiAutomaticSpeech(
|
||||
@Query("type") String type,
|
||||
@Query("id") String id,
|
||||
@Query("content") String content
|
||||
);
|
||||
|
||||
/**
|
||||
* 开播获取机器人状态和心愿单状态
|
||||
*/
|
||||
@GET("/api/public/?service=Live.getLiveStetUpStatus")
|
||||
Observable<ResponseModel<LiveStetUpStatusModel>> getLiveStetUpStatus(
|
||||
@Query("liveuid") String liveUid
|
||||
);
|
||||
|
||||
@GET("/api/public/?service=live.jieshuDRPK")
|
||||
Observable<ResponseModel<BaseModel>> jieshuDRPK(
|
||||
@Query("roomid") String roomId,
|
||||
@Query("uid") String uid);
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ import com.yunbao.common.bean.LinkMicUserBeanV2;
|
||||
import com.yunbao.common.bean.LiveAiRobotBean;
|
||||
import com.yunbao.common.bean.LiveInfoModel;
|
||||
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
||||
import com.yunbao.common.bean.LiveStetUpStatusModel;
|
||||
import com.yunbao.common.bean.NobleRankHideUserListModel;
|
||||
import com.yunbao.common.bean.NobleTrumpetModel;
|
||||
import com.yunbao.common.bean.PkRankBean;
|
||||
@@ -1034,6 +1035,46 @@ public class LiveNetManager {
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 开播设置数据获取
|
||||
*
|
||||
* @param liveUid
|
||||
* @param callback
|
||||
*/
|
||||
public void getLiveStetUpStatus(String liveUid, HttpCallback<LiveStetUpStatusModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getLiveStetUpStatus(liveUid)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<LiveStetUpStatusModel>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<LiveStetUpStatusModel> liveStetUpStatusModelResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(liveStetUpStatusModelResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void jieshuDRPK(String uID) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.jieshuDRPK(uID, uID)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(baseModelResponseModel -> {
|
||||
|
||||
}, throwable -> {
|
||||
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 直播间取消网络请求
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.yunbao.common.manager;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.manager.base.BaseCacheManager;
|
||||
import com.yunbao.common.utils.VersionUtil;
|
||||
|
||||
public class APKManager extends BaseCacheManager {
|
||||
private static APKManager manager;
|
||||
private final String APK_VER = "apk_ver";
|
||||
private final String APK_URL = "apk_url";
|
||||
private final String APK_DES = "apk_des";
|
||||
private final String APK_IS_UP = "isup";
|
||||
private final String APK_GOOGLE_IS_UP = "google_isup";
|
||||
|
||||
public APKManager(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取单利
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static APKManager get() {
|
||||
if (null == manager) {
|
||||
manager = new APKManager(CommonAppContext.sInstance.getBaseContext());
|
||||
}
|
||||
return manager;
|
||||
}
|
||||
|
||||
public void setAPKUrl(String apkUrl) {
|
||||
put(APK_URL, apkUrl);
|
||||
}
|
||||
|
||||
public void setAPKDes(String apkDes) {
|
||||
put(APK_DES, apkDes);
|
||||
}
|
||||
|
||||
public String getAPKUrl() {
|
||||
return getString(APK_URL);
|
||||
}
|
||||
|
||||
public String getAPKDes() {
|
||||
return getString(APK_DES);
|
||||
}
|
||||
|
||||
public void setApkVer(String apkVer) {
|
||||
put(APK_VER, apkVer);
|
||||
}
|
||||
|
||||
public boolean getApkVerNew() {
|
||||
|
||||
return VersionUtil.isLatest(getString(APK_VER));
|
||||
}
|
||||
|
||||
public void setAPKIsUp(int apkIsUp) {
|
||||
put(APK_IS_UP, apkIsUp);
|
||||
}
|
||||
|
||||
public void setAPKGoogleIsUp(int apkGoogleIsUp) {
|
||||
put(APK_GOOGLE_IS_UP, apkGoogleIsUp);
|
||||
}
|
||||
|
||||
public int getApkIsUp() {
|
||||
return getInt(APK_IS_UP, 0);
|
||||
}
|
||||
|
||||
public int getAPKGoogleIsUp() {
|
||||
return getInt(APK_GOOGLE_IS_UP, 0);
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,6 @@ import android.text.TextUtils;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.cosmos.baseutil.app.AppContext;
|
||||
import com.google.gson.Gson;
|
||||
import com.lzf.easyfloat.EasyFloat;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
@@ -39,8 +38,43 @@ public class IMLoginManager extends BaseCacheManager {
|
||||
private final String IS_FLOAT = "is_float";
|
||||
private final String IS_HINT = "is_hint";
|
||||
private final String IS_HINT2 = "is_hint2";
|
||||
private final String SELECT_CLARITY = "selectClarity";
|
||||
private final String CLARITY = "clarity";
|
||||
|
||||
|
||||
public void setClarity(String clarity) {
|
||||
put(CLARITY, clarity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 1080p开播分辨率:clarity 0关闭 1开启
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean getClarity() {
|
||||
return TextUtils.equals(getString(CLARITY), "1");
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置清晰度
|
||||
*
|
||||
* @param selectClarity
|
||||
*/
|
||||
public void setSelectClarity(int selectClarity) {
|
||||
put(SELECT_CLARITY, selectClarity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取清晰度
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public int getSelectClarity() {
|
||||
|
||||
return getInt(SELECT_CLARITY, 0);
|
||||
|
||||
}
|
||||
|
||||
public boolean isHint() {
|
||||
return 1 == getInt(IS_HINT, 0);
|
||||
}
|
||||
|
||||
@@ -37,6 +37,8 @@ public class RandomPkManager {
|
||||
private String pkUid;//对方房间ID
|
||||
public static String debugUid;
|
||||
private RankPkInfoBean rankPkInfoBean;//排位赛信息
|
||||
private int exitTimer;//退出倒计时
|
||||
private TimerTask exitTask = null;//退出任务
|
||||
Handler handler = new Handler(Looper.getMainLooper());
|
||||
|
||||
private RandomPkManager() {
|
||||
@@ -118,6 +120,8 @@ public class RandomPkManager {
|
||||
return String.format(Locale.CHINA, "%02d:%02d", min, sec);
|
||||
}
|
||||
|
||||
private Runnable pkRunnable = this::next;
|
||||
|
||||
/**
|
||||
* 对方拒绝,开始下一轮匹配
|
||||
*/
|
||||
@@ -125,11 +129,11 @@ public class RandomPkManager {
|
||||
if (status != PK_STATUS_DEFAULT && status != PK_STATUS_REFUSE) {
|
||||
return;
|
||||
}
|
||||
new Handler(Looper.getMainLooper()).postDelayed(this::next, 5000);
|
||||
handler.postDelayed(pkRunnable, 5000);
|
||||
}
|
||||
|
||||
private void next() {
|
||||
if (task==null) {
|
||||
if (task == null) {
|
||||
return;
|
||||
}
|
||||
status = PK_STATUS_REQUEST;
|
||||
@@ -243,19 +247,9 @@ public class RandomPkManager {
|
||||
}
|
||||
}
|
||||
|
||||
private int exitTimer;
|
||||
|
||||
/**
|
||||
* 退出匹配
|
||||
*/
|
||||
public void exitPk() {
|
||||
if (status == PK_STATUS_EXIT_ING) {
|
||||
return;
|
||||
}
|
||||
callEndPkStart();
|
||||
status = PK_STATUS_EXIT_ING;
|
||||
exitTimer = 11;
|
||||
new Timer().schedule(new TimerTask() {
|
||||
private TimerTask createExitTask() {
|
||||
return new TimerTask() {
|
||||
|
||||
Handler handler = new Handler(Looper.getMainLooper());
|
||||
|
||||
@@ -269,10 +263,25 @@ public class RandomPkManager {
|
||||
end();
|
||||
callEndPkSuccess();
|
||||
cancel();
|
||||
exitTask = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
}, 0, 1000);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 退出匹配
|
||||
*/
|
||||
public void exitPk() {
|
||||
if (status == PK_STATUS_EXIT_ING) {
|
||||
return;
|
||||
}
|
||||
callEndPkStart();
|
||||
status = PK_STATUS_EXIT_ING;
|
||||
exitTimer = 11;
|
||||
exitTask = createExitTask();
|
||||
new Timer().schedule(exitTask, 0, 1000);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -387,6 +396,23 @@ public class RandomPkManager {
|
||||
return exitTimer + "";
|
||||
}
|
||||
|
||||
/**
|
||||
* 清空状态,下播时调用
|
||||
*/
|
||||
public void release() {
|
||||
status = PK_STATUS_REQUEST;
|
||||
if (task != null) {
|
||||
task.cancel();
|
||||
}
|
||||
if (exitTask != null) {
|
||||
exitTask.cancel();
|
||||
}
|
||||
randomPkTimer.clear();
|
||||
rankPkInfoBean = null;
|
||||
pkUid = null;
|
||||
handler.removeCallbacks(pkRunnable);
|
||||
}
|
||||
|
||||
|
||||
public static abstract class OnRandomPkTimer {
|
||||
/**
|
||||
|
||||
@@ -98,6 +98,9 @@ public class MessageIMManager {
|
||||
public void getSystemMessages() {
|
||||
systemNumber = 0;
|
||||
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
||||
if (userInfo == null) {
|
||||
return;
|
||||
}
|
||||
HttpClient.getInstance().get("Message.getLists", "getImUserInfo")
|
||||
.params("uid", userInfo.getId())
|
||||
.params("token", userInfo.getToken())
|
||||
|
||||
@@ -6,10 +6,15 @@ import android.content.Context;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.graphics.Point;
|
||||
import android.net.TrafficStats;
|
||||
import android.text.format.Formatter;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.InputStreamReader;
|
||||
|
||||
/**
|
||||
* 设备通用类
|
||||
*/
|
||||
@@ -97,10 +102,40 @@ public class DeviceUtils {
|
||||
return mi.lowMemory;
|
||||
}
|
||||
|
||||
public static String getMemory(Context context) {
|
||||
/**
|
||||
* 获取可用内存 格式化
|
||||
*/
|
||||
public static String getMemoryToFormat(Context context) {
|
||||
ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
|
||||
ActivityManager.MemoryInfo mi = new ActivityManager.MemoryInfo();
|
||||
am.getMemoryInfo(mi);
|
||||
return Formatter.formatFileSize(context, mi.availMem);// 将获取的内存大小规格化
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取可用内存
|
||||
*/
|
||||
public static String getMemory(Context context) {
|
||||
ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
|
||||
ActivityManager.MemoryInfo mi = new ActivityManager.MemoryInfo();
|
||||
am.getMemoryInfo(mi);
|
||||
return mi.availMem + "";
|
||||
}
|
||||
|
||||
private static long lastTotalRxBytes = 0;
|
||||
private static long lastTimeStamp = 0;
|
||||
|
||||
/**
|
||||
* 获取上传网速
|
||||
*/
|
||||
public static long getNetSpeed(Context context) {
|
||||
long nowTotalRxBytes = TrafficStats.getUidTxBytes(context.getApplicationInfo().uid) == TrafficStats.UNSUPPORTED ? 0 : (TrafficStats.getTotalTxBytes() / 1024);
|
||||
long nowTimeStamp = System.currentTimeMillis();
|
||||
long speed = ((nowTotalRxBytes - lastTotalRxBytes) * 1000 / (nowTimeStamp - lastTimeStamp));//毫秒转换
|
||||
lastTimeStamp = nowTimeStamp;
|
||||
lastTotalRxBytes = nowTotalRxBytes;
|
||||
return speed;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -4,6 +4,8 @@ import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.text.InputFilter;
|
||||
import android.text.InputType;
|
||||
import android.text.Spanned;
|
||||
@@ -68,6 +70,21 @@ public class DialogUitl {
|
||||
}
|
||||
return dialog;
|
||||
}
|
||||
public static void showToast(Context context,String content,long delayMillis){
|
||||
Dialog dialog = new Dialog(context, R.style.dialog);
|
||||
dialog.setContentView(R.layout.dialog_toast);
|
||||
dialog.setCancelable(false);
|
||||
dialog.setCanceledOnTouchOutside(false);
|
||||
if (!TextUtils.isEmpty(content)) {
|
||||
TextView titleView = (TextView) dialog.findViewById(R.id.text);
|
||||
if (titleView != null) {
|
||||
titleView.setGravity(Gravity.CENTER);
|
||||
titleView.setText(content);
|
||||
}
|
||||
}
|
||||
dialog.show();
|
||||
new Handler(Looper.getMainLooper()).postDelayed(dialog::dismiss,delayMillis);
|
||||
}
|
||||
|
||||
|
||||
public static Dialog loadingDialog(Context context) {
|
||||
@@ -494,8 +511,12 @@ public class DialogUitl {
|
||||
}
|
||||
}
|
||||
};
|
||||
btnConfirm.setOnClickListener(listener);
|
||||
btnCancel.setOnClickListener(listener);
|
||||
if(btnConfirm!=null) {
|
||||
btnConfirm.setOnClickListener(listener);
|
||||
}
|
||||
if(btnCancel!=null) {
|
||||
btnCancel.setOnClickListener(listener);
|
||||
}
|
||||
dialog.setOnShowListener(new DialogInterface.OnShowListener() {
|
||||
@Override
|
||||
public void onShow(DialogInterface dialogInterface) {
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
package com.yunbao.common.utils;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
@@ -38,6 +44,39 @@ public class ToastUtil {
|
||||
show(WordUtil.getString(res));
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示黑底白字的提示
|
||||
*
|
||||
* @param res 内容
|
||||
* @param delayMillis 显示时间 毫秒
|
||||
*/
|
||||
public static void showStyle(int res, long delayMillis) {
|
||||
showStyle(WordUtil.getString(res), delayMillis);
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示黑底白字的提示
|
||||
*
|
||||
* @param content 内容
|
||||
* @param delayMillis 显示时间 毫秒
|
||||
*/
|
||||
public static void showStyle(String content, long delayMillis) {
|
||||
Dialog dialog = new Dialog(CommonAppContext.getTopActivity(), R.style.dialog);
|
||||
dialog.setContentView(R.layout.dialog_toast);
|
||||
dialog.setCancelable(false);
|
||||
dialog.setCanceledOnTouchOutside(false);
|
||||
if (!TextUtils.isEmpty(content)) {
|
||||
TextView titleView = (TextView) dialog.findViewById(R.id.text);
|
||||
if (titleView != null) {
|
||||
titleView.setTextColor(Color.WHITE);
|
||||
titleView.setGravity(Gravity.CENTER);
|
||||
titleView.setText(content);
|
||||
}
|
||||
}
|
||||
dialog.show();
|
||||
new Handler(Looper.getMainLooper()).postDelayed(dialog::dismiss, delayMillis);
|
||||
}
|
||||
|
||||
public static void show(String s) {
|
||||
if (TextUtils.isEmpty(s)) {
|
||||
return;
|
||||
|
||||
@@ -0,0 +1,221 @@
|
||||
package com.yunbao.common.views;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.content.FileProvider;
|
||||
|
||||
import com.lxj.xpopup.core.CenterPopupView;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.manager.APKManager;
|
||||
import com.yunbao.common.utils.APKDownloadUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import okhttp3.Call;
|
||||
import okhttp3.Callback;
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.Request;
|
||||
import okhttp3.Response;
|
||||
|
||||
/**
|
||||
* apk更新弹窗
|
||||
*/
|
||||
public class APKUpdateCustomPopup extends CenterPopupView {
|
||||
private TextView updateText, versionImmediateUse;
|
||||
private LinearLayout updateLine;
|
||||
private ProgressBar progressBar;
|
||||
private Activity mContext;
|
||||
private boolean mInside;
|
||||
|
||||
public APKUpdateCustomPopup(@NonNull Activity context, boolean inside) {
|
||||
super(context);
|
||||
mContext = context;
|
||||
mInside = inside;
|
||||
}
|
||||
|
||||
// 返回自定义弹窗的布局
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.apk_update_custom_popup;
|
||||
}
|
||||
|
||||
// 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
initView();
|
||||
initData();
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
if (!mInside) {
|
||||
if (!CommonAppConfig.IS_GOOGLE_PLAY && APKManager.get().getAPKGoogleIsUp() == 1) {
|
||||
findViewById(R.id.dialog_close).setVisibility(GONE);
|
||||
}
|
||||
if (!CommonAppConfig.IS_GOOGLE_PLAY && APKManager.get().getAPKGoogleIsUp() == 1) {
|
||||
findViewById(R.id.dialog_close).setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
updateText = findViewById(R.id.update_text);
|
||||
versionImmediateUse = findViewById(R.id.version_immediate_use);
|
||||
updateLine = findViewById(R.id.update_line);
|
||||
progressBar = findViewById(R.id.progressBar);
|
||||
versionImmediateUse.setVisibility(VISIBLE);
|
||||
updateLine.setVisibility(GONE);
|
||||
updateText.setText(APKManager.get().getAPKDes());
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.dialog_close), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
if (mInside){
|
||||
dismiss();
|
||||
}else {
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY && APKManager.get().getAPKGoogleIsUp() != 1) {
|
||||
dismiss();
|
||||
}
|
||||
if (!CommonAppConfig.IS_GOOGLE_PLAY && APKManager.get().getApkIsUp() != 1) {
|
||||
dismiss();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
);
|
||||
ViewClicksAntiShake.clicksAntiShake(versionImmediateUse, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
//不是谷歌
|
||||
if (!CommonAppConfig.IS_GOOGLE_PLAY) {
|
||||
versionImmediateUse.setVisibility(GONE);
|
||||
updateLine.setVisibility(VISIBLE);
|
||||
downloadAPK(mContext, APKManager.get().getAPKUrl(), new APKDownloadUtil.OnUpdateListener() {
|
||||
@Override
|
||||
public void updateFailure(int code, String error) {
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Intent i = new Intent(android.content.Intent.ACTION_VIEW);
|
||||
i.setData(Uri.parse("https://play.google.com/store/apps/details?id=com.pdlive.shayu"));
|
||||
mContext.startActivity(i);
|
||||
mContext.finish();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void downloadAPK(Activity context, String url, APKDownloadUtil.OnUpdateListener listener) {
|
||||
Request request = new Request.Builder().url(url)
|
||||
.addHeader("Accept-Encoding", "identity").build();
|
||||
File downloadFile = new File(context.getCacheDir(), "update_app.apk");
|
||||
try {
|
||||
if (!downloadFile.exists()
|
||||
&& !downloadFile.createNewFile()) {
|
||||
return;
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
new OkHttpClient().newCall(request).enqueue(new Callback() {
|
||||
private Handler handler = new Handler();
|
||||
|
||||
@Override
|
||||
public void onFailure(Call call, IOException e) {
|
||||
// 下载失败
|
||||
handler.post(() -> {
|
||||
listener.updateFailure(-1, e.getMessage());
|
||||
dismiss();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResponse(Call call, Response response) {
|
||||
Looper.prepare();
|
||||
byte[] buf = new byte[2048];
|
||||
int len;
|
||||
try (InputStream inputStream = response.body().byteStream();
|
||||
FileOutputStream outputStream = new FileOutputStream(downloadFile)) {
|
||||
long total = response.body().contentLength();
|
||||
long sum = 0;
|
||||
while ((len = inputStream.read(buf)) != -1) {
|
||||
outputStream.write(buf, 0, len);
|
||||
sum += len;
|
||||
int progress = (int) (sum * 1.0f / total * 100);
|
||||
// 下载中
|
||||
handler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
progressBar.setProgress(progress);
|
||||
}
|
||||
});
|
||||
}
|
||||
outputStream.flush();
|
||||
//启动安装app
|
||||
installApk(context, downloadFile, context.getPackageName() + ".fileprovider");
|
||||
handler.post(() -> dismiss());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
new Handler().post(() -> {
|
||||
listener.updateFailure(-1, e.getMessage());
|
||||
dismiss();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 安装apk
|
||||
*
|
||||
* @param context
|
||||
* @param file
|
||||
*/
|
||||
public void installApk(Context context, File file, String authority) {
|
||||
Intent intent = getInstallIntent(context, file, authority);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取安装Intent
|
||||
*
|
||||
* @param context
|
||||
* @param file
|
||||
* @param authority
|
||||
* @return
|
||||
*/
|
||||
public Intent getInstallIntent(Context context, File file, String authority) {
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
intent.addCategory(Intent.CATEGORY_DEFAULT);
|
||||
Uri uriData;
|
||||
String type = "application/vnd.android.package-archive";
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
uriData = FileProvider.getUriForFile(context, authority, file);
|
||||
} else {
|
||||
uriData = Uri.fromFile(file);
|
||||
}
|
||||
intent.setDataAndType(uriData, type);
|
||||
return intent;
|
||||
}
|
||||
}
|
||||
@@ -127,8 +127,10 @@ public class CustomDrawerPopupView extends DrawerPopupView {
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.system_notice), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
// dismiss();
|
||||
|
||||
dismiss();
|
||||
if (callBack != null) {
|
||||
callBack.changeVideo();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -196,6 +198,8 @@ public class CustomDrawerPopupView extends DrawerPopupView {
|
||||
|
||||
void systemNotice();
|
||||
|
||||
void changeVideo();
|
||||
|
||||
void online();
|
||||
|
||||
void reportLayout();
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.yunbao.common.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.core.CenterPopupView;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
public class HintCustomPopup extends CenterPopupView {
|
||||
private String title, contest;
|
||||
|
||||
public HintCustomPopup(@NonNull Context context, String title, String contest) {
|
||||
super(context);
|
||||
this.title = title;
|
||||
this.contest = contest;
|
||||
}
|
||||
|
||||
public HintCustomPopup(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
// 返回自定义弹窗的布局
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.hint_custom_popup;
|
||||
}
|
||||
|
||||
// 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
TextView titleText = findViewById(R.id.title);
|
||||
TextView contestText = findViewById(R.id.contest);
|
||||
if (!TextUtils.isEmpty(title)) {
|
||||
titleText.setText(title);
|
||||
}
|
||||
if (!TextUtils.isEmpty(contest)) {
|
||||
contestText.setText(contest);
|
||||
}
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.live_open_ok), () -> {
|
||||
if (callBack != null) {
|
||||
callBack.onSure();
|
||||
}
|
||||
dismiss();
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.live_open_cancel), () -> {
|
||||
if (callBack != null) {
|
||||
callBack.onCancel();
|
||||
}
|
||||
dismiss();
|
||||
});
|
||||
}
|
||||
|
||||
private HintCustomCallBack callBack;
|
||||
|
||||
public HintCustomPopup setCallBack(HintCustomCallBack callBack) {
|
||||
this.callBack = callBack;
|
||||
return this;
|
||||
}
|
||||
|
||||
public interface HintCustomCallBack {
|
||||
void onSure();
|
||||
|
||||
void onCancel();
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
@@ -17,14 +18,17 @@ import com.yunbao.common.utils.ToastUtil;
|
||||
*/
|
||||
public class InputCustomPopup extends CenterPopupView {
|
||||
private String message = "";
|
||||
private int title = R.string.dialog_tip;
|
||||
|
||||
public InputCustomPopup(@NonNull Context context, String message) {
|
||||
public InputCustomPopup(@NonNull Context context, String message, int title) {
|
||||
super(context);
|
||||
this.message = message;
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public InputCustomPopup(@NonNull Context context) {
|
||||
public InputCustomPopup(@NonNull Context context,int title) {
|
||||
super(context);
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
// 返回自定义弹窗的布局
|
||||
@@ -38,7 +42,9 @@ public class InputCustomPopup extends CenterPopupView {
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
EditText content = findViewById(R.id.content);
|
||||
TextView titleText = findViewById(R.id.title);
|
||||
content.setText(message);
|
||||
titleText.setText(title);
|
||||
findViewById(R.id.btn_cancel).setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
@@ -0,0 +1,256 @@
|
||||
package com.yunbao.common.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.text.format.Formatter;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.lxj.xpopup.core.BottomPopupView;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.utils.DeviceUtils;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.DoubleSummaryStatistics;
|
||||
import java.util.List;
|
||||
|
||||
public class LiveClarityCustomPopup extends BottomPopupView implements View.OnClickListener {
|
||||
public static final int BAN_720 = 1;
|
||||
public static final int BAN_1080 = 2;
|
||||
private int selectClarity = 1;
|
||||
private RelativeLayout lineSd, lineHd, lineFhd;
|
||||
private ImageView iconSd, iconHd, iconFhd;
|
||||
private ImageView titleSDImg, titleHDImg, titleFHDImg;
|
||||
private TextView titleSDText, titleHDText, titleFHDText, mTips;
|
||||
private int banSelect;
|
||||
private boolean isUser = false;
|
||||
|
||||
public int getSelectClarity() {
|
||||
return selectClarity;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param banSelect 禁止选项,{@link #BAN_720} 禁止高清和超高清。 {@link #BAN_1080} 禁止超高清
|
||||
* @param isUser 是否为观众,true 观众,false 主播
|
||||
*/
|
||||
public LiveClarityCustomPopup(@NonNull Context context, int selectClarity, int banSelect, boolean isUser) {
|
||||
super(context);
|
||||
this.banSelect = banSelect;
|
||||
if (selectClarity == -1) {
|
||||
selectClarity = 0;
|
||||
}
|
||||
this.isUser = isUser;
|
||||
if (banSelect == BAN_720) {
|
||||
selectClarity = 0;
|
||||
} else if (banSelect == BAN_1080 && selectClarity == 3) {
|
||||
selectClarity = 2;
|
||||
}
|
||||
this.selectClarity = selectClarity;
|
||||
}
|
||||
|
||||
public LiveClarityCustomPopup(@NonNull Context context, int selectClarity) {
|
||||
super(context);
|
||||
if (selectClarity == -1) {
|
||||
selectClarity = 0;
|
||||
}
|
||||
this.selectClarity = selectClarity;
|
||||
}
|
||||
|
||||
public LiveClarityCustomPopup(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
}
|
||||
|
||||
// 返回自定义弹窗的布局
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.dialog_live_clarity;
|
||||
}
|
||||
|
||||
// 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
initView();
|
||||
initDate();
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
lineSd = findViewById(R.id.line_sd);
|
||||
lineHd = findViewById(R.id.line_hd);
|
||||
lineFhd = findViewById(R.id.line_fhd);
|
||||
iconSd = findViewById(R.id.icon_sd);
|
||||
iconHd = findViewById(R.id.icon_hd);
|
||||
iconFhd = findViewById(R.id.icon_fhd);
|
||||
titleSDImg = findViewById(R.id.sd);
|
||||
titleHDImg = findViewById(R.id.hd);
|
||||
titleFHDImg = findViewById(R.id.fhd);
|
||||
titleSDText = findViewById(R.id.sd_text);
|
||||
titleHDText = findViewById(R.id.hd_text);
|
||||
titleFHDText = findViewById(R.id.fhd_text);
|
||||
mTips = findViewById(R.id.tips);
|
||||
if (isUser) {
|
||||
mTips.setVisibility(INVISIBLE);
|
||||
}
|
||||
selectClarity(selectClarity);
|
||||
//流畅
|
||||
ViewClicksAntiShake.clicksAntiShake(lineSd, () -> {
|
||||
selectClarity = 0;
|
||||
selectClarity(selectClarity);
|
||||
dismiss();
|
||||
});
|
||||
//高清
|
||||
ViewClicksAntiShake.clicksAntiShake(lineHd, () -> {
|
||||
if (lineHd.getTag() != null) {
|
||||
if (isUser) {//用户端
|
||||
ToastUtil.show(R.string.live_user_ban_hd);
|
||||
} else {//主播端
|
||||
ToastUtil.show(R.string.function_is_suspended);
|
||||
}
|
||||
return;
|
||||
}
|
||||
String memorg = formateFileSize(Long.parseLong(DeviceUtils.getMemory(getContext())));
|
||||
if ((Double.parseDouble(memorg) > 7 && netAverage > 100) || isUser) {
|
||||
selectClarity = 1;
|
||||
selectClarity(selectClarity);
|
||||
dismiss();
|
||||
} else {
|
||||
new XPopup.Builder(getContext())
|
||||
.asCustom(new HintCustomPopup(getContext(), getContext().getString(R.string.net_hint), getContext().getString(R.string.net_hint2)).setCallBack(new HintCustomPopup.HintCustomCallBack() {
|
||||
@Override
|
||||
public void onSure() {
|
||||
selectClarity = 1;
|
||||
selectClarity(selectClarity);
|
||||
dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancel() {
|
||||
|
||||
}
|
||||
}))
|
||||
.show();
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
//超高清
|
||||
ViewClicksAntiShake.clicksAntiShake(lineFhd, () -> {
|
||||
if (lineFhd.getTag() != null) {
|
||||
if (isUser) {//用户端
|
||||
ToastUtil.show(R.string.live_user_ban_fhd);
|
||||
} else {//主播端
|
||||
ToastUtil.show(R.string.function_is_suspended);
|
||||
}
|
||||
return;
|
||||
}
|
||||
new XPopup.Builder(getContext())
|
||||
.asCustom(new HintCustomPopup(getContext()).setCallBack(new HintCustomPopup.HintCustomCallBack() {
|
||||
@Override
|
||||
public void onSure() {
|
||||
selectClarity = 2;
|
||||
selectClarity(selectClarity);
|
||||
dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancel() {
|
||||
|
||||
}
|
||||
}))
|
||||
.show();
|
||||
|
||||
|
||||
});
|
||||
if (banSelect == BAN_720) {
|
||||
lineFhd.setTag(false);
|
||||
lineHd.setTag(false);
|
||||
titleHDImg.setImageAlpha(40);
|
||||
titleFHDImg.setImageAlpha(40);
|
||||
titleHDText.setAlpha(0.2f);
|
||||
titleFHDText.setAlpha(0.2f);
|
||||
} else if (banSelect == BAN_1080) {
|
||||
lineFhd.setTag(false);
|
||||
titleFHDText.setAlpha(0.2f);
|
||||
titleFHDImg.setImageAlpha(20);
|
||||
}
|
||||
}
|
||||
|
||||
//调用系统函数,字符串转换 long -String KB/MB
|
||||
private String formateFileSize(long size) {
|
||||
String fileSize = Formatter.formatFileSize(getContext(), size);
|
||||
return fileSize.substring(0, fileSize.length() - 3);
|
||||
}
|
||||
|
||||
/**
|
||||
* 状态选择
|
||||
*
|
||||
* @param selectClarity
|
||||
*/
|
||||
private void selectClarity(int selectClarity) {
|
||||
switch (selectClarity) {
|
||||
case 0:
|
||||
lineSd.setSelected(true);
|
||||
lineHd.setSelected(false);
|
||||
lineFhd.setSelected(false);
|
||||
iconSd.setVisibility(VISIBLE);
|
||||
iconHd.setVisibility(GONE);
|
||||
iconFhd.setVisibility(GONE);
|
||||
break;
|
||||
case 1:
|
||||
lineSd.setSelected(false);
|
||||
lineHd.setSelected(true);
|
||||
lineFhd.setSelected(false);
|
||||
iconSd.setVisibility(GONE);
|
||||
iconHd.setVisibility(VISIBLE);
|
||||
iconFhd.setVisibility(GONE);
|
||||
break;
|
||||
case 2:
|
||||
lineSd.setSelected(false);
|
||||
lineHd.setSelected(false);
|
||||
lineFhd.setSelected(true);
|
||||
iconSd.setVisibility(GONE);
|
||||
iconHd.setVisibility(GONE);
|
||||
iconFhd.setVisibility(VISIBLE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private Handler netHandler = new Handler();
|
||||
private Runnable netRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (netSpeeds.size() < 11) {
|
||||
netSpeeds.add(DeviceUtils.getNetSpeed(getContext()));
|
||||
netHandler.postDelayed(netRunnable, 100);
|
||||
} else {
|
||||
long min = Collections.min(netSpeeds);
|
||||
long max = Collections.max(netSpeeds);
|
||||
|
||||
DoubleSummaryStatistics statistics = netSpeeds.stream().mapToDouble(Number::doubleValue).summaryStatistics();
|
||||
netAverage = statistics.getAverage();
|
||||
Log.e("网络速度", "最大值:" + max + " 最小值:" + min + " 平均值:" + netAverage);
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
private List<Long> netSpeeds = new ArrayList<>();
|
||||
private double netAverage = 0;
|
||||
|
||||
private void initDate() {
|
||||
netHandler.postDelayed(netRunnable, 100);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,178 @@
|
||||
package com.yunbao.common.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.core.CenterPopupView;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.LiveClassBean;
|
||||
import com.yunbao.common.bean.LiveRoomTypeBean;
|
||||
import com.yunbao.common.bean.LiveStetUpStatusModel;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
public class LiveOpenCustomPopup extends CenterPopupView {
|
||||
//清晰度
|
||||
private int selectClarity;
|
||||
//直播类型
|
||||
private LiveClassBean classBean;
|
||||
//房间类型
|
||||
private LiveRoomTypeBean liveRoomTypeBean;
|
||||
|
||||
private TextView textClarity, textLiveRoomType, textLiveClass, textLiveWishlist, textRobot;
|
||||
|
||||
public LiveOpenCustomPopup setClassBean(LiveClassBean classBean) {
|
||||
this.classBean = classBean;
|
||||
textLiveClass.setText(classBean.getName());
|
||||
return this;
|
||||
}
|
||||
|
||||
public LiveOpenCustomPopup setLiveRoomTypeBean(LiveRoomTypeBean liveRoomTypeBean) {
|
||||
this.liveRoomTypeBean = liveRoomTypeBean;
|
||||
textLiveRoomType.setText(liveRoomTypeBean.getName());
|
||||
return this;
|
||||
}
|
||||
|
||||
public LiveOpenCustomPopup(@NonNull Context context, int selectClarity, LiveClassBean classBean, LiveRoomTypeBean liveRoomTypeBean) {
|
||||
super(context);
|
||||
this.selectClarity = selectClarity;
|
||||
this.classBean = classBean;
|
||||
this.liveRoomTypeBean = liveRoomTypeBean;
|
||||
}
|
||||
|
||||
// 返回自定义弹窗的布局
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.view_live_open;
|
||||
}
|
||||
|
||||
// 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
initView();
|
||||
initDate();
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
textClarity = findViewById(R.id.text_clarity);
|
||||
textLiveRoomType = findViewById(R.id.text_live_room_type);
|
||||
textLiveClass = findViewById(R.id.text_live_class);
|
||||
textLiveWishlist = findViewById(R.id.text_live_wishlist);
|
||||
textRobot = findViewById(R.id.text_robot);
|
||||
if (classBean != null) {
|
||||
textLiveClass.setText(classBean.getName());
|
||||
}
|
||||
if (liveRoomTypeBean != null) {
|
||||
textLiveRoomType.setText(liveRoomTypeBean.getName());
|
||||
}
|
||||
setSelectClarity(selectClarity);
|
||||
//關閉彈窗
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.live_open_cancel), () -> dismiss());
|
||||
//開播
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.live_open_ok), () -> {
|
||||
if (callBack != null) {
|
||||
callBack.startLive(liveRoomTypeBean, classBean);
|
||||
}
|
||||
dismiss();
|
||||
});
|
||||
//設置直播類型
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.line_live_class), () -> {
|
||||
if (callBack != null) {
|
||||
callBack.openLiveClass(classBean);
|
||||
}
|
||||
});
|
||||
//設置清晰度
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.line_clarity), () -> {
|
||||
if (callBack != null) {
|
||||
callBack.selectClarity(selectClarity);
|
||||
}
|
||||
});
|
||||
//設置房間類型
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.line_live_room_type), () -> {
|
||||
if (callBack != null) {
|
||||
callBack.openLiveRoomType(liveRoomTypeBean);
|
||||
}
|
||||
});
|
||||
//打開心願單
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.line_live_wishlist), () -> {
|
||||
if (callBack != null) {
|
||||
callBack.openWishlist();
|
||||
}
|
||||
});
|
||||
//設置機器人
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.line_robot), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
if (callBack != null) {
|
||||
callBack.openRobot();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void setSelectClarity(int selectClarity) {
|
||||
switch (selectClarity) {
|
||||
case 0:
|
||||
textClarity.setText(R.string.standard_clear);
|
||||
break;
|
||||
case 1:
|
||||
textClarity.setText(R.string.high_definition);
|
||||
break;
|
||||
case 2:
|
||||
textClarity.setText(R.string.ultra_hd);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void initDate() {
|
||||
LiveNetManager.get(getContext())
|
||||
.getLiveStetUpStatus(String.valueOf(IMLoginManager.get(getContext()).getUserInfo().getId()),
|
||||
new HttpCallback<LiveStetUpStatusModel>() {
|
||||
@Override
|
||||
public void onSuccess(LiveStetUpStatusModel data) {
|
||||
textLiveWishlist.setText(data.getWishListState() ? R.string.do_set : R.string.not_set);
|
||||
textRobot.setText(data.getAiStateState() ? R.string.robot_yes : R.string.robot_no);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
private LiveOpenCallBack callBack;
|
||||
|
||||
public LiveOpenCustomPopup setCallBack(LiveOpenCallBack callBack) {
|
||||
this.callBack = callBack;
|
||||
return this;
|
||||
}
|
||||
|
||||
public interface LiveOpenCallBack {
|
||||
//開播
|
||||
void startLive(LiveRoomTypeBean liveRoomTypeBean, LiveClassBean classBean);
|
||||
|
||||
//選擇清晰度
|
||||
void selectClarity(int selectClarity);
|
||||
|
||||
//打開機器人
|
||||
void openRobot();
|
||||
|
||||
//打開直播間類型
|
||||
void openLiveRoomType(LiveRoomTypeBean liveRoomTypeBean);
|
||||
|
||||
//打開直播類型
|
||||
void openLiveClass(LiveClassBean classBean);
|
||||
|
||||
//打開心願單
|
||||
void openWishlist();
|
||||
}
|
||||
}
|
||||
@@ -111,21 +111,28 @@ public class LiveRobotMessageCustomPopup extends BottomPopupView {
|
||||
@Override
|
||||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||
if (actionId == EditorInfo.IME_ACTION_DONE) {
|
||||
// 修改助手名字
|
||||
LiveNetManager.get(getContext())
|
||||
.setAiRobotDate("ai_time", robotNameSetting.getText().toString(), new HttpCallback<HttpCallbackModel>() {
|
||||
@Override
|
||||
public void onSuccess(HttpCallbackModel data) {
|
||||
robotNameSetting.setVisibility(GONE);
|
||||
robotTime.setVisibility(VISIBLE);
|
||||
robotTime.setText(robotNameSetting.getText().toString());
|
||||
}
|
||||
String time = robotNameSetting.getText().toString();
|
||||
int timeInt = Integer.parseInt(time);
|
||||
if (timeInt > 5) {
|
||||
// 修改助手名字
|
||||
LiveNetManager.get(getContext())
|
||||
.setAiRobotDate("ai_time", time, new HttpCallback<HttpCallbackModel>() {
|
||||
@Override
|
||||
public void onSuccess(HttpCallbackModel data) {
|
||||
robotNameSetting.setVisibility(GONE);
|
||||
robotTime.setVisibility(VISIBLE);
|
||||
robotTime.setText(robotNameSetting.getText().toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
ToastUtil.show(R.string.robot_minimum_interval);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
return false;
|
||||
@@ -136,7 +143,7 @@ public class LiveRobotMessageCustomPopup extends BottomPopupView {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
new XPopup.Builder(getContext())
|
||||
.asCustom(new InputCustomPopup(getContext()).setListener(new InputCustomPopup.InputCustomListener() {
|
||||
.asCustom(new InputCustomPopup(getContext(), R.string.automatic_message_sending).setListener(new InputCustomPopup.InputCustomListener() {
|
||||
@Override
|
||||
public void onConfirm(String text) {
|
||||
//添加消息语
|
||||
|
||||
@@ -82,7 +82,7 @@ public class LiveRobotSayHelloCustomPopup extends BottomPopupView {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
new XPopup.Builder(getContext())
|
||||
.asCustom(new InputCustomPopup(getContext()).setListener(new InputCustomPopup.InputCustomListener() {
|
||||
.asCustom(new InputCustomPopup(getContext(), R.string.automatic_greeting_setting).setListener(new InputCustomPopup.InputCustomListener() {
|
||||
@Override
|
||||
public void onConfirm(String text) {
|
||||
//添加消息语
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.yunbao.common.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
@@ -24,8 +23,6 @@ import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class LiveRobotSettingCustomPopup extends BottomPopupView implements View.OnClickListener {
|
||||
private static String TAG = "AI机器人";
|
||||
private EditText robotNameSetting;
|
||||
@@ -36,6 +33,10 @@ public class LiveRobotSettingCustomPopup extends BottomPopupView implements View
|
||||
|
||||
private int robotStateInt = 1;
|
||||
|
||||
public int getRobotStateInt() {
|
||||
return robotStateInt;
|
||||
}
|
||||
|
||||
public LiveRobotSettingCustomPopup(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ public class RobotMessageViewHolder extends RecyclerView.ViewHolder {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
new XPopup.Builder(itemView.getContext())
|
||||
.asCustom(new InputCustomPopup(itemView.getContext(), message.getContent()).setListener(new InputCustomPopup.InputCustomListener() {
|
||||
.asCustom(new InputCustomPopup(itemView.getContext(), message.getContent(), R.string.automatic_message_sending).setListener(new InputCustomPopup.InputCustomListener() {
|
||||
@Override
|
||||
public void onConfirm(String text) {
|
||||
LiveNetManager.get(itemView.getContext())
|
||||
|
||||
@@ -53,7 +53,7 @@ public class RobotSayHelloViewHoler extends RecyclerView.ViewHolder {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
new XPopup.Builder(itemView.getContext())
|
||||
.asCustom(new InputCustomPopup(itemView.getContext(), message.getContent()).setListener(new InputCustomPopup.InputCustomListener() {
|
||||
.asCustom(new InputCustomPopup(itemView.getContext(), message.getContent(), R.string.automatic_greeting_setting).setListener(new InputCustomPopup.InputCustomListener() {
|
||||
@Override
|
||||
public void onConfirm(String text) {
|
||||
LiveNetManager.get(itemView.getContext())
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/white" />
|
||||
<stroke
|
||||
android:width="1.2dp"
|
||||
android:color="#FFAE05" />
|
||||
<corners android:radius="21dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#FFC621" />
|
||||
<corners android:radius="21dp" />
|
||||
</shape>
|
||||
5
common/src/main/res/drawable/bg_apk_update_btn.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="13.33dp" />
|
||||
<solid android:color="#0D0D0D" />
|
||||
</shape>
|
||||
15
common/src/main/res/drawable/bg_btn_definition.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_selected="true">
|
||||
<shape>
|
||||
<corners android:radius="8dp" />
|
||||
<solid android:color="#20FFB2B2" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_selected="false">
|
||||
<shape>
|
||||
<corners android:radius="8dp" />
|
||||
<solid android:color="#407792D0" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
21
common/src/main/res/drawable/progress_bg.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?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="5dp" />
|
||||
<solid android:color="#E6E6E6" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<!--设置ProgressBar进度条颜色-->
|
||||
<item android:id="@android:id/progress">
|
||||
<clip android:clipOrientation="horizontal">
|
||||
<shape>
|
||||
<corners android:radius="5dp" />
|
||||
<solid android:color="#0D0D0D" />
|
||||
</shape>
|
||||
</clip>
|
||||
</item>
|
||||
</layer-list>
|
||||
@@ -67,5 +67,5 @@
|
||||
<WebView
|
||||
android:id="@+id/webView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_height="match_parent" />
|
||||
</LinearLayout>
|
||||
83
common/src/main/res/layout/apk_update_custom_popup.xml
Normal file
@@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="310dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="310dp"
|
||||
android:src="@mipmap/update_tip_box" />
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="110dp"
|
||||
android:layout_marginStart="28dp"
|
||||
android:layout_marginTop="135dp"
|
||||
android:scrollbars="none">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/update_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="更新內容:
|
||||
1、內容內容內容內容內容內容
|
||||
2、內容內容內容內容內容內容
|
||||
3、內容內容內容內容內容
|
||||
4、內容內容內容內容內容"
|
||||
android:textColor="#1B1B1B"
|
||||
android:textSize="12sp" />
|
||||
</ScrollView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/version_immediate_use"
|
||||
android:layout_width="153.33dp"
|
||||
android:layout_height="26.67dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:background="@drawable/bg_apk_update_btn"
|
||||
android:gravity="center"
|
||||
android:text="@string/version_immediate_use"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="10sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/update_line"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="9dp"
|
||||
android:max="100"
|
||||
android:progress="0"
|
||||
android:progressDrawable="@drawable/progress_bg" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="7dp"
|
||||
android:text="@string/updating"
|
||||
android:textColor="#8C8C8C"
|
||||
android:textSize="11sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dialog_close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginTop="60dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:src="@mipmap/icon_close_tip" />
|
||||
|
||||
</RelativeLayout>
|
||||
143
common/src/main/res/layout/dialog_live_clarity.xml
Normal file
@@ -0,0 +1,143 @@
|
||||
<?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="249dp"
|
||||
android:background="@drawable/bg_live_tota"
|
||||
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/line_sd"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="137dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_btn_definition"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon_sd"
|
||||
android:layout_width="14dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:src="@mipmap/icon_selected" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/sd"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="39dp"
|
||||
android:src="@mipmap/icon_sd" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sd_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/sd"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="@string/standard_clear"
|
||||
android:textColor="#F6F7FB"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/line_hd"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="137dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_btn_definition"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon_hd"
|
||||
android:layout_width="14dp"
|
||||
android:layout_height="14dp"
|
||||
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_margin="10dp"
|
||||
android:src="@mipmap/icon_selected" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/hd"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="39dp"
|
||||
android:src="@mipmap/icon_hd" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/hd_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/hd"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="@string/high_definition"
|
||||
android:textColor="#F6F7FB"
|
||||
android:textSize="16sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/line_fhd"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="137dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_btn_definition"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon_fhd"
|
||||
android:layout_width="14dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_margin="10dp"
|
||||
android:src="@mipmap/icon_selected" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/fhd"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="39dp"
|
||||
android:src="@mipmap/icon_fhd" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/fhd_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/fhd"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="@string/ultra_hd"
|
||||
android:textColor="#F6F7FB"
|
||||
android:textSize="16sp" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tips"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:text="@string/clarity_hint"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
18
common/src/main/res/layout/dialog_toast.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_loading_dialog"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="@string/loading"
|
||||
android:textColor="@color/white"
|
||||
android:layout_margin="15dp"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
71
common/src/main/res/layout/hint_custom_popup.xml
Normal file
@@ -0,0 +1,71 @@
|
||||
<?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="270dp"
|
||||
android:layout_height="180dp"
|
||||
android:orientation="vertical"
|
||||
app:cardCornerRadius="18dp"
|
||||
app:cardElevation="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/ultra_hd_hint"
|
||||
android:textColor="#161616"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/contest"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="@string/ultra_hd_hint2"
|
||||
android:textColor="#999999"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/live_open_cancel"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:background="@drawable/backgroud_live_open_lfet"
|
||||
android:gravity="center"
|
||||
android:text="@string/back"
|
||||
android:textColor="#FFC621"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/live_open_ok"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="@drawable/backgroud_live_open_right"
|
||||
android:gravity="center"
|
||||
android:text="@string/stick_to_choice"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
@@ -46,10 +46,10 @@
|
||||
android:layout_width="87dp"
|
||||
android:layout_height="33dp"
|
||||
android:layout_marginRight="7dp"
|
||||
android:background="@mipmap/tipbox_btn_gray"
|
||||
android:background="@drawable/backgroud_live_open_lfet"
|
||||
android:gravity="center"
|
||||
android:text="@string/cancel"
|
||||
android:textColor="#B1B1B1"
|
||||
android:textColor="#FFC621"
|
||||
android:textSize="14sp" />
|
||||
|
||||
|
||||
|
||||
245
common/src/main/res/layout/view_live_open.xml
Normal file
@@ -0,0 +1,245 @@
|
||||
<?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="280dp"
|
||||
android:layout_height="340dp"
|
||||
android:orientation="vertical"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/confirmation_of_broadcast"
|
||||
android:textColor="#161616"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/line_clarity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="29dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginEnd="29dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/clarity"
|
||||
android:textColor="#999999"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_clarity"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/clarity"
|
||||
android:textColor="#FFC621"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="10dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:src="@mipmap/icon_more_open" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/line_live_room_type"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="29dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="29dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/live_room_type"
|
||||
android:textColor="#999999"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_live_room_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/clarity"
|
||||
android:textColor="#FFC621"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="10dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:src="@mipmap/icon_more_open" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/line_live_class"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="29dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="29dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/live_class1"
|
||||
android:textColor="#999999"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_live_class"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/live_class1"
|
||||
android:textColor="#FFC621"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="10dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:src="@mipmap/icon_more_open" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/line_live_wishlist"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="29dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="29dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/live_wishlist"
|
||||
android:textColor="#999999"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_live_wishlist"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/clarity"
|
||||
android:textColor="#FFC621"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="10dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:src="@mipmap/icon_more_open" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/line_robot"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="29dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="29dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/robot"
|
||||
android:textColor="#999999"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_robot"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/clarity"
|
||||
android:textColor="#FFC621"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="10dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:src="@mipmap/icon_more_open" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/live_open_cancel"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:background="@drawable/backgroud_live_open_lfet"
|
||||
android:gravity="center"
|
||||
android:text="@string/back"
|
||||
android:textColor="#FFC621"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/live_open_ok"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="@drawable/backgroud_live_open_right"
|
||||
android:gravity="center"
|
||||
android:text="@string/broadcast"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 18 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_close_tip.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_fhd.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_hd.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_live_type_normal_1.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_live_type_normal_2.png
Normal file
|
After Width: | Height: | Size: 883 B |
BIN
common/src/main/res/mipmap-xxhdpi/icon_live_type_pay_1.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_live_type_pay_2.png
Normal file
|
After Width: | Height: | Size: 955 B |
BIN
common/src/main/res/mipmap-xxhdpi/icon_live_type_pwd_1.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_live_type_pwd_2.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_live_type_time_1.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_live_type_time_2.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_more_open.png
Normal file
|
After Width: | Height: | Size: 632 B |
BIN
common/src/main/res/mipmap-xxhdpi/icon_sd.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_selected.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/update_tip_box.png
Normal file
|
After Width: | Height: | Size: 230 KiB |
@@ -934,4 +934,72 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="studio_gift_effects">Blocking gift effects</string>
|
||||
<string name="studio_ride_effects">Blocking seat effects</string>
|
||||
<string name="want_pre">If you want to Minimize Play,\nYou can go to set the license.</string>
|
||||
|
||||
|
||||
<string name="in_batch">In a batch</string>
|
||||
<string name="chat_chat">Chat</string>
|
||||
<string name="lucky_angel" >Congratulations %s have won %s in the Lucky Angel! The next lucky angel will be you!</string>
|
||||
<string name="lucky_100" >Congratulations on %s winning %s in Luck 100 %%! Go pass on the good luck!</string>
|
||||
<string name="user_card_guard" >Guardian group %s people</string>
|
||||
<string name="to_receive" >receive</string>
|
||||
<string name="to_complete" >To complete</string>
|
||||
<string name="already_collected" >Already collected</string>
|
||||
<string name="image_quality_selection" >Image quality selection</string>
|
||||
<string name="more_settings" >More Settings</string>
|
||||
<string name="moer">view more</string>
|
||||
<string name="gift_way">The gift is on the way...</string>
|
||||
<string name="start_pk">The gift is on the way</string>
|
||||
<string name="number_of_remaining_times">Remaining count :%s</string>
|
||||
<string name="confirmed_to_proceed">Whether to confirm multiple PK (deduct 1 point after confirmation) remaining times on the day: %s</string>
|
||||
<string name="invite_anchor">Invite \n anchor</string>
|
||||
<string name="end_pk">End \nPK</string>
|
||||
<string name="pk_time">Time %s</string>
|
||||
|
||||
<string name="random_pk_dialog_apply" >accept</string>
|
||||
<string name="random_pk_dialog_refuse" >refuse</string>
|
||||
<string name="random_pk_dialog_refuse_again" >Persist in refusing</string>
|
||||
<string name="random_pk_dialog_title" >Random PK hint</string>
|
||||
|
||||
<string name="speech_robot_setup" >Automatic speech robot setup</string>
|
||||
<string name="robot_switch" >Robot switch</string>
|
||||
<string name="robot_name_setting" >Robot name setting</string>
|
||||
<string name="word_limit" >The word limit is 2 to 8 word</string>
|
||||
<string name="automatic_greeting_setting" >Automatic greeting setting</string>
|
||||
<string name="configured_items" >Number of configured items</string>
|
||||
<string name="automatic_message_sending" >Set automatic message sending</string>
|
||||
<string name="robot_go_setting" >Go to set</string>
|
||||
<string name="robot_hint" >Thank you for sending gifts, PK start, PK end automatic robot message, \n does not support customization.</string>
|
||||
<string name="robot_add_content" >Add content</string>
|
||||
<string name="robot_add_content_hint1" >At regular intervals, the robot automatically says the following sentence at random。</string>
|
||||
<string name="robot_add_content_hint2" >Fill in the content recommendation, such as: send wish list, add fan group, etc</string>
|
||||
<string name="robot_automatic_speech_interval" >Automatic speech interval (minutes)</string>
|
||||
<string name="robot_minimum_interval" >At least once every 5 minutes</string>
|
||||
<string name="robot_add_content_hint3" >When a user enters the studio, the robot will @the user and automatically</string>
|
||||
<string name="robot_add_content_hint4" >The following sentence is random. Set a minimum of 1 to a maximum of 20.</string>
|
||||
<string name="robot_setup" >Robot setup</string>
|
||||
<string name="high_definition" >High definition</string>
|
||||
<string name="standard_clear" >fluency</string>
|
||||
<string name="ultra_hd" >Ultra hd</string>
|
||||
<string name="clarity_hint" >After determining the definition of the broadcast, you need to restart the broadcast to change</string>
|
||||
<string name="confirmation_of_broadcast" >Confirmation of broadcast Settings</string>
|
||||
<string name="clarity" >clarity</string>
|
||||
<string name="live_class1" >Live channel</string>
|
||||
<string name="broadcast" >broadcast</string>
|
||||
<string name="robot" >robot</string>
|
||||
<string name="do_set" >set</string>
|
||||
<string name="not_set" >Not set</string>
|
||||
<string name="robot_no" >no</string>
|
||||
<string name="robot_yes" >yes</string>
|
||||
<string name="ultra_hd_hint" >Ultra HD hint</string>
|
||||
<string name="ultra_hd_hint2" >In the case of unstable network speed, the selection of ultra HD may lead to the delay of the picture in the broadcast room. Do you confirm the selection?</string>
|
||||
<string name="stick_to_choice" >Stick to choice</string>
|
||||
<string name="net_hint" >Network prompt</string>
|
||||
<string name="net_hint2" >The system detects that your network is unstable and insufficient device memory will affect the fluency of your live broadcast. Therefore, it is recommended that you choose fluency and clarity.</string>
|
||||
<string name="check_the_new_version" >check version</string>
|
||||
<string name="discover_a_new_version" >Update</string>
|
||||
<string name="latest_version" >Latest Version</string>
|
||||
<string name="updating" >updating</string>
|
||||
<string name="live_user_ban_fhd" >There is no choice, the anchor is not turned on FHD live.</string>
|
||||
<string name="live_user_ban_hd" >There is no choice, the anchor is not turned on HD live.</string>
|
||||
<string name="function_is_suspended" >Sorry, this feature is on hold.</string>
|
||||
</resources>
|
||||
|
||||
@@ -723,7 +723,7 @@
|
||||
<string name="live_wishlist">心願單</string>
|
||||
<string name="live_zg">娛樂整蠱</string>
|
||||
<string name="live_dr">多人PK</string>
|
||||
<string name="live_random" translatable="false">随机PK</string>
|
||||
<string name="live_random" >随机PK</string>
|
||||
<string name="live_mic">語音連麥</string>
|
||||
<string name="live_wks">周星榜</string>
|
||||
<string name="live_zslk">暫時離開</string>
|
||||
@@ -958,13 +958,14 @@
|
||||
<string name="in_batch">換一批</string>
|
||||
<string name="chat_chat">聊聊天</string>
|
||||
<string name="want_pre">想在其他APP上方也顯示小窗,\n可前往設置進行授權。</string>
|
||||
<string name="lucky_angel" translatable="false">恭喜 %s 在幸運天使中抽中 %s!下一個幸運天使就是你哦!</string>
|
||||
<string name="user_card_guard" translatable="false">守護團%s人</string>
|
||||
<string name="to_receive" translatable="false">領取</string>
|
||||
<string name="to_complete" translatable="false">去完成</string>
|
||||
<string name="already_collected" translatable="false">已領取</string>
|
||||
<string name="image_quality_selection" translatable="false">畫質選擇</string>
|
||||
<string name="more_settings" translatable="false">更多設置</string>
|
||||
<string name="lucky_angel" >恭喜 %s 在幸運天使中抽中 %s!下一個幸運天使就是你哦!</string>
|
||||
<string name="lucky_100" >恭喜 %s 在好運百分百中抽中 %s!快去接力好運吧~</string>
|
||||
<string name="user_card_guard" >守護團%s人</string>
|
||||
<string name="to_receive" >領取</string>
|
||||
<string name="to_complete" >去完成</string>
|
||||
<string name="already_collected" >已領取</string>
|
||||
<string name="image_quality_selection" >畫質選擇</string>
|
||||
<string name="more_settings" >更多設置</string>
|
||||
<string name="moer">查看更多</string>
|
||||
<string name="gift_way">礼物正在获取中...</string>
|
||||
<string name="start_pk">開始PK</string>
|
||||
@@ -974,26 +975,51 @@
|
||||
<string name="end_pk">結束\nPK</string>
|
||||
<string name="pk_time">時間 %s</string>
|
||||
|
||||
<string name="random_pk_dialog_apply" translatable="false">接受</string>
|
||||
<string name="random_pk_dialog_refuse" translatable="false">拒绝</string>
|
||||
<string name="random_pk_dialog_refuse_again" translatable="false">坚持拒绝</string>
|
||||
<string name="random_pk_dialog_title" translatable="false">随机PK提示</string>
|
||||
<string name="random_pk_dialog_apply" >接受</string>
|
||||
<string name="random_pk_dialog_refuse" >拒绝</string>
|
||||
<string name="random_pk_dialog_refuse_again" >坚持拒绝</string>
|
||||
<string name="random_pk_dialog_title" >随机PK提示</string>
|
||||
|
||||
<string name="speech_robot_setup" translatable="false">自動發言機器人設置</string>
|
||||
<string name="robot_switch" translatable="false">機器人開關</string>
|
||||
<string name="robot_name_setting" translatable="false">機器人名字設置</string>
|
||||
<string name="word_limit" translatable="false">字數限制2-8個字</string>
|
||||
<string name="automatic_greeting_setting" translatable="false">自動打招呼設置</string>
|
||||
<string name="configured_items" translatable="false">已配置條數</string>
|
||||
<string name="automatic_message_sending" translatable="false">自動發消息設置</string>
|
||||
<string name="robot_go_setting" translatable="false">前往設置</string>
|
||||
<string name="robot_hint" translatable="false">感謝送禮、PK開始、PK結束的自動機器人消息,\n暫不支持自定義。</string>
|
||||
<string name="robot_add_content" translatable="false">添加內容</string>
|
||||
<string name="robot_add_content_hint1" translatable="false">每隔一段時間,機器人自動隨機以下一句話發出。</string>
|
||||
<string name="robot_add_content_hint2" translatable="false">填寫內容推薦,如:求送心願單、加粉絲團等</string>
|
||||
<string name="robot_automatic_speech_interval" translatable="false">自動發言間隔時間(分鐘)</string>
|
||||
<string name="robot_minimum_interval" translatable="false">最少間隔5分鐘1次</string>
|
||||
<string name="robot_add_content_hint3" translatable="false">當有用戶進入直播間時,機器人會@該用戶並自動</string>
|
||||
<string name="robot_add_content_hint4" translatable="false">隨機以下一句話。最少設置1條,最多20條。</string>
|
||||
<string name="robot_setup" translatable="false">機器人設置</string>
|
||||
<string name="speech_robot_setup" >自動發言機器人設置</string>
|
||||
<string name="robot_switch" >機器人開關</string>
|
||||
<string name="robot_name_setting" >機器人名字設置</string>
|
||||
<string name="word_limit" >字數限制2-8個字</string>
|
||||
<string name="automatic_greeting_setting" >自動打招呼設置</string>
|
||||
<string name="configured_items" >已配置條數</string>
|
||||
<string name="automatic_message_sending" >自動發消息設置</string>
|
||||
<string name="robot_go_setting" >前往設置</string>
|
||||
<string name="robot_hint" >感謝送禮、PK開始、PK結束的自動機器人消息,\n暫不支持自定義。</string>
|
||||
<string name="robot_add_content" >添加內容</string>
|
||||
<string name="robot_add_content_hint1" >每隔一段時間,機器人自動隨機以下一句話發出。</string>
|
||||
<string name="robot_add_content_hint2" >填寫內容推薦,如:求送心願單、加粉絲團等</string>
|
||||
<string name="robot_automatic_speech_interval" >自動發言間隔時間(分鐘)</string>
|
||||
<string name="robot_minimum_interval" >最少間隔5分鐘1次</string>
|
||||
<string name="robot_add_content_hint3" >當有用戶進入直播間時,機器人會@該用戶並自動</string>
|
||||
<string name="robot_add_content_hint4" >隨機以下一句話。最少設置1條,最多20條。</string>
|
||||
<string name="robot_setup" >機器人設置</string>
|
||||
<string name="high_definition" >高清</string>
|
||||
<string name="standard_clear" >流暢</string>
|
||||
<string name="ultra_hd" >超高清</string>
|
||||
<string name="clarity_hint" >確定清晰度開播後,需要重新開播才能更改</string>
|
||||
<string name="confirmation_of_broadcast" >開播設置確認</string>
|
||||
<string name="clarity" >清晰度</string>
|
||||
<string name="live_class1" >直播頻道</string>
|
||||
<string name="broadcast" >開播</string>
|
||||
<string name="robot" >機器人</string>
|
||||
<string name="do_set" >已設置</string>
|
||||
<string name="not_set" >未設置</string>
|
||||
<string name="robot_no" >關</string>
|
||||
<string name="robot_yes" >開</string>
|
||||
<string name="ultra_hd_hint" >超高清提示</string>
|
||||
<string name="ultra_hd_hint2" >在網速不穩定的情況下,選擇超高清將會有可能導致直播間畫面卡頓,是否確認選擇?</string>
|
||||
<string name="stick_to_choice" >堅持選擇</string>
|
||||
<string name="net_hint" >網絡提示</string>
|
||||
<string name="net_hint2" >系統監測到您的網絡不穩定,設備內存不足將會影響到您的直播流暢度,因此建議您選擇流暢清晰度。</string>
|
||||
<string name="check_the_new_version" >检查新版本</string>
|
||||
<string name="discover_a_new_version" >發現新版本,點此更新</string>
|
||||
<string name="latest_version" >已是最新版本</string>
|
||||
<string name="updating" >更新中</string>
|
||||
<string name="live_user_ban_fhd" >無法選擇,該主播未開啟超高清直播。</string>
|
||||
<string name="live_user_ban_hd" >無法選擇,該主播未開啟高清直播。</string>
|
||||
<string name="function_is_suspended" >抱歉,該功能暫停使用中。</string>
|
||||
</resources>
|
||||
|
||||