Merge remote-tracking branch 'origin/master'

# Conflicts:
#	common/src/main/res/values-zh-rHK/strings.xml
#	common/src/main/res/values-zh-rTW/strings.xml
#	common/src/main/res/values-zh/strings.xml
#	common/src/main/res/values/strings.xml
#	main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java
This commit is contained in:
zlzw 2023-04-19 10:58:02 +08:00
commit 47c3282861
165 changed files with 1961 additions and 591 deletions

View File

@ -135,7 +135,7 @@ public class InvitePopDialog extends AbsDialogPopupWindow {
private ShareBuilder builder(int type) {
ShareBuilder builder = ShareBuilder.builder(type);
builder.setText(WordUtil.getString(R.string.dialog_invite_info));
builder.setText(getContext().getString(R.string.dialog_invite_info));
builder.setLink(url);
builder.setUid(uid);
builder.setAnchorId(anchorId);
@ -148,7 +148,7 @@ public class InvitePopDialog extends AbsDialogPopupWindow {
ClipboardManager cm = (ClipboardManager) getContext().getSystemService(CLIPBOARD_SERVICE);
ClipData clipData = ClipData.newPlainText("text", info.getText() + "\n" + url);
cm.setPrimaryClip(clipData);
ToastUtil.show(WordUtil.getString(com.yunbao.common.R.string.copy_success));
ToastUtil.show(getContext().getString(com.yunbao.common.R.string.copy_success));
}
public InvitePopDialog setUrl(String data) {

View File

@ -114,13 +114,13 @@ public class SharePopDialog extends AbsDialogPopupWindow {
}
}
link.setText(url);
info.setText(String.format(WordUtil.getString(R.string.dialog_share_info), StringUtil.isEmpty(anchorName) ? "" : anchorName));
info.setText(String.format(getContext().getString(R.string.dialog_share_info), StringUtil.isEmpty(anchorName) ? "" : anchorName));
ImgLoader.display(getContext(), anchorAvatar, avatar);
}
private ShareBuilder builder(int type) {
ShareBuilder builder = ShareBuilder.builder(type);
builder.setText(String.format(WordUtil.getString(R.string.dialog_share_info), StringUtil.isEmpty(anchorName) ? "" : anchorName));
builder.setText(String.format(getContext().getString(R.string.dialog_share_info), StringUtil.isEmpty(anchorName) ? "" : anchorName));
builder.setUid(uid);
builder.setAnchorId(anchorId);
builder.setAnchorName(anchorName);
@ -141,6 +141,6 @@ public class SharePopDialog extends AbsDialogPopupWindow {
ClipboardManager cm = (ClipboardManager) getContext().getSystemService(CLIPBOARD_SERVICE);
ClipData clipData = ClipData.newPlainText("text",info.getText().toString()+"\n"+url);
cm.setPrimaryClip(clipData);
ToastUtil.show(WordUtil.getString(com.yunbao.common.R.string.copy_success));
ToastUtil.show(getContext().getString(com.yunbao.common.R.string.copy_success));
}
}

View File

@ -80,6 +80,7 @@ public class AppContext extends CommonAppContext {
public LiveImDeletUtil liveImDeletUtil;
private final static List<WeakReference<Activity>> activities = new ArrayList<>();
private static final class AdjustLifecycleCallbacks implements ActivityLifecycleCallbacks {
@Override
public void onActivityResumed(Activity activity) {

View File

@ -532,7 +532,7 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
}
} else if (e == TXLiveConstants.PLAY_ERR_NET_DISCONNECT ||
e == TXLiveConstants.PLAY_ERR_FILE_NOT_FOUND) {
ToastUtil.show(WordUtil.getString(R.string.live_play_error));
ToastUtil.show(mContext.getString(R.string.live_play_error));
checkUidAndToken();
} else if (e == TXLiveConstants.PLAY_EVT_PLAY_PROGRESS) {
int progress = bundle.getInt("EVT_PLAY_PROGRESS_MS");

View File

@ -86,7 +86,7 @@ public class TieZhiAdapter extends RecyclerView.Adapter<TieZhiAdapter.Vh> {
TiUtils.unzip(file, targetDir);
bean.setDownloadSuccess(mContext);
} catch (Exception e) {
ToastUtil.show(WordUtil.getString(R.string.tiezhi_download_failed));
ToastUtil.show(mContext.getString(R.string.tiezhi_download_failed));
bean.setDownloading(false);
} finally {
file.delete();
@ -103,7 +103,7 @@ public class TieZhiAdapter extends RecyclerView.Adapter<TieZhiAdapter.Vh> {
@Override
public void onError(Throwable e) {
ToastUtil.show(WordUtil.getString(R.string.tiezhi_download_failed));
ToastUtil.show(mContext.getString(R.string.tiezhi_download_failed));
bean.setDownloading(false);
notifyItemChanged(position, Constants.PAYLOAD);
mLoadingTaskMap.remove(position);

View File

@ -383,7 +383,7 @@ 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;
}

View File

@ -27,6 +27,7 @@ import androidx.appcompat.app.AppCompatActivity;
import com.yunbao.common.R;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.interfaces.LifeCycleListener;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.utils.ClickUtil;
import java.util.ArrayList;
@ -48,6 +49,7 @@ public abstract class AbsActivity extends AppCompatActivity {
Resources res = super.getResources();
Configuration config = new Configuration();
config.setToDefaults();
config.locale = IMLoginManager.get(this).getLocaleLanguage();
res.updateConfiguration(config, res.getDisplayMetrics());
return res;
}

View File

@ -60,6 +60,6 @@ public class ErrorActivity extends AbsActivity {
ClipboardManager clipboardManager = (ClipboardManager) mContext.getSystemService(Context.CLIPBOARD_SERVICE);
ClipData clipData = ClipData.newPlainText("text", mErrorInfo);
clipboardManager.setPrimaryClip(clipData);
ToastUtil.show(WordUtil.getString(R.string.copy_success));
ToastUtil.show(mContext.getString(R.string.copy_success));
}
}

View File

@ -186,7 +186,7 @@ public class WebViewActivity extends AbsActivity {
intent.setData(MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
}
intent.setType("image/*");
startActivityForResult(Intent.createChooser(intent, WordUtil.getString(R.string.choose_flie)), CHOOSE);
startActivityForResult(Intent.createChooser(intent, mContext.getString(R.string.choose_flie)), CHOOSE);
}
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)

View File

@ -41,7 +41,7 @@ public class ChatChargeCoinAdapter extends RecyclerView.Adapter<ChatChargeCoinAd
mList = list;
mCoinName = CommonAppConfig.getInstance().getCoinName();
mGoldCoinName = CommonAppConfig.getInstance().getGoldCoinName();
mGiveString = WordUtil.getString(R.string.coin_give);
mGiveString = context.getString(R.string.coin_give);
mOnClickListener = new View.OnClickListener() {
@Override
public void onClick(View v) {

View File

@ -14,6 +14,26 @@ public class LiveClassBean {
private boolean isAll;
private String des;
private boolean checked;
private String chinese;
private String english;
public String getChinese() {
return chinese;
}
public LiveClassBean setChinese(String chinese) {
this.chinese = chinese;
return this;
}
public String getEnglish() {
return english;
}
public LiveClassBean setEnglish(String english) {
this.english = english;
return this;
}
public int getId() {
return id;

View File

@ -87,7 +87,7 @@ public class LiveTaskModel extends BaseModel {
public String getEndTime() {
if (!StringUtil.isEmpty(endTime)) {
endTime = WordUtil.getString(R.string.live_task_new_user_timer) + new SimpleDateFormat("yyyy/MM/dd HH:mm", Locale.getDefault()).format(new Date(Long.parseLong(endTime) * 1000));
endTime =WordUtil.getString(R.string.live_task_new_user_timer) + new SimpleDateFormat("yyyy/MM/dd HH:mm", Locale.getDefault()).format(new Date(Long.parseLong(endTime) * 1000));
}
return endTime;
}

View File

@ -489,7 +489,7 @@ public class UserBean implements Parcelable {
if (this.liang != null) {
String liangName = this.liang.getName();
if (!TextUtils.isEmpty(liangName) && !"0".equals(liangName)) {
// return WordUtil.getString(R.string.live_liang) + ":" + liangName;
// returnmContext.getString(R.string.live_liang) + ":" + liangName;
return liangName;
}
}

View File

@ -138,8 +138,8 @@ public class LiveChargeDialogFragment extends AbsDialogFragment implements View.
private void showMoney(CoinBean bean) {
mCheckedCoinBean = bean;
if (mCheckedCoinBean != null && mBtnCharge != null) {
// mBtnCharge.setText(String.format(WordUtil.getString(R.string.chat_charge_tip), mCheckedCoinBean.getMoney()));
mBtnCharge.setText(String.format(WordUtil.getString(R.string.chat_charge_tip)));
// mBtnCharge.setText(String.format(mContext.getString(R.string.chat_charge_tip), mCheckedCoinBean.getMoney()));
mBtnCharge.setText(String.format(mContext.getString(R.string.chat_charge_tip)));
}
}

View File

@ -28,7 +28,6 @@ import io.rong.message.RecallNotificationMessage;
import io.rong.message.TextMessage;
import static android.content.Context.CLIPBOARD_SERVICE;
import static com.yunbao.common.utils.WordUtil.getString;
/**
* 消息長按彈窗
@ -123,7 +122,7 @@ public class MessageLongClickPopuwindow implements View.OnClickListener {
ClipboardManager cm = (ClipboardManager) mContext.getSystemService(CLIPBOARD_SERVICE);
ClipData clipData = ClipData.newPlainText("text", content);
cm.setPrimaryClip(clipData);
ToastUtil.show(getString(R.string.copy_success));
ToastUtil.show(mContext.getString(R.string.copy_success));
}
}
@ -135,7 +134,7 @@ public class MessageLongClickPopuwindow implements View.OnClickListener {
IMCenter.getInstance().recallMessage(message, "撤回成功", new RongIMClient.ResultCallback<RecallNotificationMessage>() {
@Override
public void onSuccess(RecallNotificationMessage recallNotificationMessage) {
ToastUtil.show(getString(R.string.withdraw_success));
ToastUtil.show(mContext.getString(R.string.withdraw_success));
//删除草稿信息
IMCenter.getInstance().clearTextMessageDraft(message.getConversationType(), message.getTargetId(), null);
}

View File

@ -19,6 +19,7 @@ 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.LiveClassManager;
import com.yunbao.common.manager.NewLevelManager;
import com.yunbao.common.utils.L;
import com.yunbao.common.utils.MD5Util;
@ -156,7 +157,7 @@ public class CommonHttpUtil {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
locale = context.getResources().getConfiguration().getLocales().get(0);
} else {
locale = context.getResources().getConfiguration().locale;
locale = IMLoginManager.get(context).getLocaleLanguage();
}
if (locale.getLanguage().equals("zh")) {
lang = "chinese";
@ -202,6 +203,10 @@ public class CommonHttpUtil {
JSONArray levelArray = obj.getJSONArray("levelanchor_new");
new NewLevelManager(context).UpAnchorDataLevel(levelArray.toJSONString());
}
if (obj.containsKey("liveclass")) {//缓存直播间分类
JSONArray levelArray = obj.getJSONArray("liveclass");
new LiveClassManager(context).UpDataLiveClass(levelArray.toJSONString());
}
if (obj.containsKey("apk_ver")) {
APKManager.get().setApkVer(obj.getString("apk_ver"));
}

View File

@ -23,6 +23,8 @@ import com.yunbao.common.views.floatingview.APPEasyFloat;
import org.greenrobot.eventbus.EventBus;
import java.util.Locale;
/**
* 登录者信息管理
*/
@ -46,6 +48,20 @@ public class IMLoginManager extends BaseCacheManager {
private final String STATUS_ANCHOR_SAY = "anchorSay";
private final String STATUS_ANCHOR_CALL = "anchorCallMe";
private final String KEY_LANGUAGE = "language";
public void setLanguage(boolean isEnglish) {
put(KEY_LANGUAGE, isEnglish);
}
public Locale getLocaleLanguage() {
if (!getBoolean(KEY_LANGUAGE, false)) {
return Locale.SIMPLIFIED_CHINESE;
} else {
return new Locale("en", "rUS");
}
}
public void setDefaultBubbleUrl(String defaultBubbleUrl) {
put(keyDefaultBubbleUrl, defaultBubbleUrl);
}
@ -55,7 +71,6 @@ public class IMLoginManager extends BaseCacheManager {
}
public void setXiaJBG(boolean xjbg) {
put(xiaJBG, xjbg);
}

View File

@ -0,0 +1,42 @@
package com.yunbao.common.manager;
import android.content.Context;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.yunbao.common.bean.LiveClassBean;
import com.yunbao.common.bean.NewLevelModel;
import com.yunbao.common.manager.base.BaseCacheManager;
import java.util.ArrayList;
import java.util.List;
public class LiveClassManager extends BaseCacheManager {
private final String KEY_LIVE_CLASS = "keyLiveClass";
private List<LiveClassBean> liveClass = new ArrayList<>();
public LiveClassManager(Context context) {
super(context);
}
/**
* 缓存等级图标
*
* @param json
*/
public void UpDataLiveClass(String json) {
liveClass = new Gson().fromJson(json, new TypeToken<List<LiveClassBean>>() {
}.getType());
put(KEY_LIVE_CLASS, liveClass);
}
/**
* 获取等级数据
*
* @return
*/
public List<LiveClassBean> getLiveClass() {
return getList(KEY_LIVE_CLASS, new TypeToken<List<LiveClassBean>>() {
}.getType());
}
}

View File

@ -309,7 +309,7 @@ public class DialogUitl {
if (v.getId() == R.id.btn_confirm) {
if (callback != null) {
if (c.getTime().getTime() > new Date().getTime()) {
ToastUtil.show(WordUtil.getString(R.string.edit_profile_right_date));
ToastUtil.show(context.getString(R.string.edit_profile_right_date));
} else {
String result = DateFormat.format("yyyy-MM-dd", c).toString();
callback.onConfirmClick(result);

View File

@ -10,6 +10,9 @@ import com.yunbao.common.CommonAppContext;
import com.yunbao.common.Constants;
import com.yunbao.common.HtmlConfig;
import com.yunbao.common.bean.LiveBean;
import com.yunbao.common.manager.IMLoginManager;
import java.util.Locale;
/**
* Created by cxf on 2019/2/25.
@ -109,7 +112,7 @@ public class RouteUtil {
if (!"".equals(Constants.chatActionUrl)) {
url = Constants.chatActionUrl;
}
Constants.myUrl = url + "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&t=" + System.currentTimeMillis();
Constants.myUrl = url + "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&t=" + System.currentTimeMillis() + "&isZh=" + ((IMLoginManager.get(context).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0");
ARouter.getInstance().build(PATH_MYWEBVIEWACTIVTITY)
.withString(Constants.URL, url)
.navigation();

View File

@ -48,10 +48,10 @@ public class VersionUtil {
//不强更
if (configBean.getForceUpdate() != 1) {
DialogUitl.Builder builder = new DialogUitl.Builder(context);
builder.setTitle(WordUtil.getString(R.string.version_update))
builder.setTitle(context.getString(R.string.version_update))
.setContent(configBean.getUpdateDes())
.setConfrimString(WordUtil.getString(R.string.version_immediate_use))
.setCancelString(WordUtil.getString(R.string.version_not_update))
.setConfrimString(context.getString(R.string.version_immediate_use))
.setCancelString(context.getString(R.string.version_not_update))
.setCancelable(false)
.setClickCallback(new DialogUitl.SimpleCallback2() {
public void onCancelClick() {
@ -79,10 +79,10 @@ public class VersionUtil {
.show();
} else {
DialogUitl.Builder builder = new DialogUitl.Builder(context);
builder.setTitle(WordUtil.getString(R.string.version_update))
builder.setTitle(context.getString(R.string.version_update))
.setContent(configBean.getUpdateDes())
.setConfrimString(WordUtil.getString(R.string.version_immediate_use))
.setCancelString(WordUtil.getString(R.string.version_not_update))
.setConfrimString(context.getString(R.string.version_immediate_use))
.setCancelString(context.getString(R.string.version_not_update))
.setCancelable(false)
.setClickCallback(new DialogUitl.SimpleCallback2() {
public void onCancelClick() {
@ -109,10 +109,10 @@ public class VersionUtil {
//谷歌强制更新
if (configBean.getGoogle_isup().equals("1")) {
DialogUitl.Builder builder = new DialogUitl.Builder(context);
builder.setTitle(WordUtil.getString(R.string.version_update))
builder.setTitle(context.getString(R.string.version_update))
.setContent(configBean.getUpdateDes())
.setConfrimString(WordUtil.getString(R.string.version_immediate_use))
.setCancelString(WordUtil.getString(R.string.version_not_update))
.setConfrimString(context.getString(R.string.version_immediate_use))
.setCancelString(context.getString(R.string.version_not_update))
.setCancelable(false)
.setClickCallback(new DialogUitl.SimpleCallback2() {
public void onCancelClick() {
@ -132,10 +132,10 @@ public class VersionUtil {
//谷歌不强制
} else {
DialogUitl.Builder builder = new DialogUitl.Builder(context);
builder.setTitle(WordUtil.getString(R.string.version_update))
builder.setTitle(context.getString(R.string.version_update))
.setContent(configBean.getUpdateDes())
.setConfrimString(WordUtil.getString(R.string.version_immediate_use))
.setCancelString(WordUtil.getString(R.string.version_not_update))
.setConfrimString(context.getString(R.string.version_immediate_use))
.setCancelString(context.getString(R.string.version_not_update))
.setCancelable(false)
.setClickCallback(new DialogUitl.SimpleCallback2() {
public void onCancelClick() {

File diff suppressed because it is too large Load Diff

View File

@ -1125,4 +1125,19 @@
<string name="live_room_chat_fount_size_high"></string>
<string name="dialog_live_fount_title">選擇字號大小</string>
<string name="dialog_fount_submit">確認</string>
<string name="chat_prompt">私聊提示</string>
<string name="broadcast_oom">直播間內的側邊私聊浮標</string>
<string name="chat_prompt2">動態消息</string>
<string name="chat_prompt3">主播發佈新動態通知</string>
<string name="chat_prompt4">互動通知</string>
<string name="chat_prompt5">點讚、評論、鼓勵送禮</string>
<string name="chat_prompt6">聊天通知</string>
<string name="chat_prompt7">用戶聊天訊息</string>
<string name="chat_prompt8">系統通知</string>
<string name="chat_prompt9">新活動、系統消息</string>
<string name="chat_prompt10">開播通知</string>
<string name="chat_prompt11">開啟後獲得直播通知</string>
<string name="PK_Ladder_Race">PK天梯赛</string>
<string name="party_studio">是否確認前往對方直播間?</string>
</resources>

View File

@ -1125,4 +1125,18 @@
<string name="live_room_chat_fount_size_high"></string>
<string name="dialog_live_fount_title">選擇字號大小</string>
<string name="dialog_fount_submit">確認</string>
<string name="chat_prompt">私聊提示</string>
<string name="broadcast_oom">直播間內的側邊私聊浮標</string>
<string name="chat_prompt2">動態消息</string>
<string name="chat_prompt3">主播發佈新動態通知</string>
<string name="chat_prompt4">互動通知</string>
<string name="chat_prompt5">點讚、評論、鼓勵送禮</string>
<string name="chat_prompt6">聊天通知</string>
<string name="chat_prompt7">用戶聊天訊息</string>
<string name="chat_prompt8">系統通知</string>
<string name="chat_prompt9">新活動、系統消息</string>
<string name="chat_prompt10">開播通知</string>
<string name="chat_prompt11">開啟後獲得直播通知</string>
<string name="PK_Ladder_Race">PK天梯赛</string>
</resources>

View File

@ -1125,4 +1125,19 @@
<string name="live_room_chat_fount_size_high"></string>
<string name="dialog_live_fount_title">選擇字號大小</string>
<string name="dialog_fount_submit">確認</string>
<string name="chat_prompt">私聊提示</string>
<string name="broadcast_oom">直播間內的側邊私聊浮標</string>
<string name="chat_prompt2">動態消息</string>
<string name="chat_prompt3">主播發佈新動態通知</string>
<string name="chat_prompt4">互動通知</string>
<string name="chat_prompt5">點讚、評論、鼓勵送禮</string>
<string name="chat_prompt6">聊天通知</string>
<string name="chat_prompt7">用戶聊天訊息</string>
<string name="chat_prompt8">系統通知</string>
<string name="chat_prompt9">新活動、系統消息</string>
<string name="chat_prompt10">開播通知</string>
<string name="chat_prompt11">開啟後獲得直播通知</string>
<string name="PK_Ladder_Race">PK天梯赛</string>
<string name="party_studio">是否確認前往對方直播間?</string>
</resources>

View File

@ -1132,4 +1132,18 @@ Limited ride And limited avatar frame</string>
<string name="dialog_live_fount_title">Select font size</string>
<string name="dialog_fount_submit">confirm</string>
<string name="chat_prompt">Private chat prompt</string>
<string name="broadcast_oom">A private buoy on the side of the broadcast room</string>
<string name="chat_prompt2">Dynamic message</string>
<string name="chat_prompt3">The anchor posts a new dynamic notification</string>
<string name="chat_prompt4">Interactive notification</string>
<string name="chat_prompt5">Like, comment, and encourage gifts</string>
<string name="chat_prompt6">Chat notification</string>
<string name="chat_prompt7">User chat message</string>
<string name="chat_prompt8">System notification</string>
<string name="chat_prompt9">New activity, system message</string>
<string name="chat_prompt10">Broadcast notice</string>
<string name="PK_Ladder_Race">PK Ladder Race</string>
<string name="chat_prompt11">Get live notification after opening</string>
<string name="party_studio">Confirm whether to go to the other party\'s studio</string>
</resources>

View File

@ -44,7 +44,7 @@ public class EditNameRemarksActivity extends AbsActivity implements View.OnClick
@Override
protected void main() {
setTitle(WordUtil.getString(R.string.edit_profile_update_remarks));
setTitle(mContext.getString(R.string.edit_profile_update_remarks));
userId = getIntent().getStringExtra(NAMEREMARK);
mEditText = (EditText) findViewById(R.id.edit);
mEditText.setFilters(new InputFilter[]{

View File

@ -911,7 +911,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
if (!mIsAnchor) {
UserBean u = CommonAppConfig.getInstance().getUserBean();
if (u != null && u.getLevel() < mDanMuLevel) {
ToastUtil.show(String.format(WordUtil.getString(R.string.live_level_danmu_limit), mDanMuLevel));
ToastUtil.show(String.format(mContext.getString(R.string.live_level_danmu_limit), mDanMuLevel));
return;
}
}
@ -948,7 +948,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
if (!mIsAnchor) {
UserBean u = CommonAppConfig.getInstance().getUserBean();
if (u != null && u.getLevel() < mChatLevel) {
ToastUtil.show(String.format(WordUtil.getString(R.string.live_level_chat_limit), mChatLevel));
ToastUtil.show(String.format(mContext.getString(R.string.live_level_chat_limit), mChatLevel));
return;
}
}
@ -1154,7 +1154,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
ClipboardManager cm = (ClipboardManager) mContext.getSystemService(CLIPBOARD_SERVICE);
ClipData clipData = ClipData.newPlainText("text", link);
cm.setPrimaryClip(clipData);
ToastUtil.show(WordUtil.getString(R.string.copy_success));
ToastUtil.show(mContext.getString(R.string.copy_success));
}

View File

@ -1,5 +1,9 @@
package com.yunbao.live.activity;
import static com.tencent.trtc.TRTCCloudDef.TRTC_VIDEO_MIRROR_TYPE_DISABLE;
import static com.tencent.trtc.TRTCCloudDef.TRTC_VIDEO_MIRROR_TYPE_ENABLE;
import static com.yunbao.live.views.LivePushTxViewHolder.mTRTCCloud;
import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
@ -24,6 +28,7 @@ import com.tencent.trtc.TRTCCloudDef;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.CommonAppContext;
import com.yunbao.common.Constants;
import com.yunbao.common.bean.LiveBean;
import com.yunbao.common.bean.UserBean;
import com.yunbao.common.dialog.NotCancelableDialog;
import com.yunbao.common.event.LoginInvalidEvent;
@ -32,14 +37,13 @@ import com.yunbao.common.http.CommonHttpUtil;
import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.http.HttpClient;
import com.yunbao.common.http.JsonBean;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.utils.DateFormatUtil;
import com.yunbao.common.utils.DialogUitl;
import com.yunbao.common.utils.L;
import com.yunbao.common.utils.LogUtil;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.live.R;
import com.yunbao.common.bean.LiveBean;
import com.yunbao.live.bean.LiveGuardInfo;
import com.yunbao.live.bean.LiveKsyConfigBean;
import com.yunbao.live.dialog.LiveBeautyDialogFragment;
@ -72,13 +76,10 @@ import org.greenrobot.eventbus.ThreadMode;
import java.io.File;
import java.util.List;
import java.util.Locale;
import pl.droidsonroids.gif.GifImageView;
import static com.tencent.trtc.TRTCCloudDef.TRTC_VIDEO_MIRROR_TYPE_DISABLE;
import static com.tencent.trtc.TRTCCloudDef.TRTC_VIDEO_MIRROR_TYPE_ENABLE;
import static com.yunbao.live.views.LivePushTxViewHolder.mTRTCCloud;
/**
* Created by cxf on 2018/10/7.
* 主播直播间
@ -225,11 +226,11 @@ public class LiveAnchorActivity extends LiveActivity implements LiveFunctionClic
if (leave == 0) {
leave = 1;
mLivePushViewHolder.leave.setVisibility(View.VISIBLE);
sendSystemMessage(WordUtil.getString(R.string.live_anchor_leave));
sendSystemMessage(mContext.getString(R.string.live_anchor_leave));
} else {
leave = 0;
mLivePushViewHolder.leave.setVisibility(View.GONE);
sendSystemMessage(WordUtil.getString(R.string.live_anchor_come_back));
sendSystemMessage(mContext.getString(R.string.live_anchor_come_back));
}
HttpClient.getInstance().get("Live.isLeave", "Live.isLeave")
.params("isleave", leave)
@ -276,7 +277,11 @@ public class LiveAnchorActivity extends LiveActivity implements LiveFunctionClic
});
break;
case Constants.LIVE_FUNC_WKS:
String url = CommonAppConfig.HOST + "/h5/activity/weekStar/index.html?&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid;
String url = CommonAppConfig.HOST
+ "/h5/activity/weekStar/index.html?&uid="
+ CommonAppConfig.getInstance().getUid() + "&token="
+ CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid
+ "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0");
ZhuangBanActivity.forward(mContext, url, false);
break;
case Constants.LIVE_FUNC_LINK_MIC://连麦
@ -552,7 +557,7 @@ public class LiveAnchorActivity extends LiveActivity implements LiveFunctionClic
* 关闭直播
*/
public void closeLive() {
DialogUitl.showSimpleDialog(mContext, WordUtil.getString(R.string.live_end_live), new DialogUitl.SimpleCallback() {
DialogUitl.showSimpleDialog(mContext, mContext.getString(R.string.live_end_live), new DialogUitl.SimpleCallback() {
@Override
public void onConfirmClick(Dialog dialog, String content) {
endLive();
@ -661,7 +666,7 @@ public class LiveAnchorActivity extends LiveActivity implements LiveFunctionClic
@Override
public Dialog createLoadingDialog() {
return DialogUitl.loadingDialog(mContext, WordUtil.getString(R.string.live_end_ing));
return DialogUitl.loadingDialog(mContext, mContext.getString(R.string.live_end_ing));
}
});
}
@ -728,7 +733,7 @@ public class LiveAnchorActivity extends LiveActivity implements LiveFunctionClic
mLiveRoomViewHolder.anchorPause();
}
super.onPause();
sendSystemMessage(WordUtil.getString(R.string.live_anchor_leave));
sendSystemMessage(mContext.getString(R.string.live_anchor_leave));
mPaused = true;
}
@ -739,7 +744,7 @@ public class LiveAnchorActivity extends LiveActivity implements LiveFunctionClic
if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.anchorResume();
}
sendSystemMessage(WordUtil.getString(R.string.live_anchor_come_back));
sendSystemMessage(mContext.getString(R.string.live_anchor_come_back));
CommonHttpUtil.checkTokenInvalid();
}
mPaused = false;
@ -761,7 +766,7 @@ public class LiveAnchorActivity extends LiveActivity implements LiveFunctionClic
@Override
public void onSuperCloseLive() {
endLive();
DialogUitl.showSimpleTipDialog(mContext, WordUtil.getString(R.string.live_illegal));
DialogUitl.showSimpleTipDialog(mContext, mContext.getString(R.string.live_illegal));
}
@Subscribe(threadMode = ThreadMode.MAIN)
@ -1073,7 +1078,7 @@ public class LiveAnchorActivity extends LiveActivity implements LiveFunctionClic
printLog(DateFormatUtil.getCurTimeString2() + " <=== " + mReqCount + "----status=" + status + "\n");
if (status == 0) {
NotCancelableDialog dialog = new NotCancelableDialog();
dialog.setContent(WordUtil.getString(R.string.live_anchor_error));
dialog.setContent(mContext.getString(R.string.live_anchor_error));
dialog.setActionListener(new NotCancelableDialog.ActionListener() {
@Override
public void onConfirmClick(Context context, DialogFragment dialog) {

View File

@ -1235,7 +1235,7 @@ public class LiveAudienceActivity extends LiveActivity {
if (micListener != null) {
micListener.updateMicList(mMicQueueList);
DialogUitl.showSimpleDialog(mContext,
String.format(WordUtil.getString(R.string.live_mic_user_apply), ((LinkMicUserBean) event.getObject()).getUname()),
String.format(mContext.getString(R.string.live_mic_user_apply), ((LinkMicUserBean) event.getObject()).getUname()),
new DialogUitl.SimpleCallback() {
@Override
public void onConfirmClick(Dialog dialog, String content) {

View File

@ -48,7 +48,7 @@ public class LiveBlackActivity extends AbsActivity implements OnItemClickListene
@Override
protected void main() {
setTitle(WordUtil.getString(R.string.live_user_black_list));
setTitle(mContext.getString(R.string.live_user_black_list));
mLiveUid = getIntent().getStringExtra(Constants.LIVE_UID);
if (TextUtils.isEmpty(mLiveUid)) {
return;

View File

@ -34,7 +34,7 @@ public class LiveChooseClassActivity extends AbsActivity implements OnItemClickL
@Override
protected void main() {
setTitle(WordUtil.getString(R.string.live_class_choose));
setTitle(mContext.getString(R.string.live_class_choose));
mRecyclerView = (RecyclerView) findViewById(R.id.recyclerView);
mRecyclerView.setHasFixedSize(true);
mRecyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));

View File

@ -45,7 +45,7 @@ public class LiveGuardListActivity extends AbsActivity {
@Override
protected void main() {
setTitle(WordUtil.getString(R.string.guard_list));
setTitle(mContext.getString(R.string.guard_list));
mToUid = getIntent().getStringExtra(Constants.TO_UID);
if (TextUtils.isEmpty(mToUid)) {
return;

View File

@ -35,7 +35,7 @@ public class LiveRecordActivity extends AbsActivity {
@Override
protected void main() {
setTitle(WordUtil.getString(R.string.live_record));
setTitle(mContext.getString(R.string.live_record));
mUserBean = getIntent().getParcelableExtra(Constants.USER_BEAN);
if (mUserBean == null) {
return;

View File

@ -71,7 +71,7 @@ public class LiveReportActivity extends AbsActivity implements LiveReportAdapter
@Override
protected void main() {
setTitle(WordUtil.getString(R.string.report));
setTitle(mContext.getString(R.string.report));
mToUid = getIntent().getStringExtra(Constants.TO_UID);
mVideoId = getIntent().getStringExtra(Constants.VIDEO_ID);
mIntoIndex = getIntent().getIntExtra(Constants.INTOINDEX, 0);

View File

@ -168,7 +168,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
@Override
public void onTimer(String time) {
if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.setRandomPkTimer(String.format(WordUtil.getString(R.string.random_pk_info_btn_ing), time));
mLiveRoomViewHolder.setRandomPkTimer(String.format(mContext.getString(R.string.random_pk_info_btn_ing), time));
}
}
@ -539,7 +539,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
public void onResourceReady(@NonNull Bitmap resource, @Nullable Transition<? super Bitmap> transition) {
boolean ret = RCRTCEngine.getInstance().getDefaultVideoStream().setWatermark(BitmapUtil.getInstance().convertMirror(resource), rect);
sendSystemMessage(WordUtil.getString(R.string.live_anchor_leave));
sendSystemMessage(mContext.getString(R.string.live_anchor_leave));
}
@Override
@ -552,7 +552,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
leave_img.setVisibility(View.GONE);
// 清除水印
boolean ret = RCRTCEngine.getInstance().getDefaultVideoStream().setWatermark(null, rect);
sendSystemMessage(WordUtil.getString(R.string.live_anchor_come_back));
sendSystemMessage(mContext.getString(R.string.live_anchor_come_back));
}
HttpClient.getInstance().get("Live.isLeave", "Live.isLeave")
@ -861,7 +861,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
* 关闭直播
*/
public void closeLive() {
DialogUitl.showSimpleDialog(mContext, WordUtil.getString(R.string.live_end_live), new DialogUitl.SimpleCallback() {
DialogUitl.showSimpleDialog(mContext,mContext.getString(R.string.live_end_live), new DialogUitl.SimpleCallback() {
@Override
public void onConfirmClick(Dialog dialog, String content) {
PKing = false;
@ -990,7 +990,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
@Override
public Dialog createLoadingDialog() {
return DialogUitl.loadingDialog(mContext, WordUtil.getString(R.string.live_end_ing));
return DialogUitl.loadingDialog(mContext,mContext.getString(R.string.live_end_ing));
}
});
}
@ -1088,7 +1088,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
// }
super.onPause();
// if (isKeyBack) {
// sendSystemMessage(WordUtil.getString(R.string.live_anchor_leave));
// sendSystemMessage(mContext.getString(R.string.live_anchor_leave));
// }
// mPaused = true;
}
@ -1100,7 +1100,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
// if (mLiveRoomViewHolder != null) {
// mLiveRoomViewHolder.anchorResume();
// }
// sendSystemMessage(WordUtil.getString(R.string.live_anchor_come_back));
// sendSystemMessage(mContext.getString(R.string.live_anchor_come_back));
// CommonHttpUtil.checkTokenInvalid();
// }
// mPaused = false;
@ -1122,7 +1122,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
@Override
public void onSuperCloseLive() {
endLive();
DialogUitl.showSimpleTipDialog(mContext, WordUtil.getString(R.string.live_illegal));
DialogUitl.showSimpleTipDialog(mContext,mContext.getString(R.string.live_illegal));
}
@Subscribe(threadMode = ThreadMode.MAIN)
@ -1443,7 +1443,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
printLog(DateFormatUtil.getCurTimeString2() + " <=== " + mReqCount + "----status=" + status + "\n");
if (status == 0) {
NotCancelableDialog dialog = new NotCancelableDialog();
dialog.setContent(WordUtil.getString(R.string.live_anchor_error));
dialog.setContent(mContext.getString(R.string.live_anchor_error));
dialog.setActionListener(new NotCancelableDialog.ActionListener() {
@Override
public void onConfirmClick(Context context, DialogFragment dialog) {
@ -1526,7 +1526,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
if (micListener != null) {
micListener.updateMicList(mMicQueueList);
DialogUitl.showSimpleDialog(mContext,
String.format(WordUtil.getString(R.string.live_mic_user_apply), ((LinkMicUserBean) event.getObject()).getUname()),
String.format(mContext.getString(R.string.live_mic_user_apply), ((LinkMicUserBean) event.getObject()).getUname()),
new DialogUitl.SimpleCallback() {
@Override
public void onConfirmClick(Dialog dialog, String content) {

View File

@ -48,7 +48,7 @@ public class LiveShutUpActivity extends AbsActivity implements OnItemClickListen
@Override
protected void main() {
setTitle(WordUtil.getString(R.string.live_user_shut_up_list));
setTitle(mContext.getString(R.string.live_user_shut_up_list));
mLiveUid = getIntent().getStringExtra(Constants.LIVE_UID);
if (TextUtils.isEmpty(mLiveUid)) {
return;

View File

@ -340,7 +340,7 @@ public class LiveTRTCAnchorActivity extends TRTCBaseActivity {
* 密码房间
*/
private void onLiveTypePwd(final LiveRoomTypeBean bean) {
DialogUitl.showSimpleInputDialog(this, WordUtil.getString(R.string.live_set_pwd), DialogUitl.INPUT_TYPE_NUMBER_PASSWORD, 8, new DialogUitl.SimpleCallback() {
DialogUitl.showSimpleInputDialog(this, getApplicationContext().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)) {

View File

@ -133,7 +133,7 @@ public class MedalQuestionWebViewActivity extends AbsActivity {
intent.setData(MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
}
intent.setType("image/*");
startActivityForResult(Intent.createChooser(intent, WordUtil.getString(R.string.choose_flie)), CHOOSE);
startActivityForResult(Intent.createChooser(intent, mContext.getString(R.string.choose_flie)), CHOOSE);
}
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)

View File

@ -80,7 +80,7 @@ public class RoomManageActivity extends AbsActivity {
});
mViewHolders = new AbsCommonViewHolder[PAGE_COUNT];
mIndicator = (MagicIndicator) findViewById(R.id.indicator);
final String[] titles = new String[]{WordUtil.getString(R.string.live_my_live_room), WordUtil.getString(R.string.live_my_room)};
final String[] titles = new String[]{mContext.getString(R.string.live_my_live_room),mContext.getString(R.string.live_my_room)};
CommonNavigator commonNavigator = new CommonNavigator(mContext);
commonNavigator.setAdapter(new CommonNavigatorAdapter() {

View File

@ -37,7 +37,7 @@ public class RoomManageDetailActivity extends AbsActivity implements View.OnClic
if (mAdminRoomBean == null) {
return;
}
setTitle(StringUtil.contact(mAdminRoomBean.getUserNiceName(), WordUtil.getString(R.string.live_admin_room)));
setTitle(StringUtil.contact(mAdminRoomBean.getUserNiceName(), mContext.getString(R.string.live_admin_room)));
findViewById(R.id.btn_user_shut_up).setOnClickListener(this);
findViewById(R.id.btn_user_black).setOnClickListener(this);
}

View File

@ -31,6 +31,7 @@ import com.yunbao.common.activity.AbsActivity;
import com.yunbao.common.bean.LiveBean;
import com.yunbao.common.event.JavascriptInterfaceEvent;
import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.DpUtil;
import com.yunbao.common.utils.JavascriptInterfaceUtils;
@ -45,6 +46,8 @@ import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import java.util.Locale;
/**
* Created by cxf on 2018/9/25.
* 我的徽章 h5页面
@ -152,7 +155,7 @@ public class WebViewActivityMedal extends AbsActivity {
mIvQuestion.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
MedalQuestionWebViewActivity.forward(mContext, HtmlConfig.MEDAL_QUESTION);
MedalQuestionWebViewActivity.forward(mContext, HtmlConfig.MEDAL_QUESTION + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
}
});
}
@ -212,7 +215,7 @@ public class WebViewActivityMedal extends AbsActivity {
intent.setData(MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
}
intent.setType("image/*");
startActivityForResult(Intent.createChooser(intent, WordUtil.getString(R.string.choose_flie)), CHOOSE);
startActivityForResult(Intent.createChooser(intent, mContext.getString(R.string.choose_flie)), CHOOSE);
}
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)

View File

@ -215,7 +215,7 @@ public class ZhuangBanActivity extends AbsActivity {
intent.setData(MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
}
intent.setType("image/*");
startActivityForResult(Intent.createChooser(intent, WordUtil.getString(R.string.choose_flie)), CHOOSE);
startActivityForResult(Intent.createChooser(intent,mContext.getString(R.string.choose_flie)), CHOOSE);
}
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)

View File

@ -125,14 +125,14 @@ public class AnchorUserMicInfoAdapter extends RefreshAdapter<MicUserBean> {
if (length <= 4) {
if (tag.getType() == TYPE_MIC_REQUEST) {
applyMic(tag, 4, createSocketSendBean());
ToastUtil.show(WordUtil.getString(R.string.live_mic_request));
ToastUtil.show(mContext.getString(R.string.live_mic_request));
} else if (tag.getType() == TYPE_MIC_INVITE) {
SocketSendBean bean = createSocketSendBean().param("targetId", tag.getId());
applyMic(tag, 1, bean);
ToastUtil.show(WordUtil.getString(R.string.live_mic_invite));
ToastUtil.show(mContext.getString(R.string.live_mic_invite));
}
} else {
ToastUtil.show(WordUtil.getString(R.string.live_mic_max));
ToastUtil.show(mContext.getString(R.string.live_mic_max));
}
}
});
@ -149,7 +149,7 @@ public class AnchorUserMicInfoAdapter extends RefreshAdapter<MicUserBean> {
@Override
public void accept(ResponseModel<BaseModel> stringResponseModel) throws Exception {
applyMic((MicUserBean) v.getTag(), 8, createSocketSendBean());
ToastUtil.show(WordUtil.getString(R.string.live_mic_user_down));
ToastUtil.show(mContext.getString(R.string.live_mic_user_down));
}
}, Throwable::printStackTrace).isDisposed();

View File

@ -44,7 +44,7 @@ public class GuardAdapter extends RefreshAdapter<GuardUserBean> {
this.isShowTitle = isShowTitle;
mDialog = dialog;
mVotesName = CommonAppConfig.getInstance().getVotesName();
mWeekContributeString = WordUtil.getString(R.string.guard_week_con);
mWeekContributeString =mContext.getString(R.string.guard_week_con);
mGuardDrawable0 = ContextCompat.getDrawable(context, R.mipmap.icon_guard_type_0);
mGuardDrawable1 = ContextCompat.getDrawable(context, R.mipmap.icon_guard_type_1);
mGuardDrawable2 = ContextCompat.getDrawable(context, R.mipmap.icon_guard_type_2);

View File

@ -24,7 +24,7 @@ public class LiveAdminRoomAdapter extends RefreshAdapter<LiveAdminRoomBean> {
public LiveAdminRoomAdapter(Context context) {
super(context);
mSuffix = WordUtil.getString(R.string.live_admin_room);
mSuffix =mContext.getString(R.string.live_admin_room);
mOnClickListener = new View.OnClickListener() {
@Override
public void onClick(View v) {

View File

@ -177,7 +177,7 @@ public class LiveAnchorEditCallMeAdapter extends RecyclerView.Adapter<LiveAnchor
}
})
.setShowNumber(false)
.setTitle(WordUtil.getString(R.string.live_anchor_edit_call_me_select_gift))
.setTitle(mContext.getString(R.string.live_anchor_edit_call_me_select_gift))
.setHideGiftType(true)
.showDialog()
;
@ -250,7 +250,7 @@ public class LiveAnchorEditCallMeAdapter extends RecyclerView.Adapter<LiveAnchor
super.setData(data, position);
if (StringUtil.isEmpty(data.getValue())) {
contact.setTag(null);
contact.setText(WordUtil.getString(R.string.live_anchor_edit_call_me_not_filled));
contact.setText(mContext.getString(R.string.live_anchor_edit_call_me_not_filled));
contact.setTextColor(Color.parseColor("#80FFFFFF"));
} else {
contact.setTag(data.getValue());
@ -265,7 +265,7 @@ public class LiveAnchorEditCallMeAdapter extends RecyclerView.Adapter<LiveAnchor
status.setTag(data.getStatus());
status.setOnClickListener(v -> {
if (StringUtil.isEmpty((String) contact.getTag())) {
ToastUtil.show(WordUtil.getString(R.string.live_anchor_edit_call_me_not_filled_toash));
ToastUtil.show(mContext.getString(R.string.live_anchor_edit_call_me_not_filled_toash));
return;
}
int tag = (int) v.getTag();
@ -286,7 +286,7 @@ public class LiveAnchorEditCallMeAdapter extends RecyclerView.Adapter<LiveAnchor
public void onItemClick(String bean, int position) {
if (StringUtil.isEmpty(bean)) {
contact.setTag(null);
contact.setHint(WordUtil.getString(R.string.live_anchor_edit_call_me_not_filled));
contact.setHint(mContext.getString(R.string.live_anchor_edit_call_me_not_filled));
if(position==0) {
contact.setTextColor(Color.parseColor("#80FFFFFF"));
}

View File

@ -212,7 +212,7 @@ public class LiveGiftAdapter extends RecyclerView.Adapter<LiveGiftAdapter.Vh> {
@Override
public void callback(File bean) {
if(bean==null){
ToastUtil.show(WordUtil.getString(R.string.load_failure_2));
ToastUtil.show(mContext.getString(R.string.load_failure_2));
mLoading.setImageResource(R.mipmap.icon_download_gift);
animation.setRepeatCount(0);
animation.setDuration(0);

View File

@ -114,7 +114,7 @@ public class LiveNewGuardBuyItemsAdapter extends RecyclerView.Adapter<LiveNewGua
title.invalidate();
}
title.setTag(id);
String msgText = WordUtil.getString(R.string.buy_guard_back_coin);
String msgText =context.getString(R.string.buy_guard_back_coin);
msg.setText(msgText + coin);
this.coin.setText(coin);
if (id == selectId) {

View File

@ -39,7 +39,7 @@ public class LivePkAdapter extends RefreshAdapter<LivePkBean> {
}
};
mLivePkInviteString = "PK";
mLivePkInviteString2 = WordUtil.getString(R.string.live_pk_invite_2);
mLivePkInviteString2 =mContext.getString(R.string.live_pk_invite_2);
}
@NonNull

View File

@ -110,8 +110,8 @@ public class LiveTaskRecyclerAdapter extends RecyclerView.Adapter<LiveTaskRecycl
}
complete.setText(task.getStatus() ? R.string.live_task_item_complete_true : R.string.live_task_item_complete_false);
complete.setBackgroundResource(task.getStatus() ? R.drawable.background_6cbe53 : R.drawable.background_595959);
hot.setText(Html.fromHtml("<font color='#B3B3B3'>" + WordUtil.getString(R.string.live_task_item_hot) + "</font>&nbsp&nbsp<font color='#F09FC2'>" + task.getHot() + "</font>"));
xp.setText(Html.fromHtml("<font color='#B3B3B3'>" + WordUtil.getString(R.string.live_task_item_xp) + "</font>&nbsp&nbsp<font color='#FFF69F'>" + task.getExp() + "</font>"));
hot.setText(Html.fromHtml("<font color='#B3B3B3'>" +itemView.getContext().getString(R.string.live_task_item_hot) + "</font>&nbsp&nbsp<font color='#F09FC2'>" + task.getHot() + "</font>"));
xp.setText(Html.fromHtml("<font color='#B3B3B3'>" +itemView.getContext().getString(R.string.live_task_item_xp) + "</font>&nbsp&nbsp<font color='#FFF69F'>" + task.getExp() + "</font>"));
}
}
}

View File

@ -88,14 +88,14 @@ public class LiveUserAnchorMailBoxAdapter extends RecyclerView.Adapter<LiveUserA
void setData(LiveUserMailBoxModel box, int position) {
userName.setText(box.getUserName());
topText.setText(String.format(WordUtil.getString(R.string.live_user_mailbox_top_text), box.getAnchorName()));
tipText.setText(String.format(WordUtil.getString(R.string.live_user_mailbox_tip_text), box.getAnchorName()));
topText.setText(String.format(mContext.getString(R.string.live_user_mailbox_top_text), box.getAnchorName()));
tipText.setText(String.format(mContext.getString(R.string.live_user_mailbox_tip_text), box.getAnchorName()));
del.setOnClickListener(v -> {
new DialogUitl.Builder(mContext)
.setTitle(WordUtil.getString(R.string.live_user_letter_dialog_title))
.setContent(WordUtil.getString(R.string.live_user_letter_dialog_content))
.setConfrimString(WordUtil.getString(R.string.live_user_letter_dialog_yes))
.setCancelString(WordUtil.getString(R.string.live_user_letter_dialog_no))
.setTitle(mContext.getString(R.string.live_user_letter_dialog_title))
.setContent(mContext.getString(R.string.live_user_letter_dialog_content))
.setConfrimString(mContext.getString(R.string.live_user_letter_dialog_yes))
.setCancelString(mContext.getString(R.string.live_user_letter_dialog_no))
.setView(R.layout.dialog_live_random_pk)
.setCancelable(true)
.setClickCallback((dialog, content) -> LiveNetManager.get(mContext).delContactInfo(box.getId(), new HttpCallback<String>() {

View File

@ -44,8 +44,8 @@ public class RedPackAdapter extends RecyclerView.Adapter<RedPackAdapter.Vh> {
mContext=context;
mList = list;
mInflater = LayoutInflater.from(context);
mTypeString1 = WordUtil.getString(R.string.red_pack_11);
mTypeString2 = WordUtil.getString(R.string.red_pack_12);
mTypeString1 =mContext.getString(R.string.red_pack_11);
mTypeString2 =mContext.getString(R.string.red_pack_12);
mOnClickListener = new View.OnClickListener() {
@Override
public void onClick(View v) {

View File

@ -1,5 +1,7 @@
package com.yunbao.live.bean;
import android.content.Context;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.live.R;
@ -58,14 +60,14 @@ public class GuardBuyBean {
this.privilege = privilege;
}
public String getShopName() {
public String getShopName(Context mContext) {
switch (this.id) {
case 1:
return WordUtil.getString(R.string.guard_name_1);
return mContext.getString(R.string.guard_name_1);
case 2:
return WordUtil.getString(R.string.guard_name_2);
return mContext.getString(R.string.guard_name_2);
case 3:
return WordUtil.getString(R.string.guard_name_3);
return mContext.getString(R.string.guard_name_3);
}
return "";
}

View File

@ -66,7 +66,7 @@ public class GiftPrizePoolFragment extends AbsDialogFragment implements View.OnC
if (code == 0 && info.length > 0) {
JSONObject obj = JSON.parseObject(info[0]);
if (mLevel != null) {
mLevel.setText(String.format(WordUtil.getString(R.string.live_gift_prize_pool_3),
mLevel.setText(String.format(mContext.getString(R.string.live_gift_prize_pool_3),
obj.getString("level")));
}
if (mCoin != null) {

View File

@ -325,7 +325,7 @@ public class LiveBeautyDialogFragment extends AbsDialogFragment {
// }
// } else {
BeautyFaceBean AUTOBEAUTY_NATURAL = new BeautyFaceBean();
AUTOBEAUTY_NATURAL.setTitle(WordUtil.getString(R.string.light));
AUTOBEAUTY_NATURAL.setTitle(mContext.getString(R.string.light));
AUTOBEAUTY_NATURAL.setB_name(AutoBeautyType.AUTOBEAUTY_NATURAL);
AUTOBEAUTY_NATURAL.setImg_id(R.mipmap.beauty_ziran);
AUTOBEAUTY_NATURAL.setValue(0);
@ -333,21 +333,21 @@ public class LiveBeautyDialogFragment extends AbsDialogFragment {
beautifulList.add(AUTOBEAUTY_NATURAL);
BeautyFaceBean AUTOBEAUTY_CUTE = new BeautyFaceBean();
AUTOBEAUTY_CUTE.setTitle(WordUtil.getString(R.string.cute));
AUTOBEAUTY_CUTE.setTitle(mContext.getString(R.string.cute));
AUTOBEAUTY_CUTE.setB_name(AutoBeautyType.AUTOBEAUTY_CUTE);
AUTOBEAUTY_CUTE.setImg_id(R.mipmap.beauty_keai);
AUTOBEAUTY_CUTE.setValue(0);
beautifulList.add(AUTOBEAUTY_CUTE);
BeautyFaceBean AUTOBEAUTY_GODDESS = new BeautyFaceBean();
AUTOBEAUTY_GODDESS.setTitle(WordUtil.getString(R.string.goddess));
AUTOBEAUTY_GODDESS.setTitle(mContext.getString(R.string.goddess));
AUTOBEAUTY_GODDESS.setB_name(AutoBeautyType.AUTOBEAUTY_GODDESS);
AUTOBEAUTY_GODDESS.setImg_id(R.mipmap.beauty_nvshen);
AUTOBEAUTY_GODDESS.setValue(0);
beautifulList.add(AUTOBEAUTY_GODDESS);
BeautyFaceBean AUTOBEAUTY_PUREWHITE = new BeautyFaceBean();
AUTOBEAUTY_PUREWHITE.setTitle(WordUtil.getString(R.string.white1));
AUTOBEAUTY_PUREWHITE.setTitle(mContext.getString(R.string.white1));
AUTOBEAUTY_PUREWHITE.setB_name(AutoBeautyType.AUTOBEAUTY_PUREWHITE);
AUTOBEAUTY_PUREWHITE.setImg_id(R.mipmap.beauty_jingbai);
AUTOBEAUTY_PUREWHITE.setValue(0);
@ -366,7 +366,7 @@ public class LiveBeautyDialogFragment extends AbsDialogFragment {
beauty_seek.setProgress(beautyFaceList.get(0).getValue());
} else {
BeautyFaceBean RUDDY = new BeautyFaceBean();
RUDDY.setTitle(WordUtil.getString(R.string.rosy));
RUDDY.setTitle(mContext.getString(R.string.rosy));
RUDDY.setName(SimpleBeautyType.RUDDY);
RUDDY.setImg_id(R.mipmap.ruddy);
RUDDY.setValue(64);
@ -374,42 +374,42 @@ public class LiveBeautyDialogFragment extends AbsDialogFragment {
beautyFaceList.add(RUDDY);
BeautyFaceBean SKIN_WHITENING = new BeautyFaceBean();
SKIN_WHITENING.setTitle(WordUtil.getString(R.string.skin));
SKIN_WHITENING.setTitle(mContext.getString(R.string.skin));
SKIN_WHITENING.setImg_id(R.mipmap.momo_mb);
SKIN_WHITENING.setName(SimpleBeautyType.SKIN_WHITENING);
SKIN_WHITENING.setValue(55);
beautyFaceList.add(SKIN_WHITENING);
BeautyFaceBean SKIN_SMOOTH = new BeautyFaceBean();
SKIN_SMOOTH.setTitle(WordUtil.getString(R.string.smooth));
SKIN_SMOOTH.setTitle(mContext.getString(R.string.smooth));
SKIN_SMOOTH.setImg_id(R.mipmap.momo_mp);
SKIN_SMOOTH.setName(SimpleBeautyType.SKIN_SMOOTH);
SKIN_SMOOTH.setValue(58);
beautyFaceList.add(SKIN_SMOOTH);
BeautyFaceBean BIG_EYE = new BeautyFaceBean();
BIG_EYE.setTitle(WordUtil.getString(R.string.big_eyes));
BIG_EYE.setTitle(mContext.getString(R.string.big_eyes));
BIG_EYE.setImg_id(R.mipmap.momo_dy);
BIG_EYE.setName(SimpleBeautyType.BIG_EYE);
BIG_EYE.setValue(52);
beautyFaceList.add(BIG_EYE);
BeautyFaceBean THIN_FACE = new BeautyFaceBean();
THIN_FACE.setTitle(WordUtil.getString(R.string.slim_face));
THIN_FACE.setTitle(mContext.getString(R.string.slim_face));
THIN_FACE.setImg_id(R.mipmap.momo_sl);
THIN_FACE.setName(SimpleBeautyType.THIN_FACE);
THIN_FACE.setValue(52);
beautyFaceList.add(THIN_FACE);
BeautyFaceBean JAW_SHAPE = new BeautyFaceBean();
JAW_SHAPE.setTitle(WordUtil.getString(R.string.thin_face));
JAW_SHAPE.setTitle(mContext.getString(R.string.thin_face));
JAW_SHAPE.setImg_id(R.mipmap.momo_xl);
JAW_SHAPE.setName(SimpleBeautyType.JAW_SHAPE);
JAW_SHAPE.setValue(38);
beautyFaceList.add(JAW_SHAPE);
BeautyFaceBean CHIN_LENGTH = new BeautyFaceBean();
CHIN_LENGTH.setTitle(WordUtil.getString(R.string.chin));
CHIN_LENGTH.setTitle(mContext.getString(R.string.chin));
CHIN_LENGTH.setName(SimpleBeautyType.CHIN_LENGTH);
CHIN_LENGTH.setImg_id(R.mipmap.chin);
CHIN_LENGTH.setValue(39);
@ -417,7 +417,7 @@ public class LiveBeautyDialogFragment extends AbsDialogFragment {
BeautyFaceBean NOSE_SIZE = new BeautyFaceBean();
NOSE_SIZE.setTitle(WordUtil.getString(R.string.nose));
NOSE_SIZE.setTitle(mContext.getString(R.string.nose));
NOSE_SIZE.setName(SimpleBeautyType.NOSE_SIZE);
NOSE_SIZE.setImg_id(R.mipmap.nose_size);
NOSE_SIZE.setValue(55);
@ -425,21 +425,21 @@ public class LiveBeautyDialogFragment extends AbsDialogFragment {
BeautyFaceBean MOUTH_SIZE = new BeautyFaceBean();
MOUTH_SIZE.setTitle(WordUtil.getString(R.string.lips));
MOUTH_SIZE.setTitle(mContext.getString(R.string.lips));
MOUTH_SIZE.setName(SimpleBeautyType.MOUTH_SIZE);
MOUTH_SIZE.setImg_id(R.mipmap.lip_size);
MOUTH_SIZE.setValue(45);
beautyFaceList.add(MOUTH_SIZE);
BeautyFaceBean EYE_BRIGHT = new BeautyFaceBean();
EYE_BRIGHT.setTitle(WordUtil.getString(R.string.bright_eyes));
EYE_BRIGHT.setTitle(mContext.getString(R.string.bright_eyes));
EYE_BRIGHT.setName(SimpleBeautyType.EYE_BRIGHT);
EYE_BRIGHT.setImg_id(R.mipmap.bright_eyes);
EYE_BRIGHT.setValue(36);
beautyFaceList.add(EYE_BRIGHT);
BeautyFaceBean TEETH_WHITE = new BeautyFaceBean();
TEETH_WHITE.setTitle(WordUtil.getString(R.string.teeth));
TEETH_WHITE.setTitle(mContext.getString(R.string.teeth));
TEETH_WHITE.setName(SimpleBeautyType.TEETH_WHITE);
TEETH_WHITE.setImg_id(R.mipmap.white_teeth);
TEETH_WHITE.setValue(39);
@ -461,7 +461,7 @@ public class LiveBeautyDialogFragment extends AbsDialogFragment {
}
} else {
BeautyFaceBean ZR = new BeautyFaceBean();
ZR.setTitle(WordUtil.getString(R.string.light));
ZR.setTitle(mContext.getString(R.string.light));
ZR.setPaths("zr");
ZR.setValue(0);
ZR.setImg_id(R.mipmap.filter_ziran);
@ -469,28 +469,28 @@ public class LiveBeautyDialogFragment extends AbsDialogFragment {
filterList.add(ZR);
BeautyFaceBean BX = new BeautyFaceBean();
BX.setTitle(WordUtil.getString(R.string.white));
BX.setTitle(mContext.getString(R.string.white));
BX.setPaths("bx");
BX.setValue(0);
BX.setImg_id(R.mipmap.filter_baixixx);
filterList.add(BX);
BeautyFaceBean RX = new BeautyFaceBean();
RX.setTitle(WordUtil.getString(R.string.jp));
RX.setTitle(mContext.getString(R.string.jp));
RX.setPaths("rx");
RX.setValue(0);
RX.setImg_id(R.mipmap.filter_rii);
filterList.add(RX);
BeautyFaceBean HB = new BeautyFaceBean();
HB.setTitle(WordUtil.getString(R.string.bw));
HB.setTitle(mContext.getString(R.string.bw));
HB.setPaths("hb");
HB.setImg_id(R.mipmap.filter_heibai);
HB.setValue(0);
filterList.add(HB);
BeautyFaceBean RH = new BeautyFaceBean();
RH.setTitle(WordUtil.getString(R.string.soft));
RH.setTitle(mContext.getString(R.string.soft));
RX.setPaths("rh");
RH.setImg_id(R.mipmap.filter_rouhe);
@ -498,14 +498,14 @@ public class LiveBeautyDialogFragment extends AbsDialogFragment {
filterList.add(RH);
BeautyFaceBean RG = new BeautyFaceBean();
RG.setTitle(WordUtil.getString(R.string.warmth));
RG.setTitle(mContext.getString(R.string.warmth));
RG.setImg_id(R.mipmap.filter_nuanguang);
RG.setPaths("rg");
RG.setValue(0);
filterList.add(RG);
BeautyFaceBean FG = new BeautyFaceBean();
FG.setTitle(WordUtil.getString(R.string.retro));
FG.setTitle(mContext.getString(R.string.retro));
FG.setPaths("fg");
FG.setImg_id(R.mipmap.filter_fugu);
FG.setValue(0);
@ -513,7 +513,7 @@ public class LiveBeautyDialogFragment extends AbsDialogFragment {
BeautyFaceBean HX = new BeautyFaceBean();
HX.setTitle(WordUtil.getString(R.string.flower));
HX.setTitle(mContext.getString(R.string.flower));
HX.setPaths("hx");
HX.setImg_id(R.mipmap.filter_huaxiang);
HX.setValue(0);
@ -521,49 +521,49 @@ public class LiveBeautyDialogFragment extends AbsDialogFragment {
BeautyFaceBean QY = new BeautyFaceBean();
QY.setTitle(WordUtil.getString(R.string.easy));
QY.setTitle(mContext.getString(R.string.easy));
QY.setPaths("qy");
QY.setImg_id(R.mipmap.filter_qingyang);
QY.setValue(0);
filterList.add(QY);
BeautyFaceBean YQ = new BeautyFaceBean();
YQ.setTitle(WordUtil.getString(R.string.vitality));
YQ.setTitle(mContext.getString(R.string.vitality));
YQ.setPaths("yq");
YQ.setImg_id(R.mipmap.filter_yuanqi);
YQ.setValue(0);
filterList.add(YQ);
BeautyFaceBean XM = new BeautyFaceBean();
XM.setTitle(WordUtil.getString(R.string.bright));
XM.setTitle(mContext.getString(R.string.bright));
XM.setPaths("xm");
XM.setImg_id(R.mipmap.filter_xianming);
XM.setValue(0);
filterList.add(XM);
BeautyFaceBean ML = new BeautyFaceBean();
ML.setTitle(WordUtil.getString(R.string.bright));
ML.setTitle(mContext.getString(R.string.bright));
ML.setPaths("ml");
ML.setImg_id(R.mipmap.filter_mingliang);
ML.setValue(0);
filterList.add(ML);
BeautyFaceBean SH = new BeautyFaceBean();
SH.setTitle(WordUtil.getString(R.string.deep));
SH.setTitle(mContext.getString(R.string.deep));
SH.setPaths("sh");
SH.setImg_id(R.mipmap.filter_shenhai);
SH.setValue(0);
filterList.add(SH);
BeautyFaceBean XY = new BeautyFaceBean();
XY.setTitle(WordUtil.getString(R.string.sunset));
XY.setTitle(mContext.getString(R.string.sunset));
XY.setPaths("xy");
XY.setImg_id(R.mipmap.filter_xiyang);
XY.setValue(0);
filterList.add(XY);
BeautyFaceBean ZY = new BeautyFaceBean();
ZY.setTitle(WordUtil.getString(R.string.cure));
ZY.setTitle(mContext.getString(R.string.cure));
ZY.setPaths("zy");
ZY.setImg_id(R.mipmap.filter_zhiyu);
ZY.setValue(0);

View File

@ -62,28 +62,28 @@ public class LiveDataInfoDialog extends AbsDialogPopupWindow {
private void initData() {
list = new ArrayList<>();
list.add(new LiveDataInfoModel("#00FFFF", WordUtil.getString(R.string.live_data_coin), WordUtil.getString(R.string.live_data_loading)));
list.add(new LiveDataInfoModel("#FFF69F", WordUtil.getString(R.string.live_data_gold), WordUtil.getString(R.string.live_data_loading)));
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_accept), WordUtil.getString(R.string.live_data_loading)));
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_enter), WordUtil.getString(R.string.live_data_loading)));
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_attention), WordUtil.getString(R.string.live_data_loading)));
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_attention_rate), WordUtil.getString(R.string.live_data_loading)));
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_fan_group), WordUtil.getString(R.string.live_data_loading)));
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_fan_group_rate), WordUtil.getString(R.string.live_data_loading)));
list.add(new LiveDataInfoModel("#00FFFF",getContext().getString(R.string.live_data_coin),getContext().getString(R.string.live_data_loading)));
list.add(new LiveDataInfoModel("#FFF69F",getContext().getString(R.string.live_data_gold),getContext().getString(R.string.live_data_loading)));
list.add(new LiveDataInfoModel(getContext().getString(R.string.live_data_accept),getContext().getString(R.string.live_data_loading)));
list.add(new LiveDataInfoModel(getContext().getString(R.string.live_data_enter),getContext().getString(R.string.live_data_loading)));
list.add(new LiveDataInfoModel(getContext().getString(R.string.live_data_attention),getContext().getString(R.string.live_data_loading)));
list.add(new LiveDataInfoModel(getContext().getString(R.string.live_data_attention_rate),getContext().getString(R.string.live_data_loading)));
list.add(new LiveDataInfoModel(getContext().getString(R.string.live_data_fan_group),getContext().getString(R.string.live_data_loading)));
list.add(new LiveDataInfoModel(getContext().getString(R.string.live_data_fan_group_rate),getContext().getString(R.string.live_data_loading)));
adapter.setList(list);
LiveNetManager.get(getContext())
.getLiveData(liveUid, new HttpCallback<com.yunbao.common.bean.LiveDataInfoModel>() {
@Override
public void onSuccess(com.yunbao.common.bean.LiveDataInfoModel data) {
list.clear();
list.add(new LiveDataInfoModel("#00FFFF", WordUtil.getString(R.string.live_data_coin), data.getTotalCoin() + ""));
list.add(new LiveDataInfoModel("#FFF69F", WordUtil.getString(R.string.live_data_gold), data.getTotalGold() + ""));
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_accept), data.getAcceptNum() + ""));
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_enter), data.getEnterNum() + ""));
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_attention), data.getAttentionNum() + ""));
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_attention_rate), data.getAttentionNumRate() + ""));
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_fan_group), data.getFanGroupNum() + ""));
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_fan_group_rate), data.getFanGroupNumRate() + ""));
list.add(new LiveDataInfoModel("#00FFFF",getContext().getString(R.string.live_data_coin), data.getTotalCoin() + ""));
list.add(new LiveDataInfoModel("#FFF69F",getContext().getString(R.string.live_data_gold), data.getTotalGold() + ""));
list.add(new LiveDataInfoModel(getContext().getString(R.string.live_data_accept), data.getAcceptNum() + ""));
list.add(new LiveDataInfoModel(getContext().getString(R.string.live_data_enter), data.getEnterNum() + ""));
list.add(new LiveDataInfoModel(getContext().getString(R.string.live_data_attention), data.getAttentionNum() + ""));
list.add(new LiveDataInfoModel(getContext().getString(R.string.live_data_attention_rate), data.getAttentionNumRate() + ""));
list.add(new LiveDataInfoModel(getContext().getString(R.string.live_data_fan_group), data.getFanGroupNum() + ""));
list.add(new LiveDataInfoModel(getContext().getString(R.string.live_data_fan_group_rate), data.getFanGroupNumRate() + ""));
adapter.setList(list);
}

View File

@ -181,14 +181,14 @@ public class LiveFansMedalDialogFragment extends AbsDialogFragment implements Vi
// mFans.setText(LiveTextRender.renderLiveUserDialogData(obj.getLongValue("fans")));
// mConsume.setText(LiveTextRender.renderLiveUserDialogData(obj.getLongValue("consumption")));
// mVotes.setText(LiveTextRender.renderLiveUserDialogData(obj.getLongValue("votestotal")));
// mConsumeTip.setText(WordUtil.getString(R.string.live_user_send) + appConfig.getCoinName());
// mVotesTip.setText(WordUtil.getString(R.string.live_user_get) + appConfig.getVotesName());
// mConsumeTip.setText(mContext.getString(R.string.live_user_send) + appConfig.getCoinName());
// mVotesTip.setText(mContext.getString(R.string.live_user_get) + appConfig.getVotesName());
// if (mType == TYPE_AUD_ANC) {
// showImpress(obj.getString("label"));
// }
// mFollowing = obj.getIntValue("isattention") == 1;
// if (mFollowText != null) {
// mFollowText.setText(mFollowing ? WordUtil.getString(R.string.following) : WordUtil.getString(R.string.follow));
// mFollowText.setText(mFollowing ?mContext.getString(R.string.following) :mContext.getString(R.string.follow));
// }
// if (mFollowImage != null) {
// mFollowImage.setImageDrawable(mFollowing ? mFollowDrawable : mUnFollowDrawable);
@ -306,7 +306,7 @@ public class LiveFansMedalDialogFragment extends AbsDialogFragment implements Vi
// }
// if (isAttention == 1 && mLiveUid.equals(mToUid)) {//关注了主播
// ((LiveActivity) mContext).sendSystemMessage(
// CommonAppConfig.getInstance().getUserBean().getUserNiceName() + WordUtil.getString(R.string.live_follow_anchor));
// CommonAppConfig.getInstance().getUserBean().getUserNiceName() +mContext.getString(R.string.live_follow_anchor));
// }
// }
// };

View File

@ -127,9 +127,9 @@ public class LiveGuardBuyDialogFragment extends AbsDialogFragment implements Vie
if (bundle != null) {
mLiveUid = bundle.getString(Constants.LIVE_UID);
mStream = bundle.getString(Constants.STREAM);
String coinName = WordUtil.getString(R.string.diamond);
String coinName =mContext.getString(R.string.diamond);
mCoinName = coinName;
mCoinNameTextView.setText(WordUtil.getString(R.string.guard_my) + coinName + ":");
mCoinNameTextView.setText(mContext.getString(R.string.guard_my) + coinName + ":");
}
LiveHttpUtil.getGuardBuyList(new HttpCallback() {
@Override
@ -258,7 +258,7 @@ public class LiveGuardBuyDialogFragment extends AbsDialogFragment implements Vie
}
Log.d("ffffff", "" + mLiveGuardInfo.getMyGuardType() + " " + mTargetBuyBean.getType());
if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_MONTH && mTargetBuyBean.getType() == Constants.GUARD_TYPE_DAY) {
DialogUitl.showSimpleTipDialog(mContext, WordUtil.getString(R.string.guard_buy_tip));
DialogUitl.showSimpleTipDialog(mContext,mContext.getString(R.string.guard_buy_tip));
return;
} else if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_YEAR && mTargetBuyBean.getType() == Constants.GUARD_TYPE_DAY) {
DialogUitl.showSimpleTipDialog(mContext, "您為當前主播的年守護無法開通周守護");
@ -269,7 +269,7 @@ public class LiveGuardBuyDialogFragment extends AbsDialogFragment implements Vie
} else {
if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_MONTH
&& mTargetBuyBean.getType() == Constants.GUARD_TYPE_YEAR) {
DialogUitl.showSimpleDialog(mContext, WordUtil.getString(R.string.guard_buy_tip_2), new DialogUitl.SimpleCallback() {
DialogUitl.showSimpleDialog(mContext,mContext.getString(R.string.guard_buy_tip_2), new DialogUitl.SimpleCallback() {
@Override
public void onConfirmClick(Dialog dialog, String content) {
doBuyGuard();
@ -308,7 +308,7 @@ public class LiveGuardBuyDialogFragment extends AbsDialogFragment implements Vie
return;
}
DialogUitl.showSimpleDialog(mContext,
String.format(WordUtil.getString(R.string.guard_buy_tip_3), mTargetBuyBean.getCoin(), mCoinName, mTargetBuyBean.getShopName()),
String.format(mContext.getString(R.string.guard_buy_tip_3), mTargetBuyBean.getCoin(), mCoinName, mTargetBuyBean.getShopName(getContext())),
new DialogUitl.SimpleCallback() {
@Override

View File

@ -87,7 +87,7 @@ public class LiveGuardDialogFragment extends AbsDialogFragment implements View.O
if (mIsAnchor) {
mBottom.setVisibility(View.GONE);
if (mLiveGuardInfo != null) {
mGuardNum.setText(WordUtil.getString(R.string.guard_guard) + "(" + mLiveGuardInfo.getGuardNum() + ")");
mGuardNum.setText(mContext.getString(R.string.guard_guard) + "(" + mLiveGuardInfo.getGuardNum() + ")");
}
} else {
mTip = (TextView) mRootView.findViewById(R.id.tip);
@ -100,18 +100,18 @@ public class LiveGuardDialogFragment extends AbsDialogFragment implements View.O
return false;
});*/
if (mLiveGuardInfo != null) {
mGuardNum.setText(WordUtil.getString(R.string.guard_guard) + "(" + mLiveGuardInfo.getGuardNum() + ")");
mGuardNum.setText(mContext.getString(R.string.guard_guard) + "(" + mLiveGuardInfo.getGuardNum() + ")");
int guardType = mLiveGuardInfo.getMyGuardType();
if (guardType == Constants.GUARD_TYPE_NONE) {
mTip.setText(R.string.guard_tip_0);
} else if (guardType == Constants.GUARD_TYPE_DAY) {
mTip.setText(WordUtil.getString(R.string.guard_tip_day) + mLiveGuardInfo.getMyGuardEndTime());
mTip.setText(mContext.getString(R.string.guard_tip_day) + mLiveGuardInfo.getMyGuardEndTime());
mBtnBuy.setText(R.string.guard_buy_3);
} else if (guardType == Constants.GUARD_TYPE_MONTH) {
mTip.setText(WordUtil.getString(R.string.guard_tip_1) + mLiveGuardInfo.getMyGuardEndTime());
mTip.setText(mContext.getString(R.string.guard_tip_1) + mLiveGuardInfo.getMyGuardEndTime());
mBtnBuy.setText(R.string.guard_buy_3);
} else if (guardType == Constants.GUARD_TYPE_YEAR) {
mTip.setText(WordUtil.getString(R.string.guard_tip_2) + mLiveGuardInfo.getMyGuardEndTime());
mTip.setText(mContext.getString(R.string.guard_tip_2) + mLiveGuardInfo.getMyGuardEndTime());
mBtnBuy.setText(R.string.guard_buy_3);
}
}

View File

@ -169,8 +169,8 @@ public class LiveInputDialogFragment extends AbsDialogFragment implements View.O
String danmuPrice = bundle.getString(Constants.LIVE_DANMU_PRICE);
String coinName = bundle.getString(Constants.COIN_NAME);
mLiveUid = bundle.getString(Constants.LIVE_UID);
mHint1 = WordUtil.getString(R.string.live_open_alba) + danmuPrice + coinName + "/" + WordUtil.getString(R.string.live_tiao);
mHint2 = WordUtil.getString(R.string.live_say_something);
mHint1 =mContext.getString(R.string.live_open_alba) + danmuPrice + coinName + "/" +mContext.getString(R.string.live_tiao);
mHint2 =mContext.getString(R.string.live_say_something);
mCheckBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton button, boolean isChecked) {
@ -312,7 +312,7 @@ public class LiveInputDialogFragment extends AbsDialogFragment implements View.O
messageType = SendMessageType.POPUPSCREEN;
} else {
radioButton.setCompoundDrawablesRelativeWithIntrinsicBounds(worldHornP, null, null, null);
mInput.setHint(String.format(WordUtil.getString(R.string.whole_station_horn_hint), trumpetNum));
mInput.setHint(String.format(mContext.getString(R.string.whole_station_horn_hint), trumpetNum));
messageType = SendMessageType.WORLDHORN;
}
} else {

View File

@ -1,5 +1,6 @@
package com.yunbao.live.dialog;
import android.annotation.SuppressLint;
import android.app.Dialog;
import android.os.Bundle;
import android.text.Html;
@ -173,10 +174,10 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
mAncherIcon = bundle.getString(Constants.LIVE_ANCHER_ICON);
mUserIcon = bundle.getString(Constants.USER_ICON);
showBuyView = bundle.getBoolean("showBuyView", true);
String coinName = WordUtil.getString(R.string.diamond);
String coinName =mContext.getString(R.string.diamond);
mCoinName = coinName;
isEmpty = bundle.getBoolean("guard", true);
// mCoinNameTextView.setText(WordUtil.getString(R.string.guard_my) + coinName + ":");
// mCoinNameTextView.setText(mContext.getString(R.string.guard_my) + coinName + ":");
mCoinNameTextView.setText(R.string.favoriteanchor);
anchorName.setText(String.format(mContext.getString(R.string.theguardianof), mAncherName));
}
@ -193,7 +194,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
e.printStackTrace();
}
mCoin.setText(String.valueOf(mCoinVal));
guardCoin2.setText(WordUtil.getString(R.string.guard_my) + mCoinName + ":" + mCoinVal);
guardCoin2.setText(mContext.getString(R.string.guard_my) + mCoinName + ":" + mCoinVal);
buyItemsAdapter.setItems(mBuyList);
mGuardRightAdapter.setList(mRightList);
buyItemsAdapter.notifyDataSetChanged();
@ -326,7 +327,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
}
Log.d("ffffff", "" + mLiveGuardInfo.getMyGuardType() + " " + mTargetBuyBean.getType());
if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_MONTH && mTargetBuyBean.getType() == Constants.GUARD_TYPE_DAY) {
DialogUitl.showSimpleTipDialog(mContext, WordUtil.getString(R.string.guard_buy_tip));
DialogUitl.showSimpleTipDialog(mContext,mContext.getString(R.string.guard_buy_tip));
return;
} else if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_YEAR && mTargetBuyBean.getType() == Constants.GUARD_TYPE_DAY) {
DialogUitl.showSimpleTipDialog(mContext, "您為當前主播的年守護無法開通周守護");
@ -337,7 +338,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
} else {
if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_MONTH
&& mTargetBuyBean.getType() == Constants.GUARD_TYPE_YEAR) {
DialogUitl.showSimpleDialog(mContext, WordUtil.getString(R.string.guard_buy_tip_2), new DialogUitl.SimpleCallback() {
DialogUitl.showSimpleDialog(mContext,mContext.getString(R.string.guard_buy_tip_2), new DialogUitl.SimpleCallback() {
@Override
public void onConfirmClick(Dialog dialog, String content) {
doBuyGuard();
@ -418,7 +419,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
bean = datum;
}
}
String str = String.format(WordUtil.getString(R.string.live_use_discount_content),
String str = String.format(mContext.getString(R.string.live_use_discount_content),
bean.getName(),
"###",//占位符
"###"
@ -435,9 +436,9 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
Dialog dialog = new DialogUitl.Builder(mContext)
.setHtmlCode(content)
.setView(R.layout.dialog_live_random_pk)
.setTitle(WordUtil.getString(R.string.dialog_tip))
.setCancelString(WordUtil.getString(R.string.live_use_discount_no))
.setConfrimString(WordUtil.getString(R.string.live_use_discount_yes))
.setTitle(mContext.getString(R.string.dialog_tip))
.setCancelString(mContext.getString(R.string.live_use_discount_no))
.setConfrimString(mContext.getString(R.string.live_use_discount_yes))
.setClickCallback(new DialogUitl.SimpleCallback2() {
@Override
public void onCancelClick() {
@ -463,7 +464,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
private void buy() {
DialogUitl.showSimpleDialog(mContext,
String.format(WordUtil.getString(R.string.guard_buy_tip_3), mTargetBuyBean.getCoin(), mCoinName, mTargetBuyBean.getShopName()),
String.format(mContext.getString(R.string.guard_buy_tip_3), mTargetBuyBean.getCoin(), mCoinName, mTargetBuyBean.getShopName(getContext())),
new DialogUitl.SimpleCallback() {
@Override

View File

@ -194,7 +194,7 @@ public class LiveNewGuardListDialogFragment extends AbsDialogFragment implements
ImgLoader.display(mContext, bean.getAvatar(), guardIcon);
guardIcon.setVisibility(View.VISIBLE);
userName.setText(bean.getUserNiceName());
String guardString = WordUtil.getString(R.string.guard_week_con);
String guardString = mContext.getString(R.string.guard_week_con);
userGuard.setText(guardString + " " + bean.getContribute());
userSex.setImageResource(CommonIconUtil.getSexIcon(bean.getSex()));
LevelBean levelBean = CommonAppConfig.getInstance().getLevel(bean.getLevel());
@ -207,13 +207,13 @@ public class LiveNewGuardListDialogFragment extends AbsDialogFragment implements
if (guardType == Constants.GUARD_TYPE_NONE) {
tip1.setText(R.string.guard_tip_0);
} else if (guardType == Constants.GUARD_TYPE_DAY) {
tip1.setText(WordUtil.getString(R.string.guard_tip_day) + mLiveGuardInfo.getMyGuardEndTime());
tip1.setText(mContext.getString(R.string.guard_tip_day) + mLiveGuardInfo.getMyGuardEndTime());
mBtnBuy.setText(R.string.guard_buy_3);
} else if (guardType == Constants.GUARD_TYPE_MONTH) {
tip1.setText(WordUtil.getString(R.string.guard_tip_1) + mLiveGuardInfo.getMyGuardEndTime());
tip1.setText(mContext.getString(R.string.guard_tip_1) + mLiveGuardInfo.getMyGuardEndTime());
mBtnBuy.setText(R.string.guard_buy_3);
} else if (guardType == Constants.GUARD_TYPE_YEAR) {
tip1.setText(WordUtil.getString(R.string.guard_tip_2) + mLiveGuardInfo.getMyGuardEndTime());
tip1.setText(mContext.getString(R.string.guard_tip_2) + mLiveGuardInfo.getMyGuardEndTime());
mBtnBuy.setText(R.string.guard_buy_3);
}
}

View File

@ -81,7 +81,7 @@ public class LiveNewRoomTypeDialogFragment extends AbsDialogFragment implements
pwd.setOnClickListener(view -> select(false));
submit.setOnClickListener(view -> {
if (isSelectPublic) {
LiveRoomTypeBean bean = new LiveRoomTypeBean(0, WordUtil.getString(R.string.live_room_public));
LiveRoomTypeBean bean = new LiveRoomTypeBean(0,mContext.getString(R.string.live_room_public));
if(mCallback!=null) {
mCallback.callback(bean);
}

View File

@ -455,14 +455,14 @@ public class LiveOldUserDialogFragment extends AbsDialogFragment implements View
mFans.setText(new LiveTextRender().renderLiveUserDialogData(obj.getLongValue("fans")));
mConsume.setText(new LiveTextRender().renderLiveUserDialogData(obj.getLongValue("consumption")));
mVotes.setText(new LiveTextRender().renderLiveUserDialogData(obj.getLongValue("votestotal")));
mConsumeTip.setText(WordUtil.getString(R.string.live_user_send) + appConfig.getCoinName());
mVotesTip.setText(WordUtil.getString(R.string.live_user_get) + appConfig.getVotesName());
mConsumeTip.setText(mContext.getString(R.string.live_user_send) + appConfig.getCoinName());
mVotesTip.setText(mContext.getString(R.string.live_user_get) + appConfig.getVotesName());
if (mType == TYPE_AUD_ANC) {
showImpress(obj.getString("label"));
}
mFollowing = obj.getIntValue("isattention") == 1;
if (mFollowText != null) {
mFollowText.setText(mFollowing ? WordUtil.getString(R.string.following) : WordUtil.getString(R.string.follow));
mFollowText.setText(mFollowing ?mContext.getString(R.string.following) :mContext.getString(R.string.follow));
}
if (mFollowImage != null) {
mFollowImage.setImageDrawable(mFollowing ? mFollowDrawable : mUnFollowDrawable);
@ -575,7 +575,7 @@ public class LiveOldUserDialogFragment extends AbsDialogFragment implements View
}
if (isAttention == 1 && mLiveUid.equals(mToUid)) {//关注了主播
((LiveActivity) mContext).sendSystemMessage(
CommonAppConfig.getInstance().getUserBean().getUserNiceName() + WordUtil.getString(R.string.live_follow_anchor));
CommonAppConfig.getInstance().getUserBean().getUserNiceName() +mContext.getString(R.string.live_follow_anchor));
}
}
};

View File

@ -89,7 +89,7 @@ public class LiveRedPackListDialogFragment extends AbsDialogFragment implements
mRedPackAdapter = new RedPackAdapter(mContext, list);
mRedPackAdapter.setOnItemClickListener(LiveRedPackListDialogFragment.this);
mRecyclerView.setAdapter(mRedPackAdapter);
mCount.setText(String.format(WordUtil.getString(R.string.red_pack_9), String.valueOf(list.size())));
mCount.setText(String.format(mContext.getString(R.string.red_pack_9), String.valueOf(list.size())));
} else {
ToastUtil.show(msg);
}

View File

@ -110,10 +110,10 @@ public class LiveRedPackResultDialogFragment extends AbsDialogFragment {
ImgLoader.displayAvatar(mContext,redPackInfo.getString("avatar"), mAvatar);
}
if (mName != null) {
mName.setText(String.format(WordUtil.getString(R.string.red_pack_17), redPackInfo.getString("user_nicename")));
mName.setText(String.format(mContext.getString(R.string.red_pack_17), redPackInfo.getString("user_nicename")));
}
if (mNum != null) {
mNum.setText(String.format(WordUtil.getString(R.string.red_pack_19),
mNum.setText(String.format(mContext.getString(R.string.red_pack_19),
redPackInfo.getString("nums_rob") + "/" + redPackInfo.getString("nums"),
redPackInfo.getString("coin_rob") + "/" + redPackInfo.getString("coin"),
mCoinName));
@ -132,7 +132,7 @@ public class LiveRedPackResultDialogFragment extends AbsDialogFragment {
mWinCoin.setText(winCoinVal);
}
if (mCoinNameTextView != null) {
mCoinNameTextView.setText(String.format(WordUtil.getString(R.string.red_pack_18), mCoinName));
mCoinNameTextView.setText(String.format(mContext.getString(R.string.red_pack_18), mCoinName));
}
}
if (mRecyclerView != null) {

View File

@ -208,7 +208,7 @@ public class LiveRedPackRobDialogFragment extends AbsDialogFragment implements V
mWinCoin.setText(winCoin);
}
if (mWinTip != null) {
mWinTip.setText(String.format(WordUtil.getString(R.string.red_pack_16), mRedPackBean.getUserNiceName(), mCoinName));
mWinTip.setText(String.format(mContext.getString(R.string.red_pack_16), mRedPackBean.getUserNiceName(), mCoinName));
}
}

View File

@ -87,7 +87,7 @@ public class LiveRedPackSendDialogFragment extends AbsDialogFragment implements
if (TextUtils.isEmpty(mStream)) {
return;
}
mSendRedPackString = WordUtil.getString(R.string.red_pack_6) + " ";
mSendRedPackString =mContext.getString(R.string.red_pack_6) + " ";
mCoinName1 = mRootView.findViewById(R.id.coin_name_1);
mCoinName2 = mRootView.findViewById(R.id.coin_name_2);
mCoinName = CommonAppConfig.getInstance().getCoinName();

View File

@ -243,11 +243,11 @@ public class LiveTaskDialog extends AbsDialogPopupWindow {
LiveTaskModel.Task task = new LiveTaskModel.Task();
LiveTaskModel.Task task2 = new LiveTaskModel.Task();
if (type == 1) {
task.setTaskName(WordUtil.getString(R.string.live_task_no1));
task2.setTaskName(WordUtil.getString(R.string.live_task_no2));
task.setTaskName(getContext().getString(R.string.live_task_no1));
task2.setTaskName(getContext().getString(R.string.live_task_no2));
} else {
task.setTaskName(WordUtil.getString(R.string.live_task_fans_no1));
task2.setTaskName(WordUtil.getString(R.string.live_task_fans_no2));
task.setTaskName(getContext().getString(R.string.live_task_fans_no1));
task2.setTaskName(getContext().getString(R.string.live_task_fans_no2));
}
task.setType(LiveTaskModel.TASK_TYPE_TIP);
task2.setType(LiveTaskModel.TASK_TYPE_TIP);

View File

@ -12,6 +12,7 @@ import com.yunbao.common.Constants;
import com.yunbao.common.HtmlConfig;
import com.yunbao.common.bean.JsTurnTableBean;
import com.yunbao.common.dialog.AbsDialogFragment;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.live.R;
import com.yunbao.live.views.TurnTableWebViewHolder;
@ -19,6 +20,8 @@ import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import java.util.Locale;
import cn.qqtheme.framework.util.ScreenUtils;
@ -73,7 +76,7 @@ public class LiveTurnTableDialogFragment4Audience extends AbsDialogFragment {
if (mTurnTableViewHolder == null) {
String url = HtmlConfig.TURNTABLE_URL;
url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token="
+ CommonAppConfig.getInstance().getToken() + "&liveUid=" + mLiveUid;
+ CommonAppConfig.getInstance().getToken() + "&liveUid=" + mLiveUid + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0");
mTurnTableViewHolder = new TurnTableWebViewHolder(getActivity(), rlWebview, url);
mTurnTableViewHolder.subscribeActivityLifeCycle();
mTurnTableViewHolder.addToParent();

View File

@ -62,7 +62,7 @@ public class LiveUserAnchorMailBoxWebInfoPopDialog extends AbsDialogPopupWindow
Bus.getOn(this);
mWebView = findViewById(R.id.webView);
textView = findViewById(R.id.title);
textView.setText(String.format(WordUtil.getString(R.string.live_user_mailbox_web_title), anchorName));
textView.setText(String.format(getContext().getString(R.string.live_user_mailbox_web_title), anchorName));
mWebView.addJavascriptInterface(JavascriptInterfaceUtils.getInstance()
.setDialogClose(true)
.setmContext(CommonAppContext.getTopActivity(), mWebView), "androidObject");

View File

@ -412,8 +412,8 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
mNoble.setVisibility(View.GONE);
}
mGuard.setText(String.format(mGuard.getText().toString(), obj.getInteger("guard_num")));
mFansVal.setText(WordUtil.getString(R.string.fans) + ":" + mUserBean.getFans());
mPraise.setText(WordUtil.getString(R.string.praise) + ":" + obj.getInteger("user_love_num"));
mFansVal.setText(mContext.getString(R.string.fans) + ":" + mUserBean.getFans());
mPraise.setText(mContext.getString(R.string.praise) + ":" + obj.getInteger("user_love_num"));
mSignDesc.setText(mUserBean.getSignature());
if (isAnchor) {
mNobleVal.setText("" + obj.getInteger("level_fans_num"));
@ -533,9 +533,9 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
private void setAttention() {
if (mFollowing) {
DialogUitl.Builder builder = new DialogUitl.Builder(mContext)
.setContent(WordUtil.getString(R.string.unfollow))
.setConfrimString(WordUtil.getString(R.string.unfollow_confrim))
.setCancelString(WordUtil.getString(R.string.unfollow_cancel))
.setContent(mContext.getString(R.string.unfollow))
.setConfrimString(mContext.getString(R.string.unfollow_confrim))
.setCancelString(mContext.getString(R.string.unfollow_cancel))
.setView(R.layout.dialog_live_unfollow)
.setClickCallback3(new DialogUitl.SimpleCallback3() {
@ -565,7 +565,7 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
updateFollow();
if (isAttention == 1 && mLiveUid.equals(mToUid)) {//关注了主播
((LiveActivity) mContext).sendSystemMessage(
CommonAppConfig.getInstance().getUserBean().getUserNiceName() + WordUtil.getString(R.string.live_follow_anchor));
CommonAppConfig.getInstance().getUserBean().getUserNiceName() +mContext.getString(R.string.live_follow_anchor));
}
}
});
@ -589,7 +589,7 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
private void gotoLive(String live_id) {
DialogUitl.showSimpleDialog(mContext, "是否確認前往對方直播間?", new DialogUitl.SimpleCallback() {
DialogUitl.showSimpleDialog(mContext, mContext.getString(R.string.party_studio), new DialogUitl.SimpleCallback() {
@Override
public void onConfirmClick(Dialog dialog, String content) {
LiveUserDialogFragment.this.dismiss();

View File

@ -11,6 +11,7 @@ import com.yunbao.common.Constants;
import com.yunbao.common.HtmlConfig;
import com.yunbao.common.bean.JsWishBean;
import com.yunbao.common.dialog.AbsDialogFragment;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.utils.DpUtil;
import com.yunbao.live.R;
import com.yunbao.live.activity.LiveAudienceActivity;
@ -20,6 +21,8 @@ import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import java.util.Locale;
/**
* Created by cxf on 2018/10/19.
* 观众查看 心愿单弹窗
@ -69,7 +72,7 @@ public class LiveWishListDialogFragment4Audience extends AbsDialogFragment {
if (mWishWebViewHolder == null) {
String url = HtmlConfig.WISHLIST_URL;
url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token="
+ CommonAppConfig.getInstance().getToken() + "&liveUid=" + mLiveUid;
+ CommonAppConfig.getInstance().getToken() + "&liveUid=" + mLiveUid + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0");
mWishWebViewHolder = new WishlistWebViewHolder(mContext, rlWebview, url);
mWishWebViewHolder.subscribeActivityLifeCycle();
mWishWebViewHolder.addToParent();

View File

@ -46,7 +46,7 @@ public class RandomPkDialogFragment extends AbsDialogFragment implements View.On
return;
}
Log.i(TAG, "onTimer: " + time);
mPkBtnTitle.setText(String.format(WordUtil.getString(R.string.random_pk_info_btn_ing), time));
mPkBtnTitle.setText(String.format(mContext.getString(R.string.random_pk_info_btn_ing), time));
mPkBtnDesc.setText(R.string.random_pk_info_btn_end_desc);
mPkBtnDesc.setVisibility(View.VISIBLE);
mPkBtn.setBackgroundResource(R.drawable.bg_live_room_random_pk_timer);
@ -72,7 +72,7 @@ public class RandomPkDialogFragment extends AbsDialogFragment implements View.On
@Override
public void onPkEndTimer(String time) {
super.onPkEndTimer(time);
mPkBtnTitle.setText(String.format(WordUtil.getString(R.string.random_pk_info_btn_end), time));
mPkBtnTitle.setText(String.format(mContext.getString(R.string.random_pk_info_btn_end), time));
mPkBtnDesc.setText(R.string.random_pk_info_btn_end_desc);
mPkBtn.setEnabled(false);
}
@ -152,12 +152,12 @@ public class RandomPkDialogFragment extends AbsDialogFragment implements View.On
RandomPkManager.getInstance().addOnRandomPkTimer(randomPkTimer);
initPkSwitch();
if (RandomPkManager.getInstance().isRequestPk()) {
mPkBtnTitle.setText(String.format(WordUtil.getString(R.string.random_pk_info_btn_ing), RandomPkManager.getInstance().getTimer()));
mPkBtnTitle.setText(String.format(mContext.getString(R.string.random_pk_info_btn_ing), RandomPkManager.getInstance().getTimer()));
mPkBtnDesc.setText(R.string.random_pk_info_btn_end_desc);
mPkBtnDesc.setVisibility(View.VISIBLE);
mPkBtn.setBackgroundResource(R.drawable.bg_live_room_random_pk_timer);
} else if (RandomPkManager.getInstance().isExiting()) {
mPkBtnTitle.setText(String.format(WordUtil.getString(R.string.random_pk_info_btn_end), RandomPkManager.getInstance().getExitTimer()));
mPkBtnTitle.setText(String.format(mContext.getString(R.string.random_pk_info_btn_end), RandomPkManager.getInstance().getExitTimer()));
mPkBtnDesc.setText(R.string.random_pk_info_btn_end_desc);
mPkBtn.setEnabled(false);
}

View File

@ -72,6 +72,7 @@ import java.io.File;
import java.io.FileInputStream;
import java.lang.ref.SoftReference;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.concurrent.ConcurrentLinkedQueue;
@ -339,7 +340,7 @@ public class LiveGiftAnimPresenter {
mGifGiftTipGroupBuyZuoji.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
WebViewActivity.forward(mContext, HtmlConfig.SHOP);
WebViewActivity.forward(mContext, HtmlConfig.SHOP + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
}
});
}
@ -348,7 +349,7 @@ public class LiveGiftAnimPresenter {
mGifGiftTipGroupBuyLiangName.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
WebViewActivity.forward(mContext, HtmlConfig.SHOP);
WebViewActivity.forward(mContext, HtmlConfig.SHOP + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
}
});
}
@ -933,7 +934,7 @@ public class LiveGiftAnimPresenter {
}
String text = mTempGifGiftBean.getUserNiceName() + " <myfont size='24px'>"
+ WordUtil.getString(R.string.live_send_buy_zuoji_1)
+mContext.getString(R.string.live_send_buy_zuoji_1)
+ "</myfont> " + (mTempGifGiftBean.getCarName());
Spanned spanned = Html.fromHtml(text, null, new HtmlTagHandler("myfont"));
mGifGiftTipBuyZuoji.setText(spanned);
@ -974,7 +975,7 @@ public class LiveGiftAnimPresenter {
}
String text = mTempGifGiftBean.getUserNiceName() + " <myfont size='24px'>"
+ WordUtil.getString(R.string.live_send_buy_liang_name_1)
+mContext.getString(R.string.live_send_buy_liang_name_1)
+ "</myfont> " + mTempGifGiftBean.getLiangName();
Spanned spanned = Html.fromHtml(text, null, new HtmlTagHandler("myfont"));
mGifGiftTipBuyLiangName.setText(spanned);
@ -1622,7 +1623,7 @@ public class LiveGiftAnimPresenter {
});
}
mPrizePoolLevel.setText(String.format(WordUtil.getString(R.string.live_gift_prize_pool_3), level));
mPrizePoolLevel.setText(String.format(mContext.getString(R.string.live_gift_prize_pool_3), level));
mPrizePoolGuang.startAnimation(mPrizePoolGuangAnim);
}

View File

@ -85,7 +85,7 @@ public class LiveLinkMicAnchorPresenter implements View.OnClickListener {
mPkContainer = linkMicViewHolder.getPkContainer();
mLinkMicWaitString = WordUtil.getString(R.string.link_mic_wait);
mLinkMicWaitString =mContext.getString(R.string.link_mic_wait);
mHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
@ -280,7 +280,7 @@ public class LiveLinkMicAnchorPresenter implements View.OnClickListener {
*/
private void acceptLinkMic() {
if (((LiveAnchorActivity) mContext).isBgmPlaying()) {
DialogUitl.showSimpleDialog(mContext, WordUtil.getString(R.string.link_mic_close_bgm), new DialogUitl.SimpleCallback() {
DialogUitl.showSimpleDialog(mContext,mContext.getString(R.string.link_mic_close_bgm), new DialogUitl.SimpleCallback() {
@Override
public void onConfirmClick(Dialog dialog, String content) {
((LiveAnchorActivity) mContext).stopBgm();
@ -494,7 +494,7 @@ public class LiveLinkMicAnchorPresenter implements View.OnClickListener {
*/
public void onlinkMicPlayGaming() {
mLastApplyLinkMicTime = 0;
DialogUitl.showSimpleTipDialog(mContext, WordUtil.getString(R.string.link_mic_play_game));
DialogUitl.showSimpleTipDialog(mContext,mContext.getString(R.string.link_mic_play_game));
}
public void setLiveSdk(int mLiveSDK) {

View File

@ -111,7 +111,7 @@ public class LiveLinkMicPkPresenter implements View.OnClickListener {
mIsAnchor = isAnchor;
mRoot = root;
mPkContainer = linkMicViewHolder.getPkContainer();
mPkTimeString2 = WordUtil.getString(R.string.live_pk_time_2);
mPkTimeString2 =mContext.getString(R.string.live_pk_time_2);
//从本地取数据
String pkTime = CommonAppConfig.getInstance().getAnchorPkTime();

View File

@ -184,7 +184,7 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
mLinkMicTip = btnLinkMic.findViewById(R.id.link_mic_tip);
}
mLinkMicWaitString = WordUtil.getString(R.string.link_mic_wait);
mLinkMicWaitString =mContext.getString(R.string.link_mic_wait);
mHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
@ -284,7 +284,7 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
@Override
public void onPushFailed() {//推流失败的回调
DialogUitl.showSimpleDialog(mContext, WordUtil.getString(R.string.link_mic_failed_2), null);
DialogUitl.showSimpleDialog(mContext,mContext.getString(R.string.link_mic_failed_2), null);
SocketLinkMicUtil.audienceCloseLinkMic(mSocketClient);
}
});
@ -363,7 +363,7 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
*/
private void closeLinkMic(String uid, String uname) {
if (!TextUtils.isEmpty(uid) && uid.equals(mLinkMicUid)) {
ToastUtil.show(uname + WordUtil.getString(R.string.link_mic_exit));
ToastUtil.show(uname +mContext.getString(R.string.link_mic_exit));
if (!mIsAnchor && !TextUtils.isEmpty(mLinkMicUid) && mLinkMicUid.equals(CommonAppConfig.getInstance().getUid())) {//参与连麦的是自己
if (mLiveLinkMicPushViewHolder != null) {
mLiveLinkMicPushViewHolder.release();
@ -682,7 +682,7 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
*/
private void anchorAcceptLinkMicApply() {
if (((LiveAnchorActivity) mContext).isBgmPlaying()) {
DialogUitl.showSimpleDialog(mContext, WordUtil.getString(R.string.link_mic_close_bgm), new DialogUitl.SimpleCallback() {
DialogUitl.showSimpleDialog(mContext,mContext.getString(R.string.link_mic_close_bgm), new DialogUitl.SimpleCallback() {
@Override
public void onConfirmClick(Dialog dialog, String content) {
((LiveAnchorActivity) mContext).stopBgm();

View File

@ -60,7 +60,7 @@ public class LiveRoomCheckLivePresenter {
@Override
public void forwardPwdRoom(CheckLiveModel model) {
DialogUitl.showSimpleInputDialog(context, WordUtil.getString(R.string.live_input_password), DialogUitl.INPUT_TYPE_NUMBER_PASSWORD, new DialogUitl.SimpleCallback2() {
DialogUitl.showSimpleInputDialog(context,mContext.getString(R.string.live_input_password), DialogUitl.INPUT_TYPE_NUMBER_PASSWORD, new DialogUitl.SimpleCallback2() {
@Override
public void onCancelClick() {
if (mContext instanceof Activity) {
@ -71,7 +71,7 @@ public class LiveRoomCheckLivePresenter {
@Override
public void onConfirmClick(Dialog dialog, String content) {
if (TextUtils.isEmpty(content)) {
ToastUtil.show(WordUtil.getString(R.string.live_input_password));
ToastUtil.show(mContext.getString(R.string.live_input_password));
return;
}
String password = MD5Util.getMD5(content);
@ -81,7 +81,7 @@ public class LiveRoomCheckLivePresenter {
actionListener.onLiveRoomChanged(liveUid, stream, model.getType(), model.getTypeVal(), model.getLiveSdk());
}
} else {
ToastUtil.show(WordUtil.getString(R.string.live_password_error));
ToastUtil.show(mContext.getString(R.string.live_password_error));
}
}
});
@ -190,7 +190,7 @@ public class LiveRoomCheckLivePresenter {
* 前往密码房间
*/
private void forwardPwdRoom() {
DialogUitl.showSimpleInputDialog(mContext, WordUtil.getString(R.string.live_input_password), DialogUitl.INPUT_TYPE_NUMBER_PASSWORD, new DialogUitl.SimpleCallback2() {
DialogUitl.showSimpleInputDialog(mContext,mContext.getString(R.string.live_input_password), DialogUitl.INPUT_TYPE_NUMBER_PASSWORD, new DialogUitl.SimpleCallback2() {
@Override
public void onCancelClick() {
if (mContext instanceof Activity) {
@ -201,7 +201,7 @@ public class LiveRoomCheckLivePresenter {
@Override
public void onConfirmClick(Dialog dialog, String content) {
if (TextUtils.isEmpty(content)) {
ToastUtil.show(WordUtil.getString(R.string.live_input_password));
ToastUtil.show(mContext.getString(R.string.live_input_password));
return;
}
String password = MD5Util.getMD5(content);
@ -209,7 +209,7 @@ public class LiveRoomCheckLivePresenter {
dialog.dismiss();
enterLiveRoom();
} else {
ToastUtil.show(WordUtil.getString(R.string.live_password_error));
ToastUtil.show(mContext.getString(R.string.live_password_error));
}
}
});

View File

@ -213,7 +213,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
mRoot = root;
mPkContainer = linkMicViewHolder.getPkContainer();
mPkTimeString1 = "";
mPkTimeString2 = WordUtil.getString(R.string.live_pk_time_2);
mPkTimeString2 =mContext.getString(R.string.live_pk_time_2);
//从本地取数据
String pkTime = CommonAppConfig.getInstance().getAnchorPkTime();
if (!pkTime.isEmpty()) {
@ -254,7 +254,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
mPkContainer = linkMicViewHolder.getPkContainer();
livePushRyViewHolder = linkMicViewHolder;
mPkTimeString1 = "";
mPkTimeString2 = WordUtil.getString(R.string.live_pk_time_2);
mPkTimeString2 =mContext.getString(R.string.live_pk_time_2);
//从本地取数据
String pkTime = CommonAppConfig.getInstance().getAnchorPkTime();
if (!pkTime.isEmpty()) {

View File

@ -6,10 +6,13 @@ import android.content.Context;
import android.text.TextUtils;
import com.yunbao.common.HtmlConfig;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.live.R;
import java.util.Locale;
/**
* Created by cxf on 2018/10/30.
*/
@ -56,7 +59,7 @@ public class UserHomeSharePresenter {
return;
}
String link = HtmlConfig.SHARE_HOME_PAGE + mToUid;
ClipboardManager cm = (ClipboardManager) mContext.getSystemService(Context.CLIPBOARD_SERVICE);
ClipboardManager cm = (ClipboardManager) mContext.getSystemService(Context.CLIPBOARD_SERVICE + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
ClipData clipData = ClipData.newPlainText("text", link);
cm.setPrimaryClip(clipData);
ToastUtil.show(R.string.copy_success);
@ -71,9 +74,9 @@ public class UserHomeSharePresenter {
return;
}
// ShareData data = new ShareData();
// String title = String.format(WordUtil.getString(R.string.home_page_share_1), mToName, WordUtil.getString(R.string.app_name));
// String title = String.format(mContext.getString(R.string.home_page_share_1), mToName,mContext.getString(R.string.app_name));
// data.setTitle(title);
// String des = String.format(WordUtil.getString(R.string.home_page_share_2), mFansNum);
// String des = String.format(mContext.getString(R.string.home_page_share_2), mFansNum);
// data.setDes(des);
// data.setImgUrl(mToAvatarThumb);
// String webUrl = HtmlConfig.SHARE_HOME_PAGE + mToUid;

View File

@ -146,7 +146,7 @@ public class SocketChatUtil {
.param("medal_name", u.getMedalName())
.param("medal_level", u.getMedalLevel())
.param("good_num", u.getGoodnum())
.param("ct", WordUtil.getString(R.string.live_lighted));
.param("ct",WordUtil.getString(R.string.live_lighted));
msg.create();
V2TIMManager.getInstance().sendGroupTextMessage(msg.mResult.toString(), "g" + mLiveUid, V2TIMMessage.V2TIM_PRIORITY_NORMAL, new V2TIMSendCallback<V2TIMMessage>() {
@Override
@ -321,7 +321,7 @@ public class SocketChatUtil {
.param("uid", u.getId())
.param("touid", toUid)
.param("toname", toName)
.param("ct", toName + WordUtil.getString(R.string.live_kicked));
.param("ct", toName +WordUtil.getString(R.string.live_kicked));
msg.create();
V2TIMManager.getInstance().sendGroupTextMessage(msg.mResult.toString(), "g" + mLiveUid, V2TIMMessage.V2TIM_PRIORITY_NORMAL, new V2TIMSendCallback<V2TIMMessage>() {
@Override
@ -364,7 +364,7 @@ public class SocketChatUtil {
.param("uid", u.getId())
.param("touid", toUid)
.param("toname", toName)
.param("ct", toName + WordUtil.getString(type == 0 ? R.string.live_shut : R.string.live_shut_2));
.param("ct", toName +WordUtil.getString(type == 0 ? R.string.live_shut : R.string.live_shut_2));
msg.create();
V2TIMManager.getInstance().sendGroupTextMessage(msg.mResult.toString(), "g" + mLiveUid, V2TIMMessage.V2TIM_PRIORITY_NORMAL, new V2TIMSendCallback<V2TIMMessage>() {
@Override
@ -396,7 +396,7 @@ public class SocketChatUtil {
if (u == null) {
return;
}
String s = action == 1 ? WordUtil.getString(R.string.live_set_admin) : WordUtil.getString(R.string.live_set_admin_cancel);
String s = action == 1 ?WordUtil.getString(R.string.live_set_admin) :WordUtil.getString(R.string.live_set_admin_cancel);
final SocketSendBean msg = new SocketSendBean()
.param("_method_", Constants.SOCKET_SET_ADMIN)
.param("action", action)
@ -644,7 +644,7 @@ public class SocketChatUtil {
.param("msgtype", 0)
.param("uid", u.getId())
.param("uname", u.getUserNiceName())
.param("ct", WordUtil.getString(R.string.red_pack_22)
.param("ct",WordUtil.getString(R.string.red_pack_22)
);
msg.create();
V2TIMManager.getInstance().sendGroupTextMessage(msg.mResult.toString(), "g" + mLiveUid, V2TIMMessage.V2TIM_PRIORITY_NORMAL, new V2TIMSendCallback<V2TIMMessage>() {

View File

@ -258,7 +258,7 @@ public class SocketClient {
LiveChatBean liveChatBean = new LiveChatBean();
liveChatBean.setType(LiveChatBean.RED_PACK);
liveChatBean.setId(uid);
String name = uid.equals(mLiveUid) ? WordUtil.getString(R.string.live_anchor) : map.getString("uname");
String name = uid.equals(mLiveUid) ?WordUtil.getString(R.string.live_anchor) : map.getString("uname");
liveChatBean.setContent(name + map.getString("ct"));
mListener.onRedPack(liveChatBean);
break;
@ -545,9 +545,9 @@ public class SocketClient {
//聊天列表显示 玩家名 1 礼物名
if (CommonAppContext.lang.equals("chinese")) {
chatBean.setContent(WordUtil.getString(R.string.live_send_gift_1) + receiveGiftBean.getGiftCount() + WordUtil.getString(R.string.live_send_gift_2) + receiveGiftBean.getGiftName());
chatBean.setContent(WordUtil.getString(R.string.live_send_gift_1) + receiveGiftBean.getGiftCount() +WordUtil.getString(R.string.live_send_gift_2) + receiveGiftBean.getGiftName());
} else {
chatBean.setContent(WordUtil.getString(R.string.live_send_gift_1) + " " + +receiveGiftBean.getGiftCount() + " " + WordUtil.getString(R.string.live_send_gift_2) + receiveGiftBean.getGiftnameen());
chatBean.setContent(WordUtil.getString(R.string.live_send_gift_1) + " " + +receiveGiftBean.getGiftCount() + " " +WordUtil.getString(R.string.live_send_gift_2) + receiveGiftBean.getGiftnameen());
}
@ -612,9 +612,9 @@ public class SocketClient {
chatBean.setGuardType(map.getInteger("guard_type"));
}
if (CommonAppContext.lang.equals("chinese")) {
chatBean.setContent(WordUtil.getString(R.string.live_send_gift_1) + receiveGiftBean.getGiftCount() + WordUtil.getString(R.string.live_send_gift_2) + receiveGiftBean.getGiftName());
chatBean.setContent(WordUtil.getString(R.string.live_send_gift_1) + receiveGiftBean.getGiftCount() +WordUtil.getString(R.string.live_send_gift_2) + receiveGiftBean.getGiftName());
} else {
chatBean.setContent(WordUtil.getString(R.string.live_send_gift_1) + " " + +receiveGiftBean.getGiftCount() + " " + WordUtil.getString(R.string.live_send_gift_2) + receiveGiftBean.getGiftnameen());
chatBean.setContent(WordUtil.getString(R.string.live_send_gift_1) + " " + +receiveGiftBean.getGiftCount() + " " +WordUtil.getString(R.string.live_send_gift_2) + receiveGiftBean.getGiftnameen());
}
//增加粉丝徽章信息

View File

@ -165,7 +165,7 @@ public class SocketRyChatUtil {
.param("medal_name", u.getMedalName())
.param("medal_level", u.getMedalLevel())
.param("good_num", u.getGoodnum())
.param("ct", WordUtil.getString(R.string.live_lighted));
.param("ct",WordUtil.getString(R.string.live_lighted));
msg.create();
String targetId = "g" + mLiveUid;
Conversation.ConversationType conversationType = Conversation.ConversationType.CHATROOM;
@ -356,7 +356,7 @@ public class SocketRyChatUtil {
.param("uid", u.getId())
.param("touid", toUid)
.param("toname", toName)
.param("ct", toName + WordUtil.getString(R.string.live_kicked));
.param("ct", toName +WordUtil.getString(R.string.live_kicked));
msg.create();
String targetId = "g" + mLiveUid;
Conversation.ConversationType conversationType = Conversation.ConversationType.CHATROOM;
@ -403,7 +403,7 @@ public class SocketRyChatUtil {
.param("uid", u.getId())
.param("touid", toUid)
.param("toname", toName)
.param("ct", toName + WordUtil.getString(type == 0 ? R.string.live_shut : R.string.live_shut_2));
.param("ct", toName +WordUtil.getString(type == 0 ? R.string.live_shut : R.string.live_shut_2));
msg.create();
String targetId = "g" + mLiveUid;
Conversation.ConversationType conversationType = Conversation.ConversationType.CHATROOM;
@ -440,7 +440,7 @@ public class SocketRyChatUtil {
if (u == null) {
return;
}
String s = action == 1 ? WordUtil.getString(R.string.live_set_admin) : WordUtil.getString(R.string.live_set_admin_cancel);
String s = action == 1 ?WordUtil.getString(R.string.live_set_admin) :WordUtil.getString(R.string.live_set_admin_cancel);
final SocketSendBean msg = new SocketSendBean()
.param("_method_", Constants.SOCKET_SET_ADMIN)
.param("action", action)
@ -710,7 +710,7 @@ public class SocketRyChatUtil {
.param("msgtype", 0)
.param("uid", u.getId())
.param("uname", u.getUserNiceName())
.param("ct", WordUtil.getString(R.string.red_pack_22)
.param("ct",WordUtil.getString(R.string.red_pack_22)
);
msg.create();
String targetId = "g" + mLiveUid;

View File

@ -428,7 +428,7 @@ public class SocketRyClient {
LiveChatBean liveChatBean = new LiveChatBean();
liveChatBean.setType(LiveChatBean.RED_PACK);
liveChatBean.setId(uid);
String name = uid.equals(mLiveUid) ? WordUtil.getString(R.string.live_anchor) : map.getString("uname");
String name = uid.equals(mLiveUid) ?WordUtil.getString(R.string.live_anchor) : map.getString("uname");
liveChatBean.setContent(name + map.getString("ct"));
mListener.onRedPack(liveChatBean);
break;
@ -864,9 +864,9 @@ public class SocketRyClient {
//聊天列表显示 玩家名 1 礼物名
if (CommonAppContext.lang.equals("chinese")) {
chatBean.setContent(WordUtil.getString(R.string.live_send_gift_1) + receiveGiftBean.getGiftCount() + WordUtil.getString(R.string.live_send_gift_2) + receiveGiftBean.getGiftName());
chatBean.setContent(WordUtil.getString(R.string.live_send_gift_1) + receiveGiftBean.getGiftCount() +WordUtil.getString(R.string.live_send_gift_2) + receiveGiftBean.getGiftName());
} else {
chatBean.setContent(WordUtil.getString(R.string.live_send_gift_1) + " " + +receiveGiftBean.getGiftCount() + " " + WordUtil.getString(R.string.live_send_gift_2) + receiveGiftBean.getGiftnameen());
chatBean.setContent(WordUtil.getString(R.string.live_send_gift_1) + " " + +receiveGiftBean.getGiftCount() + " " +WordUtil.getString(R.string.live_send_gift_2) + receiveGiftBean.getGiftnameen());
}
receiveGiftBean.setLiveChatBean(chatBean);
@ -927,9 +927,9 @@ public class SocketRyClient {
chatBean.setGuardType(map.getInteger("guard_type"));
}
if (CommonAppContext.lang.equals("chinese")) {
chatBean.setContent(WordUtil.getString(R.string.live_send_gift_1) + receiveGiftBean.getGiftCount() + WordUtil.getString(R.string.live_send_gift_2) + receiveGiftBean.getGiftName());
chatBean.setContent(WordUtil.getString(R.string.live_send_gift_1) + receiveGiftBean.getGiftCount() +WordUtil.getString(R.string.live_send_gift_2) + receiveGiftBean.getGiftName());
} else {
chatBean.setContent(WordUtil.getString(R.string.live_send_gift_1) + " " + +receiveGiftBean.getGiftCount() + " " + WordUtil.getString(R.string.live_send_gift_2) + receiveGiftBean.getGiftnameen());
chatBean.setContent(WordUtil.getString(R.string.live_send_gift_1) + " " + +receiveGiftBean.getGiftCount() + " " +WordUtil.getString(R.string.live_send_gift_2) + receiveGiftBean.getGiftnameen());
}
mListener.onSendGift(receiveGiftBean);
@ -967,9 +967,9 @@ public class SocketRyClient {
chatBean.setGuardType(map.getInteger("guard_type"));
}
if (CommonAppContext.lang.equals("chinese")) {
chatBean.setContent(WordUtil.getString(R.string.live_send_gift_1) + receiveGiftBean.getGiftCount() + WordUtil.getString(R.string.live_send_gift_2) + receiveGiftBean.getGiftName());
chatBean.setContent(WordUtil.getString(R.string.live_send_gift_1) + receiveGiftBean.getGiftCount() +WordUtil.getString(R.string.live_send_gift_2) + receiveGiftBean.getGiftName());
} else {
chatBean.setContent(WordUtil.getString(R.string.live_send_gift_1) + " " + +receiveGiftBean.getGiftCount() + " " + WordUtil.getString(R.string.live_send_gift_2) + receiveGiftBean.getGiftnameen());
chatBean.setContent(WordUtil.getString(R.string.live_send_gift_1) + " " + +receiveGiftBean.getGiftCount() + " " +WordUtil.getString(R.string.live_send_gift_2) + receiveGiftBean.getGiftnameen());
}
//增加粉丝徽章信息

View File

@ -147,7 +147,7 @@ public class LiveTextRender {
* 幸运天使
*/
public void luckyAngel(Context mContext, TextView mTextView, MsgModel msgModel) {
String msg = mContext.getString(R.string.lucky_angel);
String msg = WordUtil.getString(R.string.lucky_angel);
msg = String.format(msg, msgModel.getUserName(), msgModel.getGiftName());
int unameIndexOf = msg.indexOf(msgModel.getUserName());
int giftIndexOf = msg.indexOf(msgModel.getGiftName());
@ -164,7 +164,7 @@ public class LiveTextRender {
* 幸运100%活动
*/
public void lucky100(Context mContext, TextView mTextView, MsgModel msgModel) {
String msg = mContext.getString(R.string.lucky_100);
String msg = WordUtil.getString(R.string.lucky_100);
msg = String.format(msg, msgModel.getUserName(), msgModel.getGiftName());
int unameIndexOf = msg.indexOf(msgModel.getUserName());
int giftIndexOf = msg.indexOf(msgModel.getGiftName());
@ -774,7 +774,7 @@ public class LiveTextRender {
public SpannableStringBuilder renderGiftInfo2(String giftName) {
SpannableStringBuilder builder = new SpannableStringBuilder();
String s1 = WordUtil.getString(R.string.live_send_gift_1);
String s1 =WordUtil.getString(R.string.live_send_gift_1);
String content = s1 + " " + giftName;
int index1 = s1.length();
builder.append(content);
@ -784,8 +784,8 @@ public class LiveTextRender {
public SpannableStringBuilder renderGiftInfo(int giftCount, String giftName) {
SpannableStringBuilder builder = new SpannableStringBuilder();
String s1 = WordUtil.getString(R.string.live_send_gift_1);
String s2 = WordUtil.getString(R.string.live_send_gift_2) + giftName;
String s1 =WordUtil.getString(R.string.live_send_gift_1);
String s2 =WordUtil.getString(R.string.live_send_gift_2) + giftName;
String content = s1 + giftCount + s2;
int index1 = s1.length();
int index2 = index1 + String.valueOf(giftCount).length();
@ -823,7 +823,7 @@ public class LiveTextRender {
}
SpannableStringBuilder builder = new SpannableStringBuilder();
//有时在想海外项目的时候这个""怎么翻译而且英语中也没有""这个单位啊
String wan = " " + WordUtil.getString(R.string.num_wan);
String wan = " " +WordUtil.getString(R.string.num_wan);
String s = StringUtil.toWan2(num) + wan;
builder.append(s);
int index2 = s.length();

View File

@ -73,7 +73,7 @@ public class LiveAdminListViewHolder extends AbsLivePageViewHolder implements On
}
private void showTip() {
mTextView.setText(WordUtil.getString(R.string.live_admin_count) + "(" + mLiveAdminListAdapter.getItemCount() + "/" + mTotalCount + ")");
mTextView.setText(mContext.getString(R.string.live_admin_count) + "(" + mLiveAdminListAdapter.getItemCount() + "/" + mTotalCount + ")");
}

View File

@ -14,11 +14,14 @@ import android.widget.ProgressBar;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.HtmlConfig;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.live.R;
import com.yunbao.live.activity.LiveAudienceActivity;
import com.yunbao.live.activity.LiveContributeActivity;
import com.yunbao.common.utils.L;
import java.util.Locale;
/**
* Created by cxf on 2018/10/15.
* 直播间粉丝排行榜
@ -79,7 +82,7 @@ public class LiveContributeViewHolder extends AbsLivePageViewHolder implements V
public void loadData() {
if (!mLoad) {
mLoad = true;
mWebView.loadUrl(HtmlConfig.LIVE_LIST + mLiveUid);
mWebView.loadUrl(HtmlConfig.LIVE_LIST + mLiveUid + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
} else {
mWebView.reload();
}

View File

@ -48,7 +48,7 @@ public class LiveGiftLuckTopViewHolder extends AbsViewHolder {
@Override
public void init() {
mQueue = new ConcurrentLinkedQueue<>();
mTipString = WordUtil.getString(R.string.live_gift_luck_tip);
mTipString =mContext.getString(R.string.live_gift_luck_tip);
mRoot = findViewById(R.id.root);
mGiftTip = (TextView) findViewById(R.id.luck_gift_tip);
mParentWidth = mParentView.getWidth();

View File

@ -84,8 +84,8 @@ public class LiveLinkMicPkViewHolder extends AbsViewHolder {
public void init() {
mHalfScreenWidth = ScreenDimenUtil.getInstance().getScreenWdith() / 2;
mLeftString = WordUtil.getString(R.string.live_link_mic_pk_1);
mRightString = WordUtil.getString(R.string.live_link_mic_pk_2);
mLeftString =mContext.getString(R.string.live_link_mic_pk_1);
mRightString =mContext.getString(R.string.live_link_mic_pk_2);
mFrameImageView = (FrameImageView) findViewById(R.id.frame_img);
mFrameImageView.setImageList(LiveIconUtil.getLinkMicPkAnim());//PK开始动画
frame_img_pk = (ImageView) findViewById(R.id.frame_img_pk);

View File

@ -185,7 +185,7 @@ public class LiveLinkMicPlayTxViewHolder extends AbsLiveLinkMicPlayViewHolder im
break;
case TXLiveConstants.PLAY_ERR_NET_DISCONNECT://播放失败
case TXLiveConstants.PLAY_ERR_FILE_NOT_FOUND:
ToastUtil.show(WordUtil.getString(R.string.live_play_error));
ToastUtil.show(mContext.getString(R.string.live_play_error));
break;
}
}

View File

@ -13,11 +13,14 @@ import android.widget.ProgressBar;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.HtmlConfig;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.utils.L;
import com.yunbao.live.R;
import com.yunbao.live.activity.LiveAudienceActivity;
import com.yunbao.live.activity.LiveContributeActivity;
import java.util.Locale;
/**
* Created by cxf on 2018/10/15.
* 直播间粉丝排行榜
@ -78,7 +81,7 @@ public class LiveMedalRankViewHolder extends AbsLivePageViewHolder implements Vi
public void loadData() {
if (!mLoad) {
mLoad = true;
mWebView.loadUrl(HtmlConfig.LIVE_FANS_MEDAL_RANKING + mLiveUid);
mWebView.loadUrl(HtmlConfig.LIVE_FANS_MEDAL_RANKING + mLiveUid + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
} else {
mWebView.reload();
}

View File

@ -182,7 +182,7 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
}
});
if (mAvatarFile == null) {
mCoverText.setText(WordUtil.getString(R.string.live_cover_2));
mCoverText.setText(mContext.getString(R.string.live_cover_2));
mCoverText.setBackground(ContextCompat.getDrawable(mContext, R.drawable.bg_live_cover));
}
mAvatarFile = file;
@ -662,9 +662,9 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
private void switchLocation() {
if (mOpenLocation) {
new DialogUitl.Builder(mContext)
.setContent(WordUtil.getString(R.string.live_location_close_3))
.setContent(mContext.getString(R.string.live_location_close_3))
.setCancelable(true)
.setConfrimString(WordUtil.getString(R.string.live_location_close_2))
.setConfrimString(mContext.getString(R.string.live_location_close_2))
.setClickCallback(new DialogUitl.SimpleCallback() {
@Override
@ -762,7 +762,7 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
/**
* 选择直播类型
*/
private LiveRoomTypeBean liveRoomTypeBean = new LiveRoomTypeBean(0, WordUtil.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,7 +809,7 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
* 密码房间
*/
private void onLiveTypePwd(final LiveRoomTypeBean bean) {
DialogUitl.showSimpleInputDialog(mContext, WordUtil.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)) {
@ -831,7 +831,7 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
* 付费房间
*/
private void onLiveTypePay(final LiveRoomTypeBean bean) {
DialogUitl.showSimpleInputDialog(mContext, WordUtil.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)) {

View File

@ -690,7 +690,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
@Subscribe(threadMode = ThreadMode.MAIN)
public void onUpdata(String str) {
if ("UsertoRY".equals(str)) {
DialogUitl.showSimpleDialog(mContext, WordUtil.getString(R.string.mic_tag), new DialogUitl.SimpleCallback() {
DialogUitl.showSimpleDialog(mContext,mContext.getString(R.string.mic_tag), new DialogUitl.SimpleCallback() {
@Override
public void onConfirmClick(Dialog dialog, String content) {
UsertoRY();

View File

@ -159,7 +159,7 @@ public class LivePlayTxViewHolder extends LiveRoomPlayViewHolder implements ITXL
// break;
// case TXLiveConstants.PLAY_ERR_NET_DISCONNECT://播放失败
// case TXLiveConstants.PLAY_ERR_FILE_NOT_FOUND:
// ToastUtil.show(WordUtil.getString(R.string.live_play_error));
// ToastUtil.show(mContext.getString(R.string.live_play_error));
// break;
// case TXLiveConstants.PLAY_EVT_PLAY_PROGRESS:
// int progress = bundle.getInt("EVT_PLAY_PROGRESS_MS");

View File

@ -153,7 +153,7 @@ public class LivePlayTxViewHolder_backup extends LiveRoomPlayViewHolder implemen
break;
case TXLiveConstants.PLAY_ERR_NET_DISCONNECT://播放失败
case TXLiveConstants.PLAY_ERR_FILE_NOT_FOUND:
ToastUtil.show(WordUtil.getString(R.string.live_play_error));
ToastUtil.show(mContext.getString(R.string.live_play_error));
break;
case TXLiveConstants.PLAY_EVT_PLAY_PROGRESS:
int progress = bundle.getInt("EVT_PLAY_PROGRESS_MS");

View File

@ -209,7 +209,7 @@ public class LivePushTxViewHolder360Beauty extends AbsLivePushViewHolder impleme
File targetDir = new File(CommonAppConfig.VIDEO_TIE_ZHI_PATH+CommonAppConfig.TIEZHI_360_NAME);
try {
}catch (Exception e){
// ToastUtil.show(WordUtil.getString(com.yunbao.beauty.R.string.tiezhi_unzip_failed));
// ToastUtil.show(mContext.getString(com.yunbao.beauty.R.string.tiezhi_unzip_failed));
}
}
}).start();

View File

@ -131,7 +131,7 @@ public class LiveReadyRyViewHolder extends AbsViewHolder implements View.OnClick
if (file != null) {
ImgLoader.display(mContext, file, mAvatar);
if (mAvatarFile == null) {
mCoverText.setText(WordUtil.getString(R.string.live_cover_2));
mCoverText.setText(mContext.getString(R.string.live_cover_2));
mCoverText.setBackground(ContextCompat.getDrawable(mContext, R.drawable.bg_live_cover));
}
mAvatarFile = file;
@ -229,9 +229,9 @@ public class LiveReadyRyViewHolder extends AbsViewHolder implements View.OnClick
private void switchLocation() {
if (mOpenLocation) {
new DialogUitl.Builder(mContext)
.setContent(WordUtil.getString(R.string.live_location_close_3))
.setContent(mContext.getString(R.string.live_location_close_3))
.setCancelable(true)
.setConfrimString(WordUtil.getString(R.string.live_location_close_2))
.setConfrimString(mContext.getString(R.string.live_location_close_2))
.setClickCallback(new DialogUitl.SimpleCallback() {
@Override
@ -252,7 +252,7 @@ public class LiveReadyRyViewHolder extends AbsViewHolder implements View.OnClick
mLocationImg.setImageResource(mOpenLocation ? R.mipmap.address_choice : R.mipmap.icon_live_ready_location_0);
}
if (mCity != null) {
mCity.setText(mOpenLocation ? CommonAppConfig.getInstance().getCity() : WordUtil.getString(R.string.live_location_close));
mCity.setText(mOpenLocation ? CommonAppConfig.getInstance().getCity() :mContext.getString(R.string.live_location_close));
}
}
@ -341,7 +341,7 @@ public class LiveReadyRyViewHolder extends AbsViewHolder implements View.OnClick
* 密码房间
*/
private void onLiveTypePwd(final LiveRoomTypeBean bean) {
DialogUitl.showSimpleInputDialog(mContext, WordUtil.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)) {
@ -363,7 +363,7 @@ public class LiveReadyRyViewHolder extends AbsViewHolder implements View.OnClick
* 付费房间
*/
private void onLiveTypePay(final LiveRoomTypeBean bean) {
DialogUitl.showSimpleInputDialog(mContext, WordUtil.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)) {

View File

@ -144,7 +144,7 @@ public class LiveReadyViewHolder extends AbsViewHolder implements View.OnClickLi
if (file != null) {
ImgLoader.display(mContext, file, mAvatar);
if (mAvatarFile == null) {
mCoverText.setText(WordUtil.getString(R.string.live_cover_2));
mCoverText.setText(mContext.getString(R.string.live_cover_2));
mCoverText.setBackground(ContextCompat.getDrawable(mContext, R.drawable.bg_live_cover));
}
mAvatarFile = file;
@ -253,9 +253,9 @@ public class LiveReadyViewHolder extends AbsViewHolder implements View.OnClickLi
private void switchLocation() {
if (mOpenLocation) {
new DialogUitl.Builder(mContext)
.setContent(WordUtil.getString(R.string.live_location_close_3))
.setContent(mContext.getString(R.string.live_location_close_3))
.setCancelable(true)
.setConfrimString(WordUtil.getString(R.string.live_location_close_2))
.setConfrimString(mContext.getString(R.string.live_location_close_2))
.setClickCallback(new DialogUitl.SimpleCallback() {
@Override
@ -276,7 +276,7 @@ public class LiveReadyViewHolder extends AbsViewHolder implements View.OnClickLi
mLocationImg.setImageResource(mOpenLocation ? R.mipmap.address_choice : R.mipmap.icon_live_ready_location_0);
}
if (mCity != null) {
mCity.setText(mOpenLocation ? CommonAppConfig.getInstance().getCity() : WordUtil.getString(R.string.live_location_close));
mCity.setText(mOpenLocation ? CommonAppConfig.getInstance().getCity() :mContext.getString(R.string.live_location_close));
}
}
@ -365,7 +365,7 @@ public class LiveReadyViewHolder extends AbsViewHolder implements View.OnClickLi
* 密码房间
*/
private void onLiveTypePwd(final LiveRoomTypeBean bean) {
DialogUitl.showSimpleInputDialog(mContext, WordUtil.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)) {
@ -387,7 +387,7 @@ public class LiveReadyViewHolder extends AbsViewHolder implements View.OnClickLi
* 付费房间
*/
private void onLiveTypePay(final LiveRoomTypeBean bean) {
DialogUitl.showSimpleInputDialog(mContext, WordUtil.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)) {

Some files were not shown because too many files have changed in this diff Show More