修改中英文
This commit is contained in:
@@ -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,40 +678,45 @@ 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);
|
||||
return SpUtil.getInstance().getStringValue(SpUtil.BEAUTY_SDK_TYPE);
|
||||
}
|
||||
|
||||
//设置是否显示转盘功能
|
||||
public void setTurnTableEnable(String enable) {
|
||||
SpUtil.getInstance().setStringValue(SpUtil.TURNTABLE_ENABLE, enable);
|
||||
}
|
||||
|
||||
public String getTurnTableEnable() {
|
||||
return SpUtil.getInstance().getStringValue(SpUtil.TURNTABLE_ENABLE);
|
||||
return SpUtil.getInstance().getStringValue(SpUtil.TURNTABLE_ENABLE);
|
||||
}
|
||||
|
||||
//设置360美颜贴纸下载地址
|
||||
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);
|
||||
return SpUtil.getInstance().getStringValue(SpUtil.BEAUTY_360_TIEZHI_URL);
|
||||
}
|
||||
|
||||
//360贴纸已经下载过
|
||||
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);
|
||||
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(){
|
||||
return SpUtil.getInstance().getStringValue(SpUtil.ANCHOR_PK_TIME);
|
||||
|
||||
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"
|
||||
|
||||
Reference in New Issue
Block a user