修改中英文
This commit is contained in:
parent
1625135d0c
commit
a25ce2034f
@ -7,6 +7,7 @@ import android.os.Environment;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.util.SparseArray;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.yunbao.common.bean.ConfigBean;
|
||||
@ -19,6 +20,7 @@ import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.SpUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@ -78,8 +80,6 @@ public class CommonAppConfig {
|
||||
public static int alert_end_time = 1;
|
||||
|
||||
|
||||
|
||||
|
||||
private CommonAppConfig() {
|
||||
|
||||
}
|
||||
@ -148,6 +148,7 @@ public class CommonAppConfig {
|
||||
}
|
||||
return Constants.DIAMONDS;
|
||||
}
|
||||
|
||||
public String getGoldCoinName() {
|
||||
ConfigBean configBean = getConfig();
|
||||
if (configBean != null) {
|
||||
@ -183,12 +184,19 @@ public class CommonAppConfig {
|
||||
if (configBean != null) {
|
||||
callback.callback(configBean);
|
||||
} else {
|
||||
CommonHttpUtil.getConfig(null,callback);
|
||||
CommonHttpUtil.getConfig(null, callback);
|
||||
}
|
||||
}
|
||||
|
||||
private String[][] liveType = null;
|
||||
|
||||
public String[][] getLiveType() {
|
||||
return liveType;
|
||||
}
|
||||
|
||||
public void setConfig(ConfigBean config) {
|
||||
mConfig = config;
|
||||
liveType = config.getLiveType();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -385,13 +393,12 @@ public class CommonAppConfig {
|
||||
public String getAppName() {
|
||||
if (TextUtils.isEmpty(mAppName)) {
|
||||
int res = CommonAppContext.sInstance.getResources().getIdentifier("app_name", "string", "myname.pdlive.shayu");
|
||||
mAppName =WordUtil.getString(res);
|
||||
mAppName = WordUtil.getString(res);
|
||||
}
|
||||
return mAppName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取App图标的资源id
|
||||
*/
|
||||
@ -447,9 +454,10 @@ public class CommonAppConfig {
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
Log.i("tag","url:"+res);
|
||||
Log.i("tag", "url:" + res);
|
||||
return res;
|
||||
}
|
||||
|
||||
private static boolean getMetaDataBoolean(String key) {
|
||||
boolean res = false;
|
||||
try {
|
||||
@ -670,6 +678,7 @@ public class CommonAppConfig {
|
||||
public void setBeautySdkType(String sproutType) {
|
||||
SpUtil.getInstance().setStringValue(SpUtil.BEAUTY_SDK_TYPE, sproutType);
|
||||
}
|
||||
|
||||
public String getBeautySdkType() {
|
||||
return SpUtil.getInstance().getStringValue(SpUtil.BEAUTY_SDK_TYPE);
|
||||
}
|
||||
@ -678,6 +687,7 @@ public class CommonAppConfig {
|
||||
public void setTurnTableEnable(String enable) {
|
||||
SpUtil.getInstance().setStringValue(SpUtil.TURNTABLE_ENABLE, enable);
|
||||
}
|
||||
|
||||
public String getTurnTableEnable() {
|
||||
return SpUtil.getInstance().getStringValue(SpUtil.TURNTABLE_ENABLE);
|
||||
}
|
||||
@ -686,6 +696,7 @@ public class CommonAppConfig {
|
||||
public void setBeauty360TieZhiUrl(String tieZhiUrl) {
|
||||
SpUtil.getInstance().setStringValue(SpUtil.BEAUTY_360_TIEZHI_URL, tieZhiUrl);
|
||||
}
|
||||
|
||||
public String getBeauty360TieZhiUrl() {
|
||||
return SpUtil.getInstance().getStringValue(SpUtil.BEAUTY_360_TIEZHI_URL);
|
||||
}
|
||||
@ -694,15 +705,17 @@ public class CommonAppConfig {
|
||||
public void setBeauty360TieZhiExist(boolean isExist) {
|
||||
SpUtil.getInstance().setBooleanValue(SpUtil.BEAUTY_360_TIEZHI_EXIST, isExist);
|
||||
}
|
||||
|
||||
public boolean getBeauty360TieZhiExist() {
|
||||
return SpUtil.getInstance().getBooleanValue(SpUtil.BEAUTY_360_TIEZHI_EXIST);
|
||||
}
|
||||
|
||||
//设置主播pk时间
|
||||
public void setAnchorPkTime(String pkTime){
|
||||
public void setAnchorPkTime(String pkTime) {
|
||||
SpUtil.getInstance().setStringValue(SpUtil.ANCHOR_PK_TIME, pkTime);
|
||||
}
|
||||
public String getAnchorPkTime(){
|
||||
|
||||
public String getAnchorPkTime() {
|
||||
return SpUtil.getInstance().getStringValue(SpUtil.ANCHOR_PK_TIME);
|
||||
}
|
||||
|
||||
|
@ -157,7 +157,7 @@ public class SudGameListPopup extends BottomPopupView {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
LiveNetManager.get(getContext())
|
||||
.randomRoom(new com.yunbao.common.http.base.HttpCallback<CreateSudRoomModel>() {
|
||||
.randomRoom(id, mSill, roomHolderType,new com.yunbao.common.http.base.HttpCallback<CreateSudRoomModel>() {
|
||||
@Override
|
||||
public void onSuccess(CreateSudRoomModel data) {
|
||||
if (data != null) {
|
||||
|
@ -83,7 +83,7 @@ public class LiveNewWishListFragment extends BaseFragment {
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(R.string.net_error);
|
||||
ToastUtil.show(getActivity().getString(R.string.net_error));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -163,7 +163,7 @@ public class CommonHttpUtil {
|
||||
} else {
|
||||
locale = IMLoginManager.get(context).getLocaleLanguage();
|
||||
}
|
||||
if (locale.getLanguage().equals("zh")) {
|
||||
if (WordUtil.isNewZh()) {
|
||||
lang = "chinese";
|
||||
|
||||
} else {
|
||||
|
@ -1027,6 +1027,9 @@ public interface PDLiveApi {
|
||||
|
||||
@GET("/api/public/?service=Sudgameserver.randomRoom")
|
||||
Observable<ResponseModel<CreateSudRoomModel>> randomRoom(
|
||||
@Query("sud_game_id") String sudGameId,
|
||||
@Query("threshold") String threshold,
|
||||
@Query("room_holder_type") String roomHolderType
|
||||
);
|
||||
|
||||
@GET("/api/public/?service=Sudgameserver.checkRoomStatus")
|
||||
|
@ -2270,9 +2270,9 @@ public class LiveNetManager {
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void randomRoom(HttpCallback<CreateSudRoomModel> callback) {
|
||||
public void randomRoom(String sudGameId, String threshold, String roomHolderType, HttpCallback<CreateSudRoomModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.randomRoom()
|
||||
.randomRoom(sudGameId, threshold, roomHolderType)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<CreateSudRoomModel>>() {
|
||||
|
@ -8,6 +8,7 @@ import android.text.TextUtils;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.google.gson.Gson;
|
||||
import com.lzf.easyfloat.EasyFloat;
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
@ -57,6 +58,8 @@ public class IMLoginManager extends BaseCacheManager {
|
||||
put(KEY_GAME, sudGameJson);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getSudGame() {
|
||||
return getString(KEY_GAME);
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ public class ToastUtil {
|
||||
|
||||
|
||||
public static void show(int res) {
|
||||
show(WordUtil.getNewString(res));
|
||||
show(CommonAppContext.sInstance.getString(res));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -35,16 +35,18 @@
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/live_open_cancel"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:background="@drawable/backgroud_live_open_lfet"
|
||||
android:gravity="center"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text="@string/back"
|
||||
android:textColor="#FFC621"
|
||||
android:textSize="14sp" />
|
||||
@ -56,9 +58,9 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/live_open_ok"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:background="@drawable/backgroud_live_open_right"
|
||||
android:gravity="center"
|
||||
android:text="@string/stick_to_choice"
|
||||
|
@ -5,7 +5,7 @@ ext {
|
||||
minSdkVersion : 21,
|
||||
targetSdkVersion : 33,
|
||||
versionCode : 450,
|
||||
versionName : "6.5.6"
|
||||
versionName : "6.6.0"
|
||||
]
|
||||
manifestPlaceholders = [
|
||||
//正式、
|
||||
|
@ -1109,12 +1109,12 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
bundle.putString(Constants.URL,
|
||||
(CommonAppConfig.HOST + "/h5/live/joinFansClub.html" +
|
||||
"?uid=" + userInfo.getId() +
|
||||
"&token=" + userInfo.getToken() + "&anchorUid=" + mLiveUid)+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0));
|
||||
"&token=" + userInfo.getToken() + "&anchorUid=" + mLiveUid) + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0));
|
||||
} else {
|
||||
bundle.putString(Constants.URL,
|
||||
( CommonAppConfig.HOST + "/h5/live/fansClub.html" +
|
||||
(CommonAppConfig.HOST + "/h5/live/fansClub.html" +
|
||||
"?uid=" + userInfo.getId() +
|
||||
"&token=" + userInfo.getToken() + "&anchorUid=" + mLiveUid)+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0));
|
||||
"&token=" + userInfo.getToken() + "&anchorUid=" + mLiveUid) + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0));
|
||||
}
|
||||
bundle.putString("liveUid", mLiveUid);
|
||||
bundle.putString("anchorName", mAncherName);
|
||||
@ -1132,7 +1132,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
case LIVE_WKS://周星榜
|
||||
String weeklyStarUrl = CommonAppConfig.HOST + "/h5/activity/weekStar/index.html?&uid="
|
||||
+ userInfo.getId() +
|
||||
"&token=" + userInfo.getToken() + "&anchorUid=" + mLiveUid+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
|
||||
"&token=" + userInfo.getToken() + "&anchorUid=" + mLiveUid + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
|
||||
ZhuangBanActivity.forward(mContext, weeklyStarUrl, false, 1);
|
||||
break;
|
||||
case NOBLE:
|
||||
@ -1142,7 +1142,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
+ "&token=" + userInfo.getToken()
|
||||
+ "&anchorUid=" + mLiveBean.getUid()
|
||||
+ "&ancherName=" + mLiveBean.getUserNiceName()
|
||||
+ "&uid=" + userInfo.getId()+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
|
||||
+ "&uid=" + userInfo.getId() + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
|
||||
ZhuangBanActivity.forward(mContext, nobleUrl, false, 1);
|
||||
break;
|
||||
case LIAN_MAI:
|
||||
@ -1219,7 +1219,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
case ACTIVITY_CENTER://活动中心
|
||||
String url = CommonAppConfig.HOST + "/h5/live/hallOfFame/index.html?g=Appapi&m=Turntable&a=tricky";
|
||||
url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token="
|
||||
+ CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
|
||||
+ CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
|
||||
Log.i("tag", url);
|
||||
Intent intent = new Intent(mContext, ZhuangBanActivity.class);
|
||||
intent.putExtra("url", url);
|
||||
@ -1244,7 +1244,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
url += "?anchorUid=" + mLiveUid
|
||||
+ "&stream=" + mStream
|
||||
+ "&uid=" + CommonAppConfig.getInstance().getUid()
|
||||
+ "&token=" + CommonAppConfig.getInstance().getToken()+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
|
||||
+ "&token=" + CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
|
||||
LiveHDDialogFragment liveHDDialogFragment = new LiveHDDialogFragment();
|
||||
bundle.putString("url", url);
|
||||
bundle.putInt("show_type", 0);
|
||||
@ -1495,6 +1495,11 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
manager.showGiftWall(event.getUid(), event.isVoicePress(), event.getUname(), event.getAvatar());
|
||||
}
|
||||
break;
|
||||
case SUD_GAME_CREATE_ROOM:
|
||||
if (manager != null) {
|
||||
manager.setSudName(event.getAvatar());
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
@ -379,7 +379,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
if (isDRPK != 1) {
|
||||
openMicWindow(1);
|
||||
} else {
|
||||
ToastUtil.show("您已在PK中");
|
||||
ToastUtil.show(WordUtil.isNewZh()?"您已在PK中":"You are already in the PK");
|
||||
}
|
||||
break;
|
||||
case Constants.LIVE_FUNC_DR://多人PK
|
||||
@ -460,7 +460,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
}
|
||||
});
|
||||
} else {
|
||||
ToastUtil.show("您已在PK中");
|
||||
ToastUtil.show(WordUtil.isNewZh()?"您已在PK中":"You are already in the PK");
|
||||
}
|
||||
break;
|
||||
case Constants.LIVE_FUNC_BEAUTY://美颜
|
||||
@ -496,7 +496,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
//openLinkMicAnchorWindow(false);
|
||||
openFreePkWindow();
|
||||
} else {
|
||||
ToastUtil.show("您已在PK中");
|
||||
ToastUtil.show(WordUtil.isNewZh()?"您已在PK中":"You are already in the PK");
|
||||
}
|
||||
break;
|
||||
case Constants.LIVE_FUNC_WISHLIST://心愿单
|
||||
@ -517,7 +517,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
if (isDRPK != 1) {
|
||||
openRandomPkWindow();
|
||||
} else {
|
||||
ToastUtil.show("您已在PK中");
|
||||
ToastUtil.show(WordUtil.isNewZh()?"您已在PK中":"You are already in the PK");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -1,9 +1,6 @@
|
||||
package com.yunbao.live.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@ -11,11 +8,14 @@ import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.bean.ConfigBean;
|
||||
import com.yunbao.common.bean.LiveRoomTypeBean;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.common.bean.LiveRoomTypeBean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@ -38,10 +38,8 @@ public class LiveRoomTypeAdapter extends RecyclerView.Adapter<LiveRoomTypeAdapte
|
||||
mCheckedColor = ContextCompat.getColor(context, R.color.global);
|
||||
mUnCheckedColor = 0xffffffff;
|
||||
mList = new ArrayList<>();
|
||||
ConfigBean configBean = CommonAppConfig.getInstance().getConfig();
|
||||
Log.i("tag",configBean.toString());
|
||||
if (configBean != null) {
|
||||
String[][] liveType = configBean.getLiveType();
|
||||
|
||||
String[][] liveType = CommonAppConfig.getInstance().getLiveType();
|
||||
if (liveType != null) {
|
||||
Log.i("tag", Arrays.toString(liveType));
|
||||
List<LiveRoomTypeBean> list = LiveRoomTypeBean.getLiveTypeList(liveType);
|
||||
@ -52,7 +50,7 @@ public class LiveRoomTypeAdapter extends RecyclerView.Adapter<LiveRoomTypeAdapte
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
mInflater = LayoutInflater.from(context);
|
||||
mOnClickListener = new View.OnClickListener() {
|
||||
|
@ -12,14 +12,12 @@ import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.bean.ConfigBean;
|
||||
import com.yunbao.common.bean.LiveRoomTypeBean;
|
||||
import com.yunbao.common.dialog.AbsDialogFragment;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.common.bean.LiveRoomTypeBean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@ -81,15 +79,15 @@ public class LiveNewRoomTypeDialogFragment extends AbsDialogFragment implements
|
||||
pwd.setOnClickListener(view -> select(false));
|
||||
submit.setOnClickListener(view -> {
|
||||
if (isSelectPublic) {
|
||||
LiveRoomTypeBean bean = new LiveRoomTypeBean(0,mContext.getString(R.string.live_room_public));
|
||||
if(mCallback!=null) {
|
||||
LiveRoomTypeBean bean = new LiveRoomTypeBean(0, mContext.getString(R.string.live_room_public));
|
||||
if (mCallback != null) {
|
||||
mCallback.callback(bean);
|
||||
}
|
||||
} else {
|
||||
for (LiveRoomTypeBean bean : mList) {
|
||||
if (bean.getId() == Constants.LIVE_TYPE_PWD) {
|
||||
bean.setChecked(true);
|
||||
if(mCallback!=null) {
|
||||
if (mCallback != null) {
|
||||
mCallback.callback(bean);
|
||||
}
|
||||
break;
|
||||
@ -103,9 +101,8 @@ public class LiveNewRoomTypeDialogFragment extends AbsDialogFragment implements
|
||||
|
||||
private void initData() {
|
||||
mList = new ArrayList<>();
|
||||
ConfigBean configBean = CommonAppConfig.getInstance().getConfig();
|
||||
Log.i("tag", configBean.toString());
|
||||
String[][] liveType = configBean.getLiveType();
|
||||
|
||||
String[][] liveType = CommonAppConfig.getInstance().getLiveType();
|
||||
if (liveType != null) {
|
||||
Log.i("tag", Arrays.toString(liveType));
|
||||
List<LiveRoomTypeBean> list = LiveRoomTypeBean.getLiveTypeList(liveType);
|
||||
|
@ -55,7 +55,7 @@ public class LiveAudienceEvent extends BaseModel {
|
||||
private boolean isContactGift;
|
||||
private boolean isPk;
|
||||
public String mStream;
|
||||
public String mLiveUid,giftId;
|
||||
public String mLiveUid, giftId;
|
||||
|
||||
public String getGiftId() {
|
||||
return giftId;
|
||||
@ -463,9 +463,10 @@ public class LiveAudienceEvent extends BaseModel {
|
||||
RED_PACKET(69, "RedPacket"),
|
||||
RED_PACKET_SUPER_JACKPOT(70, "超级红包"),
|
||||
INPUT_DIALOG(71, "输入框"),
|
||||
IS_ATTENTION(72,"是否关注主播"),
|
||||
GIFT_WALL(73,"礼物墙"),
|
||||
UPDATE_FANS_TASK_STATUS(74,"更新粉丝任务状态");
|
||||
IS_ATTENTION(72, "是否关注主播"),
|
||||
GIFT_WALL(73, "礼物墙"),
|
||||
UPDATE_FANS_TASK_STATUS(74, "更新粉丝任务状态"),
|
||||
SUD_GAME_CREATE_ROOM(75, "主播创建sud游戏");
|
||||
|
||||
private int type;
|
||||
private String name;
|
||||
|
@ -741,6 +741,11 @@ public class SocketRyClient {
|
||||
case SOCKET_LIVE_MSG_TO_USER:
|
||||
sendToUserMsg(map);
|
||||
break;
|
||||
case "SudGameCreateRoom":
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.SUD_GAME_CREATE_ROOM)
|
||||
.setAvatar(map.getString("room_name")));
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -35,6 +35,8 @@ import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.event.LivePushRyEvent;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.LiveHttpConsts;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.interfaces.ImageResultCallback;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
@ -64,8 +66,6 @@ import com.yunbao.live.dialog.LiveNewRoomClassDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveNewRoomTypeDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveTimeDialogFragment;
|
||||
import com.yunbao.live.event.LiveAudienceEvent;
|
||||
import com.yunbao.common.http.LiveHttpConsts;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
@ -583,7 +583,7 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
||||
url.append("&uid=")
|
||||
.append(model.getId())
|
||||
.append("&token=")
|
||||
.append(model.getToken()) .append("&isZh=")
|
||||
.append(model.getToken()).append("&isZh=")
|
||||
.append(WordUtil.isNewZh() ? "1" : 0);
|
||||
RouteUtil.forwardLiveZhuangBanActivity(url.toString(), false);
|
||||
} else if (i == R.id.btn_live_anchor_say) {
|
||||
@ -762,7 +762,7 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
||||
/**
|
||||
* 选择直播类型
|
||||
*/
|
||||
private LiveRoomTypeBean liveRoomTypeBean = new LiveRoomTypeBean(0,mContext.getString(R.string.live_room_public));
|
||||
private LiveRoomTypeBean liveRoomTypeBean = new LiveRoomTypeBean(0, mContext.getString(R.string.live_room_public));
|
||||
|
||||
private void chooseLiveType() {
|
||||
Bundle bundle = new Bundle();
|
||||
@ -809,14 +809,14 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
||||
* 密码房间
|
||||
*/
|
||||
private void onLiveTypePwd(final LiveRoomTypeBean bean) {
|
||||
DialogUitl.showSimpleInputDialog(mContext,mContext.getString(R.string.live_set_pwd), DialogUitl.INPUT_TYPE_NUMBER_PASSWORD, 8, new DialogUitl.SimpleCallback() {
|
||||
DialogUitl.showSimpleInputDialog(mContext, mContext.getString(R.string.live_set_pwd), DialogUitl.INPUT_TYPE_NUMBER_PASSWORD, 8, new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
if (TextUtils.isEmpty(content)) {
|
||||
ToastUtil.show(R.string.live_set_pwd_empty);
|
||||
} else {
|
||||
mLiveType = bean.getId();
|
||||
mLiveTypeTextView.setText(bean.getName());
|
||||
mLiveTypeTextView.setText(WordUtil.isNewZh() ? "密碼房" : "password room");
|
||||
if (StringUtil.isInt(content)) {
|
||||
mLiveTypeVal = Integer.parseInt(content);
|
||||
}
|
||||
@ -831,7 +831,7 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
||||
* 付费房间
|
||||
*/
|
||||
private void onLiveTypePay(final LiveRoomTypeBean bean) {
|
||||
DialogUitl.showSimpleInputDialog(mContext,mContext.getString(R.string.live_set_fee), DialogUitl.INPUT_TYPE_NUMBER, 8, new DialogUitl.SimpleCallback() {
|
||||
DialogUitl.showSimpleInputDialog(mContext, mContext.getString(R.string.live_set_fee), DialogUitl.INPUT_TYPE_NUMBER, 8, new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
if (TextUtils.isEmpty(content)) {
|
||||
|
@ -650,6 +650,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
sud_text_name.setText(WordUtil.isNewZh() ?
|
||||
String.format("主播创建了【%s】房间,快来与主播同玩~", sudName) :
|
||||
String.format("The anchor has created a 【%s】 room. Come and play with the anchor~", sudName));
|
||||
sud_text_name.setVisibility(View.VISIBLE);
|
||||
ViewClicksAntiShake.clicksAntiShake(sud_text_name, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
|
@ -168,7 +168,7 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
|
||||
if (PKing == false) {
|
||||
((LiveRyAnchorActivity) mContext).openLinkMicAnchorWindow(true);
|
||||
} else {
|
||||
ToastUtil.show("您已在PK中");
|
||||
ToastUtil.show(WordUtil.isNewZh()?"您已在PK中":"You are already in the PK");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -1956,6 +1956,12 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
}
|
||||
}
|
||||
|
||||
public void setSudName(String sudName) {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
mLiveRoomViewHolder.setSudName(sudName);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 全服喇叭
|
||||
*
|
||||
|
@ -86,6 +86,7 @@
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -100,7 +101,7 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/random_pk_info_btn"
|
||||
android:layout_width="188dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:background="@drawable/bg_live_random_pk_info_btn"
|
||||
android:gravity="center"
|
||||
@ -115,14 +116,15 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/random_pk_info_btn_start"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="16sp" />
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
|
||||
android:id="@+id/random_pk_btn_desc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="10sp"
|
||||
android:textSize="8sp"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -2453,6 +2453,7 @@
|
||||
android:id="@+id/sud_text_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginStart="21dp"
|
||||
android:layout_marginEnd="21dp"
|
||||
|
@ -75,7 +75,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/live_clarity"
|
||||
android:layout_width="80dp"
|
||||
android:layout_width="60dp"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -149,7 +149,7 @@ public class MainHomeGameViewHolder extends AbsMainHomeChildViewHolder implement
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
LiveNetManager.get(mContext)
|
||||
.randomRoom(new com.yunbao.common.http.base.HttpCallback<CreateSudRoomModel>() {
|
||||
.randomRoom(id, mSill, roomHolderType,new com.yunbao.common.http.base.HttpCallback<CreateSudRoomModel>() {
|
||||
@Override
|
||||
public void onSuccess(CreateSudRoomModel data) {
|
||||
if (data != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user