From 098ef7aa36c8492d35ad5d8f9ba7da87cca9453b Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Tue, 18 Apr 2023 10:30:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=9A=E8=AF=AD=E8=A8=80=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yunbao/share/ui/InvitePopDialog.java | 4 +- .../com/yunbao/share/ui/SharePopDialog.java | 6 +- .../phonelive/activity/LauncherActivity.java | 2 +- .../yunbao/beauty/adapter/TieZhiAdapter.java | 4 +- .../com/yunbao/common/CommonAppConfig.java | 2 +- .../yunbao/common/activity/ErrorActivity.java | 2 +- .../common/activity/WebViewActivity.java | 2 +- .../common/adapter/ChatChargeCoinAdapter.java | 2 +- .../com/yunbao/common/bean/LiveTaskModel.java | 2 +- .../java/com/yunbao/common/bean/UserBean.java | 2 +- .../dialog/LiveChargeDialogFragment.java | 4 +- .../dialog/MessageLongClickPopuwindow.java | 5 +- .../com/yunbao/common/utils/DialogUitl.java | 2 +- .../com/yunbao/common/utils/VersionUtil.java | 24 ++++---- .../activity/EditNameRemarksActivity.java | 2 +- .../yunbao/live/activity/LiveActivity.java | 6 +- .../live/activity/LiveAnchorActivity.java | 16 ++--- .../live/activity/LiveAudienceActivity.java | 2 +- .../live/activity/LiveBlackActivity.java | 2 +- .../activity/LiveChooseClassActivity.java | 2 +- .../live/activity/LiveGuardListActivity.java | 2 +- .../live/activity/LiveRecordActivity.java | 2 +- .../live/activity/LiveReportActivity.java | 2 +- .../live/activity/LiveRyAnchorActivity.java | 20 +++---- .../live/activity/LiveShutUpActivity.java | 2 +- .../live/activity/LiveTRTCAnchorActivity.java | 2 +- .../MedalQuestionWebViewActivity.java | 2 +- .../live/activity/RoomManageActivity.java | 2 +- .../activity/RoomManageDetailActivity.java | 2 +- .../live/activity/WebViewActivityMedal.java | 2 +- .../live/activity/ZhuangBanActivity.java | 2 +- .../adapter/AnchorUserMicInfoAdapter.java | 8 +-- .../com/yunbao/live/adapter/GuardAdapter.java | 2 +- .../live/adapter/LiveAdminRoomAdapter.java | 2 +- .../adapter/LiveAnchorEditCallMeAdapter.java | 8 +-- .../yunbao/live/adapter/LiveGiftAdapter.java | 2 +- .../adapter/LiveNewGuardBuyItemsAdapter.java | 2 +- .../yunbao/live/adapter/LivePkAdapter.java | 2 +- .../live/adapter/LiveTaskRecyclerAdapter.java | 4 +- .../adapter/LiveUserAnchorMailBoxAdapter.java | 12 ++-- .../yunbao/live/adapter/RedPackAdapter.java | 4 +- .../com/yunbao/live/bean/GuardBuyBean.java | 10 ++-- .../live/dialog/GiftPrizePoolFragment.java | 2 +- .../live/dialog/LiveBeautyDialogFragment.java | 60 +++++++++---------- .../live/dialog/LiveDataInfoDialog.java | 32 +++++----- .../dialog/LiveFansMedalDialogFragment.java | 8 +-- .../dialog/LiveGuardBuyDialogFragment.java | 10 ++-- .../live/dialog/LiveGuardDialogFragment.java | 10 ++-- .../live/dialog/LiveInputDialogFragment.java | 6 +- .../dialog/LiveNewGuardBuyDialogFragment.java | 21 +++---- .../LiveNewGuardListDialogFragment.java | 8 +-- .../dialog/LiveNewRoomTypeDialogFragment.java | 2 +- .../dialog/LiveOldUserDialogFragment.java | 8 +-- .../dialog/LiveRedPackListDialogFragment.java | 2 +- .../LiveRedPackResultDialogFragment.java | 6 +- .../dialog/LiveRedPackRobDialogFragment.java | 2 +- .../dialog/LiveRedPackSendDialogFragment.java | 2 +- .../yunbao/live/dialog/LiveTaskDialog.java | 8 +-- ...LiveUserAnchorMailBoxWebInfoPopDialog.java | 2 +- .../live/dialog/LiveUserDialogFragment.java | 12 ++-- .../live/dialog/RandomPkDialogFragment.java | 8 +-- .../live/presenter/LiveGiftAnimPresenter.java | 6 +- .../presenter/LiveLinkMicAnchorPresenter.java | 6 +- .../presenter/LiveLinkMicPkPresenter.java | 2 +- .../live/presenter/LiveLinkMicPresenter.java | 8 +-- .../presenter/LiveRoomCheckLivePresenter.java | 12 ++-- .../presenter/LiveRyLinkMicPkPresenter.java | 4 +- .../presenter/UserHomeSharePresenter.java | 4 +- .../yunbao/live/socket/SocketChatUtil.java | 10 ++-- .../com/yunbao/live/socket/SocketClient.java | 10 ++-- .../yunbao/live/socket/SocketRyChatUtil.java | 10 ++-- .../yunbao/live/socket/SocketRyClient.java | 14 ++--- .../com/yunbao/live/utils/LiveTextRender.java | 12 ++-- .../live/views/LiveAdminListViewHolder.java | 2 +- .../live/views/LiveGiftLuckTopViewHolder.java | 2 +- .../live/views/LiveLinkMicPkViewHolder.java | 4 +- .../views/LiveLinkMicPlayTxViewHolder.java | 2 +- .../live/views/LiveNewReadyRyViewHolder.java | 12 ++-- .../live/views/LivePlayRyViewHolder.java | 2 +- .../live/views/LivePlayTxViewHolder.java | 2 +- .../views/LivePlayTxViewHolder_backup.java | 2 +- .../views/LivePushTxViewHolder360Beauty.java | 2 +- .../live/views/LiveReadyRyViewHolder.java | 12 ++-- .../live/views/LiveReadyViewHolder.java | 12 ++-- .../yunbao/live/views/LiveRoomViewHolder.java | 14 ++--- .../live/views/LuckLiveGiftViewHolder.java | 2 +- .../live/views/PortraitLiveManager.java | 4 +- .../main/activity/BindUserActivity.java | 22 +++---- .../yunbao/main/activity/CashActivity.java | 2 +- .../main/activity/ChatRoomActivity.java | 2 +- .../main/activity/EditNameActivity.java | 2 +- .../main/activity/EditProfileActivity.java | 2 +- .../yunbao/main/activity/EditSexActivity.java | 2 +- .../main/activity/EditSignActivity.java | 2 +- .../yunbao/main/activity/EntryActivity.java | 2 +- .../yunbao/main/activity/FansActivity.java | 4 +- .../yunbao/main/activity/FindPwdActivity.java | 22 +++---- .../yunbao/main/activity/FollowActivity.java | 6 +- .../yunbao/main/activity/LoginActivity.java | 4 +- .../yunbao/main/activity/MainActivity.java | 6 +- .../main/activity/MainListActivity.java | 4 +- .../main/activity/ModifyPwdActivity.java | 10 ++-- .../yunbao/main/activity/MyCoinActivity.java | 6 +- .../main/activity/MyImpressActivity.java | 4 +- .../main/activity/MyProfitActivity.java | 8 +-- .../yunbao/main/activity/MyVideoActivity.java | 2 +- .../main/activity/MyWalletActivity.java | 4 +- .../main/activity/MyWebViewActivity.java | 2 +- .../main/activity/MyWebViewActivity2.java | 2 +- .../main/activity/RegisterActivity.java | 16 ++--- .../yunbao/main/activity/RewardActivity.java | 2 +- .../yunbao/main/activity/SettingActivity.java | 8 +-- .../main/activity/ThreeDistributActivity.java | 2 +- .../main/activity/WeekWebViewActivity.java | 2 +- .../main/activity/ZhuangBanActivity.java | 2 +- .../com/yunbao/main/adapter/CoinAdapter.java | 2 +- .../yunbao/main/adapter/MainListAdapter.java | 4 +- .../yunbao/main/adapter/SearchAdapter.java | 4 +- .../yunbao/main/dialog/OneLoginDialog.java | 6 +- .../views/AbsMainListChildViewHolder.java | 2 +- .../yunbao/main/views/BonusViewHolder.java | 2 +- .../views/MainHomeCommunityViewHolder.java | 7 +-- .../main/views/MainHomeCsdViewHolder.java | 3 +- .../main/views/MainHomeShopViewHolder.java | 3 +- .../yunbao/main/views/MainListViewHolder.java | 4 +- .../yunbao/main/views/MainNearViewHolder.java | 2 +- .../main/views/UserHomeDetailViewHolder.java | 6 +- .../yunbao/main/views/UserHomeViewHolder.java | 12 ++-- .../main/views/UserHomeViewHolder2.java | 18 +++--- .../video/activity/AbsVideoPlayActivity.java | 2 +- .../video/activity/VideoChooseActivity.java | 2 +- .../video/activity/VideoEditActivity.java | 10 ++-- .../video/activity/VideoPublishActivity.java | 8 +-- .../video/activity/VideoReportActivity.java | 2 +- .../yunbao/video/bean/VideoCommentBean.java | 2 +- .../dialog/VideoInputDialogFragment.java | 2 +- .../video/views/VideoCommentViewHolder.java | 2 +- 137 files changed, 413 insertions(+), 414 deletions(-) diff --git a/Share/src/main/java/com/yunbao/share/ui/InvitePopDialog.java b/Share/src/main/java/com/yunbao/share/ui/InvitePopDialog.java index c413749f2..12930aaec 100644 --- a/Share/src/main/java/com/yunbao/share/ui/InvitePopDialog.java +++ b/Share/src/main/java/com/yunbao/share/ui/InvitePopDialog.java @@ -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) { diff --git a/Share/src/main/java/com/yunbao/share/ui/SharePopDialog.java b/Share/src/main/java/com/yunbao/share/ui/SharePopDialog.java index 8485f70bf..329fe807b 100644 --- a/Share/src/main/java/com/yunbao/share/ui/SharePopDialog.java +++ b/Share/src/main/java/com/yunbao/share/ui/SharePopDialog.java @@ -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)); } } diff --git a/app/src/main/java/com/shayu/phonelive/activity/LauncherActivity.java b/app/src/main/java/com/shayu/phonelive/activity/LauncherActivity.java index 371732ef7..bbcf63b50 100644 --- a/app/src/main/java/com/shayu/phonelive/activity/LauncherActivity.java +++ b/app/src/main/java/com/shayu/phonelive/activity/LauncherActivity.java @@ -511,7 +511,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"); diff --git a/beauty/src/main/java/com/yunbao/beauty/adapter/TieZhiAdapter.java b/beauty/src/main/java/com/yunbao/beauty/adapter/TieZhiAdapter.java index e9420fe72..573b5aa43 100644 --- a/beauty/src/main/java/com/yunbao/beauty/adapter/TieZhiAdapter.java +++ b/beauty/src/main/java/com/yunbao/beauty/adapter/TieZhiAdapter.java @@ -86,7 +86,7 @@ public class TieZhiAdapter extends RecyclerView.Adapter { 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 { @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); diff --git a/common/src/main/java/com/yunbao/common/CommonAppConfig.java b/common/src/main/java/com/yunbao/common/CommonAppConfig.java index f514fc808..8633489c6 100644 --- a/common/src/main/java/com/yunbao/common/CommonAppConfig.java +++ b/common/src/main/java/com/yunbao/common/CommonAppConfig.java @@ -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; } diff --git a/common/src/main/java/com/yunbao/common/activity/ErrorActivity.java b/common/src/main/java/com/yunbao/common/activity/ErrorActivity.java index 6cc2a39e8..80c834c67 100644 --- a/common/src/main/java/com/yunbao/common/activity/ErrorActivity.java +++ b/common/src/main/java/com/yunbao/common/activity/ErrorActivity.java @@ -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)); } } diff --git a/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java b/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java index 36bd403cc..17c8a6c13 100644 --- a/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java +++ b/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java @@ -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) diff --git a/common/src/main/java/com/yunbao/common/adapter/ChatChargeCoinAdapter.java b/common/src/main/java/com/yunbao/common/adapter/ChatChargeCoinAdapter.java index 0534be3d8..e981d0bba 100644 --- a/common/src/main/java/com/yunbao/common/adapter/ChatChargeCoinAdapter.java +++ b/common/src/main/java/com/yunbao/common/adapter/ChatChargeCoinAdapter.java @@ -41,7 +41,7 @@ public class ChatChargeCoinAdapter extends RecyclerView.Adapter() { @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); } diff --git a/common/src/main/java/com/yunbao/common/utils/DialogUitl.java b/common/src/main/java/com/yunbao/common/utils/DialogUitl.java index 1ad1b3e7e..0e40c91ba 100644 --- a/common/src/main/java/com/yunbao/common/utils/DialogUitl.java +++ b/common/src/main/java/com/yunbao/common/utils/DialogUitl.java @@ -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); diff --git a/common/src/main/java/com/yunbao/common/utils/VersionUtil.java b/common/src/main/java/com/yunbao/common/utils/VersionUtil.java index 27c6ab2df..6527c7fc4 100644 --- a/common/src/main/java/com/yunbao/common/utils/VersionUtil.java +++ b/common/src/main/java/com/yunbao/common/utils/VersionUtil.java @@ -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() { diff --git a/live/src/main/java/com/yunbao/live/activity/EditNameRemarksActivity.java b/live/src/main/java/com/yunbao/live/activity/EditNameRemarksActivity.java index c860d6dd9..6fa9f1412 100644 --- a/live/src/main/java/com/yunbao/live/activity/EditNameRemarksActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/EditNameRemarksActivity.java @@ -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[]{ diff --git a/live/src/main/java/com/yunbao/live/activity/LiveActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveActivity.java index 793306502..f324bb145 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveActivity.java @@ -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)); } diff --git a/live/src/main/java/com/yunbao/live/activity/LiveAnchorActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveAnchorActivity.java index 788d257ce..f3d36ed6b 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveAnchorActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveAnchorActivity.java @@ -225,11 +225,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) @@ -552,7 +552,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 +661,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 +728,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 +739,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 +761,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 +1073,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) { diff --git a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java index 04f310dbd..8f40dd063 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java @@ -1228,7 +1228,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) { diff --git a/live/src/main/java/com/yunbao/live/activity/LiveBlackActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveBlackActivity.java index e057c0d5f..60c404aae 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveBlackActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveBlackActivity.java @@ -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; diff --git a/live/src/main/java/com/yunbao/live/activity/LiveChooseClassActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveChooseClassActivity.java index f8a4a47f8..8df3190ed 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveChooseClassActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveChooseClassActivity.java @@ -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)); diff --git a/live/src/main/java/com/yunbao/live/activity/LiveGuardListActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveGuardListActivity.java index 814b1bd30..1fcd45a44 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveGuardListActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveGuardListActivity.java @@ -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; diff --git a/live/src/main/java/com/yunbao/live/activity/LiveRecordActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveRecordActivity.java index ddd9fefee..65adde769 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveRecordActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveRecordActivity.java @@ -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; diff --git a/live/src/main/java/com/yunbao/live/activity/LiveReportActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveReportActivity.java index 0dd22801c..7264b176b 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveReportActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveReportActivity.java @@ -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); diff --git a/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java index 29e0454e3..3eb811a62 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java @@ -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 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) { diff --git a/live/src/main/java/com/yunbao/live/activity/LiveShutUpActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveShutUpActivity.java index 030d92c8b..846b9e443 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveShutUpActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveShutUpActivity.java @@ -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; diff --git a/live/src/main/java/com/yunbao/live/activity/LiveTRTCAnchorActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveTRTCAnchorActivity.java index 205fd0032..b4997a923 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveTRTCAnchorActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveTRTCAnchorActivity.java @@ -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)) { diff --git a/live/src/main/java/com/yunbao/live/activity/MedalQuestionWebViewActivity.java b/live/src/main/java/com/yunbao/live/activity/MedalQuestionWebViewActivity.java index d79d40ade..1db2d7681 100644 --- a/live/src/main/java/com/yunbao/live/activity/MedalQuestionWebViewActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/MedalQuestionWebViewActivity.java @@ -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) diff --git a/live/src/main/java/com/yunbao/live/activity/RoomManageActivity.java b/live/src/main/java/com/yunbao/live/activity/RoomManageActivity.java index d5bbd6d50..63aae5519 100644 --- a/live/src/main/java/com/yunbao/live/activity/RoomManageActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/RoomManageActivity.java @@ -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() { diff --git a/live/src/main/java/com/yunbao/live/activity/RoomManageDetailActivity.java b/live/src/main/java/com/yunbao/live/activity/RoomManageDetailActivity.java index afd201ba8..280c05f97 100644 --- a/live/src/main/java/com/yunbao/live/activity/RoomManageDetailActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/RoomManageDetailActivity.java @@ -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); } diff --git a/live/src/main/java/com/yunbao/live/activity/WebViewActivityMedal.java b/live/src/main/java/com/yunbao/live/activity/WebViewActivityMedal.java index e9e98e524..d2456827f 100644 --- a/live/src/main/java/com/yunbao/live/activity/WebViewActivityMedal.java +++ b/live/src/main/java/com/yunbao/live/activity/WebViewActivityMedal.java @@ -212,7 +212,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) diff --git a/live/src/main/java/com/yunbao/live/activity/ZhuangBanActivity.java b/live/src/main/java/com/yunbao/live/activity/ZhuangBanActivity.java index 29a15a830..e4511553d 100644 --- a/live/src/main/java/com/yunbao/live/activity/ZhuangBanActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/ZhuangBanActivity.java @@ -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) diff --git a/live/src/main/java/com/yunbao/live/adapter/AnchorUserMicInfoAdapter.java b/live/src/main/java/com/yunbao/live/adapter/AnchorUserMicInfoAdapter.java index f6a403849..c45181bbb 100644 --- a/live/src/main/java/com/yunbao/live/adapter/AnchorUserMicInfoAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/AnchorUserMicInfoAdapter.java @@ -125,14 +125,14 @@ public class AnchorUserMicInfoAdapter extends RefreshAdapter { 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 { @Override public void accept(ResponseModel 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(); diff --git a/live/src/main/java/com/yunbao/live/adapter/GuardAdapter.java b/live/src/main/java/com/yunbao/live/adapter/GuardAdapter.java index 119bb244c..378b172d1 100644 --- a/live/src/main/java/com/yunbao/live/adapter/GuardAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/GuardAdapter.java @@ -44,7 +44,7 @@ public class GuardAdapter extends RefreshAdapter { 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); diff --git a/live/src/main/java/com/yunbao/live/adapter/LiveAdminRoomAdapter.java b/live/src/main/java/com/yunbao/live/adapter/LiveAdminRoomAdapter.java index 483e50e4d..a3162ea43 100644 --- a/live/src/main/java/com/yunbao/live/adapter/LiveAdminRoomAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/LiveAdminRoomAdapter.java @@ -24,7 +24,7 @@ public class LiveAdminRoomAdapter extends RefreshAdapter { 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) { diff --git a/live/src/main/java/com/yunbao/live/adapter/LiveAnchorEditCallMeAdapter.java b/live/src/main/java/com/yunbao/live/adapter/LiveAnchorEditCallMeAdapter.java index 10795d7c0..c737e98a2 100644 --- a/live/src/main/java/com/yunbao/live/adapter/LiveAnchorEditCallMeAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/LiveAnchorEditCallMeAdapter.java @@ -177,7 +177,7 @@ public class LiveAnchorEditCallMeAdapter extends RecyclerView.Adapter { 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 { @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); diff --git a/live/src/main/java/com/yunbao/live/adapter/LiveNewGuardBuyItemsAdapter.java b/live/src/main/java/com/yunbao/live/adapter/LiveNewGuardBuyItemsAdapter.java index 4a5632e97..343febbb1 100644 --- a/live/src/main/java/com/yunbao/live/adapter/LiveNewGuardBuyItemsAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/LiveNewGuardBuyItemsAdapter.java @@ -114,7 +114,7 @@ public class LiveNewGuardBuyItemsAdapter extends RecyclerView.Adapter { } }; mLivePkInviteString = "PK"; - mLivePkInviteString2 = WordUtil.getString(R.string.live_pk_invite_2); + mLivePkInviteString2 =mContext.getString(R.string.live_pk_invite_2); } @NonNull diff --git a/live/src/main/java/com/yunbao/live/adapter/LiveTaskRecyclerAdapter.java b/live/src/main/java/com/yunbao/live/adapter/LiveTaskRecyclerAdapter.java index 86b1408b8..0548f68c9 100644 --- a/live/src/main/java/com/yunbao/live/adapter/LiveTaskRecyclerAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/LiveTaskRecyclerAdapter.java @@ -110,8 +110,8 @@ public class LiveTaskRecyclerAdapter extends RecyclerView.Adapter" + WordUtil.getString(R.string.live_task_item_hot) + "  " + task.getHot() + "")); - xp.setText(Html.fromHtml("" + WordUtil.getString(R.string.live_task_item_xp) + "  " + task.getExp() + "")); + hot.setText(Html.fromHtml("" +itemView.getContext().getString(R.string.live_task_item_hot) + "  " + task.getHot() + "")); + xp.setText(Html.fromHtml("" +itemView.getContext().getString(R.string.live_task_item_xp) + "  " + task.getExp() + "")); } } } diff --git a/live/src/main/java/com/yunbao/live/adapter/LiveUserAnchorMailBoxAdapter.java b/live/src/main/java/com/yunbao/live/adapter/LiveUserAnchorMailBoxAdapter.java index 825ae16bf..82aabb89c 100644 --- a/live/src/main/java/com/yunbao/live/adapter/LiveUserAnchorMailBoxAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/LiveUserAnchorMailBoxAdapter.java @@ -88,14 +88,14 @@ public class LiveUserAnchorMailBoxAdapter extends RecyclerView.Adapter { 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() { diff --git a/live/src/main/java/com/yunbao/live/adapter/RedPackAdapter.java b/live/src/main/java/com/yunbao/live/adapter/RedPackAdapter.java index 87bb3be00..2a6b09243 100644 --- a/live/src/main/java/com/yunbao/live/adapter/RedPackAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/RedPackAdapter.java @@ -44,8 +44,8 @@ public class RedPackAdapter extends RecyclerView.Adapter { 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) { diff --git a/live/src/main/java/com/yunbao/live/bean/GuardBuyBean.java b/live/src/main/java/com/yunbao/live/bean/GuardBuyBean.java index 1aa495bdb..f03573c50 100644 --- a/live/src/main/java/com/yunbao/live/bean/GuardBuyBean.java +++ b/live/src/main/java/com/yunbao/live/bean/GuardBuyBean.java @@ -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 ""; } diff --git a/live/src/main/java/com/yunbao/live/dialog/GiftPrizePoolFragment.java b/live/src/main/java/com/yunbao/live/dialog/GiftPrizePoolFragment.java index 96203007f..0602c6ab1 100644 --- a/live/src/main/java/com/yunbao/live/dialog/GiftPrizePoolFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/GiftPrizePoolFragment.java @@ -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) { diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveBeautyDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveBeautyDialogFragment.java index 1ed4c391a..6d4051766 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveBeautyDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveBeautyDialogFragment.java @@ -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); diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveDataInfoDialog.java b/live/src/main/java/com/yunbao/live/dialog/LiveDataInfoDialog.java index 9d4dad966..cb5caf834 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveDataInfoDialog.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveDataInfoDialog.java @@ -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() { @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); } diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveFansMedalDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveFansMedalDialogFragment.java index 8847fded8..6774e4843 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveFansMedalDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveFansMedalDialogFragment.java @@ -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)); // } // } // }; diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveGuardBuyDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveGuardBuyDialogFragment.java index ee759acc5..61266948f 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveGuardBuyDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveGuardBuyDialogFragment.java @@ -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 diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveGuardDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveGuardDialogFragment.java index d7303b322..7367f567d 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveGuardDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveGuardDialogFragment.java @@ -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); } } diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveInputDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveInputDialogFragment.java index ee23dd050..3df086e38 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveInputDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveInputDialogFragment.java @@ -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 { diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardBuyDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardBuyDialogFragment.java index 1d5fbd961..b84836937 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardBuyDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardBuyDialogFragment.java @@ -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 diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardListDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardListDialogFragment.java index cd2c35fae..1f96fd9e3 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardListDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardListDialogFragment.java @@ -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); } } diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveNewRoomTypeDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveNewRoomTypeDialogFragment.java index 946af6304..db5fe016a 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveNewRoomTypeDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveNewRoomTypeDialogFragment.java @@ -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); } diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveOldUserDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveOldUserDialogFragment.java index 2407a5453..888e88cd7 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveOldUserDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveOldUserDialogFragment.java @@ -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)); } } }; diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveRedPackListDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveRedPackListDialogFragment.java index 2b3c39536..8940050ea 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveRedPackListDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveRedPackListDialogFragment.java @@ -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); } diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveRedPackResultDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveRedPackResultDialogFragment.java index fdf446446..8a23d8820 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveRedPackResultDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveRedPackResultDialogFragment.java @@ -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) { diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveRedPackRobDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveRedPackRobDialogFragment.java index 8b8cf74c9..91599c4b1 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveRedPackRobDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveRedPackRobDialogFragment.java @@ -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)); } } diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveRedPackSendDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveRedPackSendDialogFragment.java index 56d6d0537..8f05ee19f 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveRedPackSendDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveRedPackSendDialogFragment.java @@ -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(); diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveTaskDialog.java b/live/src/main/java/com/yunbao/live/dialog/LiveTaskDialog.java index d09fba828..8f94745d8 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveTaskDialog.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveTaskDialog.java @@ -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); diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveUserAnchorMailBoxWebInfoPopDialog.java b/live/src/main/java/com/yunbao/live/dialog/LiveUserAnchorMailBoxWebInfoPopDialog.java index 4543e2f9b..778db921d 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveUserAnchorMailBoxWebInfoPopDialog.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveUserAnchorMailBoxWebInfoPopDialog.java @@ -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"); diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveUserDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveUserDialogFragment.java index 1f634108a..e91e38c26 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveUserDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveUserDialogFragment.java @@ -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)); } } }); diff --git a/live/src/main/java/com/yunbao/live/dialog/RandomPkDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/RandomPkDialogFragment.java index 021e83403..2059c2917 100644 --- a/live/src/main/java/com/yunbao/live/dialog/RandomPkDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/RandomPkDialogFragment.java @@ -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); } diff --git a/live/src/main/java/com/yunbao/live/presenter/LiveGiftAnimPresenter.java b/live/src/main/java/com/yunbao/live/presenter/LiveGiftAnimPresenter.java index fb2b2ea0c..4b31c8926 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveGiftAnimPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveGiftAnimPresenter.java @@ -933,7 +933,7 @@ public class LiveGiftAnimPresenter { } String text = mTempGifGiftBean.getUserNiceName() + " " - + WordUtil.getString(R.string.live_send_buy_zuoji_1) + +mContext.getString(R.string.live_send_buy_zuoji_1) + " " + (mTempGifGiftBean.getCarName()); Spanned spanned = Html.fromHtml(text, null, new HtmlTagHandler("myfont")); mGifGiftTipBuyZuoji.setText(spanned); @@ -974,7 +974,7 @@ public class LiveGiftAnimPresenter { } String text = mTempGifGiftBean.getUserNiceName() + " " - + WordUtil.getString(R.string.live_send_buy_liang_name_1) + +mContext.getString(R.string.live_send_buy_liang_name_1) + " " + mTempGifGiftBean.getLiangName(); Spanned spanned = Html.fromHtml(text, null, new HtmlTagHandler("myfont")); mGifGiftTipBuyLiangName.setText(spanned); @@ -1622,7 +1622,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); } diff --git a/live/src/main/java/com/yunbao/live/presenter/LiveLinkMicAnchorPresenter.java b/live/src/main/java/com/yunbao/live/presenter/LiveLinkMicAnchorPresenter.java index e32a32c7d..83fa3fc26 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveLinkMicAnchorPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveLinkMicAnchorPresenter.java @@ -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) { diff --git a/live/src/main/java/com/yunbao/live/presenter/LiveLinkMicPkPresenter.java b/live/src/main/java/com/yunbao/live/presenter/LiveLinkMicPkPresenter.java index 449bb0a38..61409af18 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveLinkMicPkPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveLinkMicPkPresenter.java @@ -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(); diff --git a/live/src/main/java/com/yunbao/live/presenter/LiveLinkMicPresenter.java b/live/src/main/java/com/yunbao/live/presenter/LiveLinkMicPresenter.java index adab13ca6..78572c7d9 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveLinkMicPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveLinkMicPresenter.java @@ -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(); diff --git a/live/src/main/java/com/yunbao/live/presenter/LiveRoomCheckLivePresenter.java b/live/src/main/java/com/yunbao/live/presenter/LiveRoomCheckLivePresenter.java index 3a2cebade..ce2690916 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveRoomCheckLivePresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveRoomCheckLivePresenter.java @@ -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)); } } }); diff --git a/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java b/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java index a1fed92aa..61c3e5d06 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java @@ -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()) { diff --git a/live/src/main/java/com/yunbao/live/presenter/UserHomeSharePresenter.java b/live/src/main/java/com/yunbao/live/presenter/UserHomeSharePresenter.java index 2bb6b5760..a132baac5 100644 --- a/live/src/main/java/com/yunbao/live/presenter/UserHomeSharePresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/UserHomeSharePresenter.java @@ -71,9 +71,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; diff --git a/live/src/main/java/com/yunbao/live/socket/SocketChatUtil.java b/live/src/main/java/com/yunbao/live/socket/SocketChatUtil.java index c7990935d..c78c0d62a 100644 --- a/live/src/main/java/com/yunbao/live/socket/SocketChatUtil.java +++ b/live/src/main/java/com/yunbao/live/socket/SocketChatUtil.java @@ -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() { @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() { @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() { @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() { diff --git a/live/src/main/java/com/yunbao/live/socket/SocketClient.java b/live/src/main/java/com/yunbao/live/socket/SocketClient.java index f7933e897..d23b3e297 100644 --- a/live/src/main/java/com/yunbao/live/socket/SocketClient.java +++ b/live/src/main/java/com/yunbao/live/socket/SocketClient.java @@ -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()); } //增加粉丝徽章信息 diff --git a/live/src/main/java/com/yunbao/live/socket/SocketRyChatUtil.java b/live/src/main/java/com/yunbao/live/socket/SocketRyChatUtil.java index 17a1df676..25a3d2635 100644 --- a/live/src/main/java/com/yunbao/live/socket/SocketRyChatUtil.java +++ b/live/src/main/java/com/yunbao/live/socket/SocketRyChatUtil.java @@ -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; diff --git a/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java b/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java index 0d0ecdf50..67a9268f0 100644 --- a/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java +++ b/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java @@ -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()); } //增加粉丝徽章信息 diff --git a/live/src/main/java/com/yunbao/live/utils/LiveTextRender.java b/live/src/main/java/com/yunbao/live/utils/LiveTextRender.java index 084c357ab..8dd1edea5 100644 --- a/live/src/main/java/com/yunbao/live/utils/LiveTextRender.java +++ b/live/src/main/java/com/yunbao/live/utils/LiveTextRender.java @@ -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(); diff --git a/live/src/main/java/com/yunbao/live/views/LiveAdminListViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveAdminListViewHolder.java index ef736adec..eac9460a1 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveAdminListViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveAdminListViewHolder.java @@ -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 + ")"); } diff --git a/live/src/main/java/com/yunbao/live/views/LiveGiftLuckTopViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveGiftLuckTopViewHolder.java index 0f643dcd5..369d031b6 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveGiftLuckTopViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveGiftLuckTopViewHolder.java @@ -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(); diff --git a/live/src/main/java/com/yunbao/live/views/LiveLinkMicPkViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveLinkMicPkViewHolder.java index 5bc6407d8..832a4ec12 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveLinkMicPkViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveLinkMicPkViewHolder.java @@ -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); diff --git a/live/src/main/java/com/yunbao/live/views/LiveLinkMicPlayTxViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveLinkMicPlayTxViewHolder.java index c2ca47236..ca40805c3 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveLinkMicPlayTxViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveLinkMicPlayTxViewHolder.java @@ -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; } } diff --git a/live/src/main/java/com/yunbao/live/views/LiveNewReadyRyViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveNewReadyRyViewHolder.java index 8dab5bed3..c8ac7930a 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveNewReadyRyViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveNewReadyRyViewHolder.java @@ -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)) { diff --git a/live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java b/live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java index 6399477ad..05c3ad1b8 100644 --- a/live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java @@ -687,7 +687,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(); diff --git a/live/src/main/java/com/yunbao/live/views/LivePlayTxViewHolder.java b/live/src/main/java/com/yunbao/live/views/LivePlayTxViewHolder.java index 5acc92c24..5bb5c04cb 100644 --- a/live/src/main/java/com/yunbao/live/views/LivePlayTxViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LivePlayTxViewHolder.java @@ -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"); diff --git a/live/src/main/java/com/yunbao/live/views/LivePlayTxViewHolder_backup.java b/live/src/main/java/com/yunbao/live/views/LivePlayTxViewHolder_backup.java index 1227a9324..bb881e1f0 100644 --- a/live/src/main/java/com/yunbao/live/views/LivePlayTxViewHolder_backup.java +++ b/live/src/main/java/com/yunbao/live/views/LivePlayTxViewHolder_backup.java @@ -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"); diff --git a/live/src/main/java/com/yunbao/live/views/LivePushTxViewHolder360Beauty.java b/live/src/main/java/com/yunbao/live/views/LivePushTxViewHolder360Beauty.java index ee6488832..43eaead2c 100644 --- a/live/src/main/java/com/yunbao/live/views/LivePushTxViewHolder360Beauty.java +++ b/live/src/main/java/com/yunbao/live/views/LivePushTxViewHolder360Beauty.java @@ -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(); diff --git a/live/src/main/java/com/yunbao/live/views/LiveReadyRyViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveReadyRyViewHolder.java index 6575c81cb..24ad829a7 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveReadyRyViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveReadyRyViewHolder.java @@ -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)) { diff --git a/live/src/main/java/com/yunbao/live/views/LiveReadyViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveReadyViewHolder.java index 4da9ea036..3d965ee08 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveReadyViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveReadyViewHolder.java @@ -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)) { diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index 0ce17e7bf..e47000d43 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -1279,7 +1279,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis liveAudienceActivity.pausePlay(); if (code == 1008) {//余额不足 liveAudienceActivity.setCoinNotEnough(true); - DialogUitl.showSimpleDialog(mContext, WordUtil.getString(R.string.live_coin_not_enough), false, + DialogUitl.showSimpleDialog(mContext,mContext.getString(R.string.live_coin_not_enough), false, new DialogUitl.SimpleCallback2() { @Override public void onConfirmClick(Dialog dialog, String content) { @@ -1730,7 +1730,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis if (loadingDialog != null && loadingDialog.isShowing()) { return true; } - loadingDialog = DialogUitl.loadingDialog(mContext, WordUtil.getString(R.string.login_wait)); + loadingDialog = DialogUitl.loadingDialog(mContext,mContext.getString(R.string.login_wait)); loadingDialog.show(); new Handler(Looper.getMainLooper()).postDelayed(() -> { if (loadingDialog != null) { @@ -2167,7 +2167,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis if (rank == 0) { mHourRank.setText(R.string.no_rank_data); } else { - mHourRank.setText(String.format(WordUtil.getString(R.string.hour_rank), formatBigNum.formatBigNum(rank + ""))); + mHourRank.setText(String.format(mContext.getString(R.string.hour_rank), formatBigNum.formatBigNum(rank + ""))); } } } @@ -2557,7 +2557,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis public void setGuardNum(int guardNum) { if (mGuardNum != null) { if (guardNum > 0) { - mGuardNum.setText(WordUtil.getString(R.string.live_guard) + " " + guardNum); + mGuardNum.setText(mContext.getString(R.string.live_guard) + " " + guardNum); } else { mGuardNum.setText(R.string.main_list_no_data); } @@ -2570,9 +2570,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis public static void setFansNum(int fansNum) { if (fans != null) { if (fansNum > 0) { - fans.setText(WordUtil.getString(R.string.fans) + " " + fansNum); + fans.setText(Contexts.getString(R.string.fans) + " " + fansNum); } else { - fans.setText(WordUtil.getString(R.string.fans) + " 0"); + fans.setText(Contexts.getString(R.string.fans) + " 0"); } } } @@ -2876,7 +2876,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis public void callback(Integer isAttention) { if (isAttention == 1) { LiveActivity.sendSystemMessage( - CommonAppConfig.getInstance().getUserBean().getUserNiceName() + WordUtil.getString(R.string.live_follow_anchor)); + CommonAppConfig.getInstance().getUserBean().getUserNiceName() +Contexts.getString(R.string.live_follow_anchor)); } } }); diff --git a/live/src/main/java/com/yunbao/live/views/LuckLiveGiftViewHolder.java b/live/src/main/java/com/yunbao/live/views/LuckLiveGiftViewHolder.java index 0f3bda722..b856e4782 100644 --- a/live/src/main/java/com/yunbao/live/views/LuckLiveGiftViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LuckLiveGiftViewHolder.java @@ -79,7 +79,7 @@ public class LuckLiveGiftViewHolder extends AbsViewHolder { mStar = findViewById(R.id.star); mAvatar = (ImageView) findViewById(R.id.avatar); mZhong = (TextView) findViewById(R.id.zhong); - mXiZhong = WordUtil.getString(R.string.live_gift_xi_zhong); + mXiZhong =mContext.getString(R.string.live_gift_xi_zhong); mName = (TextView) findViewById(R.id.name); mContent = (TextView) findViewById(R.id.content); mGiftIcon = (ImageView) findViewById(R.id.gift_icon); diff --git a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java index 2a86d0c06..7b8c24976 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -1214,7 +1214,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe public void onKick(String touid) { if (!TextUtils.isEmpty(touid) && touid.equals(CommonAppConfig.getInstance().getUid())) {//被踢的是自己 kick = true; - ToastUtil.show(WordUtil.getString(R.string.live_kicked_2)); + ToastUtil.show(mContext.getString(R.string.live_kicked_2)); onRemove(true); } } @@ -1781,7 +1781,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe } else { if (code == 1008) {//余额不足 mCoinNotEnough = true; - DialogUitl.showSimpleDialog(mContext, WordUtil.getString(R.string.live_coin_not_enough), false, + DialogUitl.showSimpleDialog(mContext,mContext.getString(R.string.live_coin_not_enough), false, new DialogUitl.SimpleCallback2() { @Override public void onConfirmClick(Dialog dialog, String content) { diff --git a/main/src/main/java/com/yunbao/main/activity/BindUserActivity.java b/main/src/main/java/com/yunbao/main/activity/BindUserActivity.java index e90e50ae2..7239c3144 100644 --- a/main/src/main/java/com/yunbao/main/activity/BindUserActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/BindUserActivity.java @@ -86,7 +86,7 @@ public class BindUserActivity extends AbsActivity { @Override protected void main() { -// setTitle(WordUtil.getString(R.string.reg_register)); +// setTitle(mContext.getString(R.string.reg_register)); getPromoCode(); webview = (WebView) findViewById(R.id.webview); lt_first_bind = (LinearLayout) findViewById(R.id.lt_first_bind); @@ -107,8 +107,8 @@ public class BindUserActivity extends AbsActivity { btn_goto_updata = findViewById(R.id.btn_goto_updata); tv_title = findViewById(R.id.tv_title); - mGetCode = WordUtil.getString(R.string.reg_get_code); - mGetCodeAgain = WordUtil.getString(R.string.reg_get_code_again); + mGetCode =mContext.getString(R.string.reg_get_code); + mGetCodeAgain =mContext.getString(R.string.reg_get_code_again); mTvCountryCodeClick(); mEditPhone.addTextChangedListener(new TextWatcher() { @Override @@ -292,14 +292,14 @@ public class BindUserActivity extends AbsActivity { private void getMessageCode(String Randstr, String Ticket) { String phoneNum = mEditPhone.getText().toString().trim(); if (TextUtils.isEmpty(phoneNum)) { - mEditPhone.setError(WordUtil.getString(R.string.reg_input_phone)); + mEditPhone.setError(mContext.getString(R.string.reg_input_phone)); mEditPhone.requestFocus(); return; } //屏蔽,原因:国外手机号无法校验合法性 // if (!ValidatePhoneUtil.validateMobileNumber(phoneNum)) // { -// mEditPhone.setError(WordUtil.getString(R.string.login_phone_error)); +// mEditPhone.setError(mContext.getString(R.string.login_phone_error)); // mEditPhone.requestFocus(); // return; // } @@ -330,37 +330,37 @@ public class BindUserActivity extends AbsActivity { private void register() { final String phoneNum = mEditPhone.getText().toString().trim(); if (TextUtils.isEmpty(phoneNum)) { - mEditPhone.setError(WordUtil.getString(R.string.reg_input_phone)); + mEditPhone.setError(mContext.getString(R.string.reg_input_phone)); mEditPhone.requestFocus(); return; } //屏蔽,原因:国外手机号无法校验合法性 // if (!ValidatePhoneUtil.validateMobileNumber(phoneNum)) { -// mEditPhone.setError(WordUtil.getString(R.string.login_phone_error)); +// mEditPhone.setError(mContext.getString(R.string.login_phone_error)); // mEditPhone.requestFocus(); // return; // } String code = mEditCode.getText().toString().trim(); if (TextUtils.isEmpty(code)) { - mEditCode.setError(WordUtil.getString(R.string.reg_input_code)); + mEditCode.setError(mContext.getString(R.string.reg_input_code)); mEditCode.requestFocus(); return; } if ("0".equals(isBind)) { final String pwd = mEditPwd1.getText().toString().trim(); if (TextUtils.isEmpty(pwd)) { - mEditPwd1.setError(WordUtil.getString(R.string.reg_input_pwd_1)); + mEditPwd1.setError(mContext.getString(R.string.reg_input_pwd_1)); mEditPwd1.requestFocus(); return; } String pwd2 = mEditPwd2.getText().toString().trim(); if (TextUtils.isEmpty(pwd2)) { - mEditPwd2.setError(WordUtil.getString(R.string.reg_input_pwd_2)); + mEditPwd2.setError(mContext.getString(R.string.reg_input_pwd_2)); mEditPwd2.requestFocus(); return; } if (!pwd.equals(pwd2)) { - mEditPwd2.setError(WordUtil.getString(R.string.reg_pwd_error)); + mEditPwd2.setError(mContext.getString(R.string.reg_pwd_error)); mEditPwd2.requestFocus(); return; } diff --git a/main/src/main/java/com/yunbao/main/activity/CashActivity.java b/main/src/main/java/com/yunbao/main/activity/CashActivity.java index 8c90cbd18..dd9561b87 100644 --- a/main/src/main/java/com/yunbao/main/activity/CashActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/CashActivity.java @@ -132,7 +132,7 @@ public class CashActivity extends AbsActivity implements View.OnClickListener, C @Override public void onItemDelete(final CashAccountBean bean, final int position) { - DialogUitl.showSimpleDialog(mContext, WordUtil.getString(R.string.cash_delete), new DialogUitl.SimpleCallback() { + DialogUitl.showSimpleDialog(mContext,mContext.getString(R.string.cash_delete), new DialogUitl.SimpleCallback() { @Override public void onConfirmClick(Dialog dialog, String content) { MainHttpUtil.deleteCashAccount(bean.getId(), new HttpCallback() { diff --git a/main/src/main/java/com/yunbao/main/activity/ChatRoomActivity.java b/main/src/main/java/com/yunbao/main/activity/ChatRoomActivity.java index 1c25c139b..add768128 100644 --- a/main/src/main/java/com/yunbao/main/activity/ChatRoomActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/ChatRoomActivity.java @@ -305,7 +305,7 @@ public class ChatRoomActivity extends AbsActivity implements KeyBoardHeightChang // mChatRoomViewHolder.sendLocation(lat, lng, scale, address); // } // } else { -// ToastUtil.show(WordUtil.getString(R.string.im_get_location_failed)); +// ToastUtil.show(mContext.getString(R.string.im_get_location_failed)); // } // } // } diff --git a/main/src/main/java/com/yunbao/main/activity/EditNameActivity.java b/main/src/main/java/com/yunbao/main/activity/EditNameActivity.java index af6cf0e45..9be090ed0 100644 --- a/main/src/main/java/com/yunbao/main/activity/EditNameActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/EditNameActivity.java @@ -38,7 +38,7 @@ public class EditNameActivity extends AbsActivity implements View.OnClickListene @Override protected void main() { - setTitle(WordUtil.getString(R.string.edit_profile_update_nickname)); + setTitle(mContext.getString(R.string.edit_profile_update_nickname)); mEditText = (EditText) findViewById(R.id.edit); mEditText.setFilters(new InputFilter[]{ new InputFilter.LengthFilter(8) diff --git a/main/src/main/java/com/yunbao/main/activity/EditProfileActivity.java b/main/src/main/java/com/yunbao/main/activity/EditProfileActivity.java index bb00765df..1864a8329 100644 --- a/main/src/main/java/com/yunbao/main/activity/EditProfileActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/EditProfileActivity.java @@ -78,7 +78,7 @@ public class EditProfileActivity extends AbsActivity { @Override protected void main() { - setTitle(WordUtil.getString(R.string.edit_profile)); + setTitle(mContext.getString(R.string.edit_profile)); mAvatar = (ImageView) findViewById(R.id.avatar); mName = (TextView) findViewById(R.id.name); mSign = (TextView) findViewById(R.id.sign); diff --git a/main/src/main/java/com/yunbao/main/activity/EditSexActivity.java b/main/src/main/java/com/yunbao/main/activity/EditSexActivity.java index 7fb0d8ec6..8b6c73944 100644 --- a/main/src/main/java/com/yunbao/main/activity/EditSexActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/EditSexActivity.java @@ -35,7 +35,7 @@ public class EditSexActivity extends AbsActivity implements View.OnClickListener @Override protected void main() { - setTitle(WordUtil.getString(R.string.edit_profile_sex)); + setTitle(mContext.getString(R.string.edit_profile_sex)); mBtnMale = (RadioButton)findViewById(R.id.btn_male); mBtnFeMale = (RadioButton)findViewById(R.id.btn_female); mBtnMale.setOnClickListener(this); diff --git a/main/src/main/java/com/yunbao/main/activity/EditSignActivity.java b/main/src/main/java/com/yunbao/main/activity/EditSignActivity.java index 33ba9cbdc..b71da0aa3 100644 --- a/main/src/main/java/com/yunbao/main/activity/EditSignActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/EditSignActivity.java @@ -35,7 +35,7 @@ public class EditSignActivity extends AbsActivity implements View.OnClickListene @Override protected void main() { - setTitle(WordUtil.getString(R.string.edit_profile_update_sign)); + setTitle(mContext.getString(R.string.edit_profile_update_sign)); mEditText = (EditText) findViewById(R.id.edit); mEditText.setFilters(new InputFilter[]{ new InputFilter.LengthFilter(20) diff --git a/main/src/main/java/com/yunbao/main/activity/EntryActivity.java b/main/src/main/java/com/yunbao/main/activity/EntryActivity.java index aa2fe66f6..6db950215 100644 --- a/main/src/main/java/com/yunbao/main/activity/EntryActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/EntryActivity.java @@ -716,7 +716,7 @@ public class EntryActivity extends AppCompatActivity { if (mBtnClick) { return; } - loginLoadingDialog = DialogUitl.loadingDialog(EntryActivity.this, WordUtil.getString(R.string.login_wait)); + loginLoadingDialog = DialogUitl.loadingDialog(EntryActivity.this,getString(R.string.login_wait)); loginLoadingDialog.show(); new Timer().schedule(new TimerTask() { @Override diff --git a/main/src/main/java/com/yunbao/main/activity/FansActivity.java b/main/src/main/java/com/yunbao/main/activity/FansActivity.java index 9a8ea0be8..2e72c5114 100644 --- a/main/src/main/java/com/yunbao/main/activity/FansActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/FansActivity.java @@ -60,10 +60,10 @@ public class FansActivity extends AbsActivity implements OnItemClickListener list = JSON.parseArray(Arrays.toString(info), SettingBean.class); SettingBean data1 = new SettingBean(); data1.setId(19); - data1.setName(WordUtil.getString(R.string.versions)); + data1.setName(mContext.getString(R.string.versions)); list.add(data1); SettingBean data2 = new SettingBean(); data2.setId(25); - data2.setName(WordUtil.getString(R.string.check_the_new_version)); + data2.setName(mContext.getString(R.string.check_the_new_version)); list.add(data2); SettingBean bean = new SettingBean(); - bean.setName(WordUtil.getString(R.string.setting_exit)); + bean.setName(mContext.getString(R.string.setting_exit)); bean.setLast(true); list.add(bean); diff --git a/main/src/main/java/com/yunbao/main/activity/ThreeDistributActivity.java b/main/src/main/java/com/yunbao/main/activity/ThreeDistributActivity.java index a1babe459..e55b94ae6 100644 --- a/main/src/main/java/com/yunbao/main/activity/ThreeDistributActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/ThreeDistributActivity.java @@ -196,7 +196,7 @@ public class ThreeDistributActivity extends AbsActivity implements View.OnClickL intent.setData(MediaStore.Images.Media.EXTERNAL_CONTENT_URI); } intent.setType("image/*"); - startActivityForResult(Intent.createChooser(intent, WordUtil.getString(com.yunbao.common.R.string.choose_flie)), CHOOSE); + startActivityForResult(Intent.createChooser(intent,mContext.getString(com.yunbao.common.R.string.choose_flie)), CHOOSE); } @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) diff --git a/main/src/main/java/com/yunbao/main/activity/WeekWebViewActivity.java b/main/src/main/java/com/yunbao/main/activity/WeekWebViewActivity.java index e893de283..b985b053a 100644 --- a/main/src/main/java/com/yunbao/main/activity/WeekWebViewActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/WeekWebViewActivity.java @@ -196,7 +196,7 @@ public class WeekWebViewActivity extends AbsActivity { intent.setData(MediaStore.Images.Media.EXTERNAL_CONTENT_URI); } intent.setType("image/*"); - startActivityForResult(Intent.createChooser(intent, WordUtil.getString(com.yunbao.common.R.string.choose_flie)), CHOOSE); + startActivityForResult(Intent.createChooser(intent,mContext.getString(com.yunbao.common.R.string.choose_flie)), CHOOSE); } @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) diff --git a/main/src/main/java/com/yunbao/main/activity/ZhuangBanActivity.java b/main/src/main/java/com/yunbao/main/activity/ZhuangBanActivity.java index d91d3f819..5faf2af1c 100644 --- a/main/src/main/java/com/yunbao/main/activity/ZhuangBanActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/ZhuangBanActivity.java @@ -195,7 +195,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) diff --git a/main/src/main/java/com/yunbao/main/adapter/CoinAdapter.java b/main/src/main/java/com/yunbao/main/adapter/CoinAdapter.java index a65cd79f2..dcef843d9 100644 --- a/main/src/main/java/com/yunbao/main/adapter/CoinAdapter.java +++ b/main/src/main/java/com/yunbao/main/adapter/CoinAdapter.java @@ -50,7 +50,7 @@ public class CoinAdapter extends RecyclerView.Adapter { mInflater = LayoutInflater.from(context); mHeadView = mInflater.inflate(R.layout.item_coin_head, null); mHeadView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)); - mGiveString = WordUtil.getString(R.string.coin_give); + mGiveString =context.getString(R.string.coin_give); mOnClickListener = new View.OnClickListener() { @Override public void onClick(View v) { diff --git a/main/src/main/java/com/yunbao/main/adapter/MainListAdapter.java b/main/src/main/java/com/yunbao/main/adapter/MainListAdapter.java index e222d942c..e2729f123 100644 --- a/main/src/main/java/com/yunbao/main/adapter/MainListAdapter.java +++ b/main/src/main/java/com/yunbao/main/adapter/MainListAdapter.java @@ -58,8 +58,8 @@ public class MainListAdapter extends RefreshAdapter { super(context); mType = type; mTopList = new ArrayList<>(); - mFollow = (WordUtil.getString(R.string.follow)); - mFollowing = WordUtil.getString(R.string.following); + mFollow = (mContext.getString(R.string.follow)); + mFollowing =mContext.getString(R.string.following); mItemClickListener = v -> { Object tag = v.getTag(); if (tag != null && mOnItemClickListener != null) { diff --git a/main/src/main/java/com/yunbao/main/adapter/SearchAdapter.java b/main/src/main/java/com/yunbao/main/adapter/SearchAdapter.java index 216924177..9a3f901d0 100644 --- a/main/src/main/java/com/yunbao/main/adapter/SearchAdapter.java +++ b/main/src/main/java/com/yunbao/main/adapter/SearchAdapter.java @@ -48,8 +48,8 @@ public class SearchAdapter extends RefreshAdapter { public SearchAdapter(Context context, int from) { super(context); mFrom = from; - mFollow = WordUtil.getString(R.string.follow); - mFollowing = WordUtil.getString(R.string.following); + mFollow =mContext.getString(R.string.follow); + mFollowing =mContext.getString(R.string.following); mFollowClickListener = new View.OnClickListener() { @Override public void onClick(View v) { diff --git a/main/src/main/java/com/yunbao/main/dialog/OneLoginDialog.java b/main/src/main/java/com/yunbao/main/dialog/OneLoginDialog.java index 54e359688..fefcd9b9f 100644 --- a/main/src/main/java/com/yunbao/main/dialog/OneLoginDialog.java +++ b/main/src/main/java/com/yunbao/main/dialog/OneLoginDialog.java @@ -80,11 +80,11 @@ public class OneLoginDialog extends AbsDialogFragment { return; } ImgLoader.displayAvatar(mContext, CommonAppConfig.getInstance().getUserBean().getAvatar(), avatar); - text_username.setText(WordUtil.getString(R.string.edit_profile_nickname) + ":" + bundle.getString("name")); + text_username.setText(mContext.getString(R.string.edit_profile_nickname) + ":" + bundle.getString("name")); if (!bundle.getString("code").equals("")) { - text_code.setText(WordUtil.getString(R.string.invite_code) + ":" + bundle.getString("code")); + text_code.setText(mContext.getString(R.string.invite_code) + ":" + bundle.getString("code")); } else { - text_code.setText(WordUtil.getString(R.string.invite_code) + ":無"); + text_code.setText(mContext.getString(R.string.invite_code) + ":無"); } btn_enter.setOnClickListener(new View.OnClickListener() { diff --git a/main/src/main/java/com/yunbao/main/views/AbsMainListChildViewHolder.java b/main/src/main/java/com/yunbao/main/views/AbsMainListChildViewHolder.java index 84644df8c..831135ffb 100644 --- a/main/src/main/java/com/yunbao/main/views/AbsMainListChildViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/AbsMainListChildViewHolder.java @@ -335,7 +335,7 @@ public abstract class AbsMainListChildViewHolder extends AbsMainViewHolder imple setVisibility(bean.isHide() ? View.GONE : View.VISIBLE, position, mBtnFollow1, mBtnFollow2, mBtnFollow3); if (bean.getAttention() != 1) { getItem(position, mBtnFollow1, mBtnFollow2, mBtnFollow3).doChecked(true); - getItem(position, mBtnFollow1, mBtnFollow2, mBtnFollow3).setText("+" + WordUtil.getString(R.string.follow)); + getItem(position, mBtnFollow1, mBtnFollow2, mBtnFollow3).setText("+" +mContext.getString(R.string.follow)); if (isRankOne) { getItem(position, mBtnFollow1, mBtnFollow2, mBtnFollow3).setBackgroundResource(R.drawable.background_ffff79c2); getItem(position, mBtnFollow1, mBtnFollow2, mBtnFollow3).setTextColor(Color.parseColor("#FFFFFF")); diff --git a/main/src/main/java/com/yunbao/main/views/BonusViewHolder.java b/main/src/main/java/com/yunbao/main/views/BonusViewHolder.java index 4b984ad58..4da6f0b26 100644 --- a/main/src/main/java/com/yunbao/main/views/BonusViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/BonusViewHolder.java @@ -79,7 +79,7 @@ public class BonusViewHolder extends AbsViewHolder implements View.OnClickListen public void setData(List list, int day, String continueDay) { mList = list; mDay = day; - String s = WordUtil.getString(R.string.bonus_sign_1) + "" + continueDay + "" + WordUtil.getString(R.string.bonus_day); + String s =mContext.getString(R.string.bonus_sign_1) + "" + continueDay + "" +mContext.getString(R.string.bonus_day); mDayView.setText(Html.fromHtml(s)); for (int i = 0, length = mItemViews.length; i < length; i++) { if (i <= mDay - 1) { diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java index 1bb04c52b..a6dad1d3c 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java @@ -1,7 +1,6 @@ package com.yunbao.main.views; import static android.content.Context.CLIPBOARD_SERVICE; -import static com.yunbao.common.utils.WordUtil.getString; import android.content.ClipData; import android.content.ClipboardManager; @@ -269,8 +268,8 @@ public class MainHomeCommunityViewHolder extends AbsMainHomeChildViewHolder impl intent.setData(MediaStore.Images.Media.EXTERNAL_CONTENT_URI); } intent.setType("image/*"); - nowMainActivity.startActivityMain(Intent.createChooser(intent, WordUtil.getString(R.string.choose_flie)), CHOOSE); -// startActivityForResult(Intent.createChooser(intent, WordUtil.getString(R.string.choose_flie)), CHOOSE); + nowMainActivity.startActivityMain(Intent.createChooser(intent,mContext.getString(R.string.choose_flie)), CHOOSE); +// startActivityForResult(Intent.createChooser(intent,mContext.getString(R.string.choose_flie)), CHOOSE); } @@ -295,7 +294,7 @@ public class MainHomeCommunityViewHolder extends AbsMainHomeChildViewHolder impl 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)); } public void closeFinger() { diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeCsdViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeCsdViewHolder.java index e5030a341..bee4c2fb8 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeCsdViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeCsdViewHolder.java @@ -29,7 +29,6 @@ import com.yunbao.common.bean.LiveBean; import com.yunbao.main.R; import static android.content.Context.CLIPBOARD_SERVICE; -import static com.yunbao.common.utils.WordUtil.getString; /** * Created by cxf on 2018/9/22. @@ -145,6 +144,6 @@ public class MainHomeCsdViewHolder extends AbsMainHomeChildViewHolder implements ClipboardManager cm = (ClipboardManager) mContext.getSystemService(CLIPBOARD_SERVICE); ClipData clipData = ClipData.newPlainText("text", content); cm.setPrimaryClip(clipData); - ToastUtil.show(getString(com.yunbao.common.R.string.copy_success)); + ToastUtil.show(mContext.getString(com.yunbao.common.R.string.copy_success)); } } \ No newline at end of file diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeShopViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeShopViewHolder.java index 884016223..10420db5c 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeShopViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeShopViewHolder.java @@ -27,7 +27,6 @@ import com.yunbao.main.R; import com.yunbao.main.utils.BottomBarUtil; import static android.content.Context.CLIPBOARD_SERVICE; -import static com.yunbao.common.utils.WordUtil.getString; /** * Created by cxf on 2018/9/22. @@ -142,7 +141,7 @@ public class MainHomeShopViewHolder extends AbsMainHomeChildViewHolder implement ClipboardManager cm = (ClipboardManager) mContext.getSystemService(CLIPBOARD_SERVICE); ClipData clipData = ClipData.newPlainText("text", content); cm.setPrimaryClip(clipData); - ToastUtil.show(getString(com.yunbao.common.R.string.copy_success)); + ToastUtil.show(mContext.getString(com.yunbao.common.R.string.copy_success)); } } diff --git a/main/src/main/java/com/yunbao/main/views/MainListViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainListViewHolder.java index ed087eeba..789a6595e 100644 --- a/main/src/main/java/com/yunbao/main/views/MainListViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainListViewHolder.java @@ -85,8 +85,8 @@ public class MainListViewHolder extends AbsMainViewHolder { }); mIndicator = (MagicIndicator) findViewById(R.id.indicator); final String[] titles = new String[]{ - WordUtil.getString(R.string.main_list_profit), - WordUtil.getString(R.string.main_list_contribute) + mContext.getString(R.string.main_list_profit), + mContext.getString(R.string.main_list_contribute) }; CommonNavigator commonNavigator = new CommonNavigator(mContext); commonNavigator.setAdapter(new CommonNavigatorAdapter() { diff --git a/main/src/main/java/com/yunbao/main/views/MainNearViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainNearViewHolder.java index 622d75aa1..c3026b7a6 100644 --- a/main/src/main/java/com/yunbao/main/views/MainNearViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainNearViewHolder.java @@ -62,7 +62,7 @@ public class MainNearViewHolder extends AbsMainHomeParentViewHolder { @Override protected String[] getTitles() { return new String[]{ - WordUtil.getString(R.string.near) + mContext.getString(R.string.near) }; } diff --git a/main/src/main/java/com/yunbao/main/views/UserHomeDetailViewHolder.java b/main/src/main/java/com/yunbao/main/views/UserHomeDetailViewHolder.java index 91b554011..8da0406e3 100644 --- a/main/src/main/java/com/yunbao/main/views/UserHomeDetailViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/UserHomeDetailViewHolder.java @@ -170,7 +170,7 @@ public class UserHomeDetailViewHolder extends AbsUserHomeViewHolder implements V UserHomeViewHolder2.mSign.setText(userBean.getSignature()); } if (mVotesName != null) { - mVotesName.setText(StringUtil.contact(CommonAppConfig.getInstance().getVotesName(), WordUtil.getString(R.string.live_user_home_con))); + mVotesName.setText(StringUtil.contact(CommonAppConfig.getInstance().getVotesName(),mContext.getString(R.string.live_user_home_con))); } if (mBirthday != null) { mBirthday.setText(obj.getString("birthday")); @@ -187,10 +187,10 @@ public class UserHomeDetailViewHolder extends AbsUserHomeViewHolder implements V UserHomeViewHolder2.mSign.setText(userBean.getSignature()); } if (mBirthday != null) { - mBirthday.setText(StringUtil.contact(WordUtil.getString(R.string.edit_profile_birthday), ": ", obj.getString("birthday"))); + mBirthday.setText(StringUtil.contact(mContext.getString(R.string.edit_profile_birthday), ": ", obj.getString("birthday"))); } if (mCity != null) { - mCity.setText(StringUtil.contact(WordUtil.getString(R.string.edit_profile_city), ": ", obj.getString("location"))); + mCity.setText(StringUtil.contact(mContext.getString(R.string.edit_profile_city), ": ", obj.getString("location"))); } } diff --git a/main/src/main/java/com/yunbao/main/views/UserHomeViewHolder.java b/main/src/main/java/com/yunbao/main/views/UserHomeViewHolder.java index ba38d56c0..2956722ba 100644 --- a/main/src/main/java/com/yunbao/main/views/UserHomeViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/UserHomeViewHolder.java @@ -205,8 +205,8 @@ public class UserHomeViewHolder extends AbsLivePageViewHolder implements AppBarL } }); - mVideoString = WordUtil.getString(R.string.video); - mLiveString = WordUtil.getString(R.string.live); + mVideoString =mContext.getString(R.string.video); + mLiveString =mContext.getString(R.string.live); mIndicator = (MagicIndicator) findViewById(R.id.indicator); final String[] titles = new String[]{mVideoString, mLiveString}; CommonNavigator commonNavigator = new CommonNavigator(mContext); @@ -361,8 +361,8 @@ public class UserHomeViewHolder extends AbsLivePageViewHolder implements AppBarL mID.setText(userBean.getLiangNameTip()); String fansNum = StringUtil.toWan(userBean.getFans()); - mBtnFans.setText(fansNum + " " + WordUtil.getString(R.string.fans)); - mBtnFollow.setText(StringUtil.toWan(userBean.getFollows()) + " " + WordUtil.getString(R.string.follow)); + mBtnFans.setText(fansNum + " " +mContext.getString(R.string.fans)); + mBtnFollow.setText(StringUtil.toWan(userBean.getFollows()) + " " +mContext.getString(R.string.follow)); mSign.setText(userBean.getSignature()); mBtnFollow2.setText(obj.getIntValue("isattention") == 1 ? R.string.following : R.string.follow); mBtnBlack.setText(obj.getIntValue("isblack") == 1 ? R.string.black_ing : R.string.black); @@ -374,7 +374,7 @@ public class UserHomeViewHolder extends AbsLivePageViewHolder implements AppBarL mLiveCountTextView.setText(mLiveString + " " + obj.getString("livenums")); } showImpress(obj.getString("label")); - mVotesName.setText(appConfig.getVotesName() + WordUtil.getString(R.string.live_user_home_con)); + mVotesName.setText(appConfig.getVotesName() +mContext.getString(R.string.live_user_home_con)); mUserHomeSharePresenter.setToUid(mToUid).setToName(toName).setAvatarThumb(userBean.getAvatarThumb()).setFansNum(fansNum); showContribute(obj.getString("contribute")); showGuardList(obj.getString("guardlist")); @@ -396,7 +396,7 @@ public class UserHomeViewHolder extends AbsLivePageViewHolder implements AppBarL } if (!mSelf) { ImpressBean lastBean = new ImpressBean(); - lastBean.setName("+ " + WordUtil.getString(R.string.impress_add)); + lastBean.setName("+ " +mContext.getString(R.string.impress_add)); lastBean.setColor("#ffdd00"); list.add(lastBean); } else { diff --git a/main/src/main/java/com/yunbao/main/views/UserHomeViewHolder2.java b/main/src/main/java/com/yunbao/main/views/UserHomeViewHolder2.java index 05dde04f2..522c28789 100644 --- a/main/src/main/java/com/yunbao/main/views/UserHomeViewHolder2.java +++ b/main/src/main/java/com/yunbao/main/views/UserHomeViewHolder2.java @@ -167,7 +167,7 @@ public class UserHomeViewHolder2 extends AbsLivePageViewHolder implements LiveSh } - String s = WordUtil.getString(R.string.black); + String s =mContext.getString(R.string.black); @Override public void init() { @@ -317,11 +317,11 @@ public class UserHomeViewHolder2 extends AbsLivePageViewHolder implements LiveSh } }); - mVideoString = WordUtil.getString(R.string.video); - mLiveString = WordUtil.getString(R.string.honor); + mVideoString =mContext.getString(R.string.video); + mLiveString =mContext.getString(R.string.honor); mIndicator = (MagicIndicator) findViewById(R.id.indicator); - final String[] titles = new String[]{WordUtil.getString(R.string.live_user_home_detail), mLiveString, mVideoString,}; -// final String[] titles = new String[]{WordUtil.getString(R.string.live_user_home_detail), mVideoString}; //mxj update 2019-9-19 + final String[] titles = new String[]{mContext.getString(R.string.live_user_home_detail), mLiveString, mVideoString,}; +// final String[] titles = new String[]{mContext.getString(R.string.live_user_home_detail), mVideoString}; //mxj update 2019-9-19 CommonNavigator commonNavigator = new CommonNavigator(mContext); commonNavigator.setAdapter(new CommonNavigatorAdapter() { @@ -516,8 +516,8 @@ public class UserHomeViewHolder2 extends AbsLivePageViewHolder implements LiveSh } // mID.setText(" "+userBean.getLiangNameTip()); String fansNum = StringUtil.toWan(userBean.getFans()); - mBtnFans.setText(fansNum + " " + WordUtil.getString(R.string.fans)); - mBtnFollow.setText(StringUtil.toWan(userBean.getFollows()) + " " + WordUtil.getString(R.string.follow)); + mBtnFans.setText(fansNum + " " +mContext.getString(R.string.fans)); + mBtnFollow.setText(StringUtil.toWan(userBean.getFollows()) + " " +mContext.getString(R.string.follow)); if (obj.getIntValue("isattention") == 1) { if (mFollowImage != null) { @@ -865,8 +865,8 @@ public class UserHomeViewHolder2 extends AbsLivePageViewHolder implements LiveSh mSex.setImageResource(CommonIconUtil.getSexIcon(userBean.getSex())); mID.setText(userBean.getLiangNameTip()); String fansNum = StringUtil.toWan(userBean.getFans()); - mBtnFans.setText(fansNum + " " + WordUtil.getString(R.string.fans)); - mBtnFollow.setText(StringUtil.toWan(userBean.getFollows()) + " " + WordUtil.getString(R.string.follow)); + mBtnFans.setText(fansNum + " " +mContext.getString(R.string.fans)); + mBtnFollow.setText(StringUtil.toWan(userBean.getFollows()) + " " +mContext.getString(R.string.follow)); if (mDetailViewHolder != null) { mDetailViewHolder.refreshData(userBean, obj); } diff --git a/video/src/main/java/com/yunbao/video/activity/AbsVideoPlayActivity.java b/video/src/main/java/com/yunbao/video/activity/AbsVideoPlayActivity.java index 7a5a90f3d..ed8457dc3 100644 --- a/video/src/main/java/com/yunbao/video/activity/AbsVideoPlayActivity.java +++ b/video/src/main/java/com/yunbao/video/activity/AbsVideoPlayActivity.java @@ -75,7 +75,7 @@ public abstract class AbsVideoPlayActivity extends AbsVideoCommentActivity { } ClipData clipData = ClipData.newPlainText("text", videoBean.getHref()); mClipboardManager.setPrimaryClip(clipData); - ToastUtil.show(WordUtil.getString(R.string.copy_success)); + ToastUtil.show(mContext.getString(R.string.copy_success)); } /** diff --git a/video/src/main/java/com/yunbao/video/activity/VideoChooseActivity.java b/video/src/main/java/com/yunbao/video/activity/VideoChooseActivity.java index 1bb6dce6f..b968f7f16 100644 --- a/video/src/main/java/com/yunbao/video/activity/VideoChooseActivity.java +++ b/video/src/main/java/com/yunbao/video/activity/VideoChooseActivity.java @@ -38,7 +38,7 @@ public class VideoChooseActivity extends AbsActivity implements OnItemClickListe @Override protected void main() { - setTitle(WordUtil.getString(R.string.video_local)); + setTitle(mContext.getString(R.string.video_local)); mMaxDuration = getIntent().getLongExtra(Constants.VIDEO_DURATION, 15000); mNoData = findViewById(R.id.no_data); mRecyclerView = (RecyclerView) findViewById(R.id.recyclerView); diff --git a/video/src/main/java/com/yunbao/video/activity/VideoEditActivity.java b/video/src/main/java/com/yunbao/video/activity/VideoEditActivity.java index 3ee2e0d5d..833ee5299 100644 --- a/video/src/main/java/com/yunbao/video/activity/VideoEditActivity.java +++ b/video/src/main/java/com/yunbao/video/activity/VideoEditActivity.java @@ -129,7 +129,7 @@ public class VideoEditActivity extends AbsActivity implements mFromRecord = intent.getBooleanExtra(Constants.VIDEO_FROM_RECORD, false); mHasOriginBgm = intent.getBooleanExtra(Constants.VIDEO_HAS_BGM, false); if (mVideoDuration <= 0 || TextUtils.isEmpty(mOriginVideoPath)) { - ToastUtil.show(WordUtil.getString(R.string.video_edit_status_error)); + ToastUtil.show(mContext.getString(R.string.video_edit_status_error)); deleteOriginVideoFile(); finish(); return; @@ -596,7 +596,7 @@ public class VideoEditActivity extends AbsActivity implements mBtnNext.setEnabled(false); mVideoEditer.stopPlay(); mVideoEditer.cancel(); - mVideoGenerateViewHolder = new VideoProcessViewHolder(mContext, mRoot, WordUtil.getString(R.string.video_process_2)); + mVideoGenerateViewHolder = new VideoProcessViewHolder(mContext, mRoot,mContext.getString(R.string.video_process_2)); mVideoGenerateViewHolder.setActionListener(new VideoProcessViewHolder.ActionListener() { @Override public void onCancelProcessClick() { @@ -624,7 +624,7 @@ public class VideoEditActivity extends AbsActivity implements @Override public void onBackPressed() { - DialogUitl.showSimpleDialog(mContext, WordUtil.getString(R.string.video_edit_exit), new DialogUitl.SimpleCallback() { + DialogUitl.showSimpleDialog(mContext,mContext.getString(R.string.video_edit_exit), new DialogUitl.SimpleCallback() { @Override public void onConfirmClick(Dialog dialog, String content) { exit(); @@ -741,7 +741,7 @@ public class VideoEditActivity extends AbsActivity implements * 开始预处理 */ private void startPreProcess() { - mVideoProcessViewHolder = new VideoProcessViewHolder(mContext, mRoot, WordUtil.getString(R.string.video_process_1)); + mVideoProcessViewHolder = new VideoProcessViewHolder(mContext, mRoot,mContext.getString(R.string.video_process_1)); mVideoProcessViewHolder.addToParent(); mVideoProcessViewHolder.setActionListener(this); if (mHandler == null) { @@ -840,7 +840,7 @@ public class VideoEditActivity extends AbsActivity implements */ @Override public void onCancelProcessClick() { - ToastUtil.show(WordUtil.getString(R.string.video_process_cancel)); + ToastUtil.show(mContext.getString(R.string.video_process_cancel)); deleteOriginVideoFile(); release(); finish(); diff --git a/video/src/main/java/com/yunbao/video/activity/VideoPublishActivity.java b/video/src/main/java/com/yunbao/video/activity/VideoPublishActivity.java index 0e5fd5a0c..4e927d95e 100644 --- a/video/src/main/java/com/yunbao/video/activity/VideoPublishActivity.java +++ b/video/src/main/java/com/yunbao/video/activity/VideoPublishActivity.java @@ -102,7 +102,7 @@ public class VideoPublishActivity extends AbsActivity implements ITXLivePlayList @Override protected void main() { getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); - setTitle(WordUtil.getString(R.string.video_pub)); + setTitle(mContext.getString(R.string.video_pub)); Intent intent = getIntent(); mVideoPath = intent.getStringExtra(Constants.VIDEO_PATH); mSaveType = intent.getIntExtra(Constants.VIDEO_SAVE_TYPE, Constants.VIDEO_SAVE_SAVE_AND_PUB); @@ -253,7 +253,7 @@ public class VideoPublishActivity extends AbsActivity implements ITXLivePlayList @Override public void onBackPressed() { - DialogUitl.showSimpleDialog(mContext, WordUtil.getString(R.string.video_give_up_pub), new DialogUitl.SimpleCallback() { + DialogUitl.showSimpleDialog(mContext,mContext.getString(R.string.video_give_up_pub), new DialogUitl.SimpleCallback() { @Override public void onConfirmClick(Dialog dialog, String content) { if (mSaveType == Constants.VIDEO_SAVE_PUB) { @@ -297,7 +297,7 @@ public class VideoPublishActivity extends AbsActivity implements ITXLivePlayList mLocation.setText(CommonAppConfig.getInstance().getCity()); } else { mLocation.setEnabled(false); - mLocation.setText(WordUtil.getString(R.string.mars)); + mLocation.setText(mContext.getString(R.string.mars)); } } @@ -320,7 +320,7 @@ public class VideoPublishActivity extends AbsActivity implements ITXLivePlayList if (TextUtils.isEmpty(mVideoPath)) { return; } - mLoading = DialogUitl.loadingDialog(mContext, WordUtil.getString(R.string.video_pub_ing)); + mLoading = DialogUitl.loadingDialog(mContext,mContext.getString(R.string.video_pub_ing)); mLoading.show(); Bitmap bitmap = null; //生成视频封面图 diff --git a/video/src/main/java/com/yunbao/video/activity/VideoReportActivity.java b/video/src/main/java/com/yunbao/video/activity/VideoReportActivity.java index 24b0ae0c7..e905dc994 100644 --- a/video/src/main/java/com/yunbao/video/activity/VideoReportActivity.java +++ b/video/src/main/java/com/yunbao/video/activity/VideoReportActivity.java @@ -48,7 +48,7 @@ public class VideoReportActivity extends AbsActivity implements VideoReportAdapt @Override protected void main() { - setTitle(WordUtil.getString(R.string.report)); + setTitle(mContext.getString(R.string.report)); mVideoId = getIntent().getStringExtra(Constants.VIDEO_ID); mRecyclerView = findViewById(R.id.recyclerView); mRecyclerView.setHasFixedSize(true); diff --git a/video/src/main/java/com/yunbao/video/bean/VideoCommentBean.java b/video/src/main/java/com/yunbao/video/bean/VideoCommentBean.java index d59e57480..ce1c10d45 100644 --- a/video/src/main/java/com/yunbao/video/bean/VideoCommentBean.java +++ b/video/src/main/java/com/yunbao/video/bean/VideoCommentBean.java @@ -18,7 +18,7 @@ import java.util.List; public class VideoCommentBean implements Parcelable { - private static final String REPLY = WordUtil.getString(R.string.video_comment_reply) + " "; + private static final String REPLY =WordUtil.getString(R.string.video_comment_reply) + " "; private String mId; private String mUid; diff --git a/video/src/main/java/com/yunbao/video/dialog/VideoInputDialogFragment.java b/video/src/main/java/com/yunbao/video/dialog/VideoInputDialogFragment.java index b7bafef5e..2f6b64334 100644 --- a/video/src/main/java/com/yunbao/video/dialog/VideoInputDialogFragment.java +++ b/video/src/main/java/com/yunbao/video/dialog/VideoInputDialogFragment.java @@ -109,7 +109,7 @@ public class VideoInputDialogFragment extends AbsDialogFragment implements View. if (mVideoCommentBean != null) { UserBean replyUserBean = mVideoCommentBean.getUserBean();//要回复的人 if (replyUserBean != null) { - mInput.setHint(WordUtil.getString(R.string.video_comment_reply) + replyUserBean.getUserNiceName()); + mInput.setHint(mContext.getString(R.string.video_comment_reply) + replyUserBean.getUserNiceName()); } } } diff --git a/video/src/main/java/com/yunbao/video/views/VideoCommentViewHolder.java b/video/src/main/java/com/yunbao/video/views/VideoCommentViewHolder.java index 0898755a2..d085f55e7 100644 --- a/video/src/main/java/com/yunbao/video/views/VideoCommentViewHolder.java +++ b/video/src/main/java/com/yunbao/video/views/VideoCommentViewHolder.java @@ -114,7 +114,7 @@ public class VideoCommentViewHolder extends AbsViewHolder implements View.OnClic findViewById(R.id.btn_close).setOnClickListener(this); findViewById(R.id.input).setOnClickListener(this); findViewById(R.id.btn_face).setOnClickListener(this); - mCommentString = WordUtil.getString(R.string.video_comment); + mCommentString =mContext.getString(R.string.video_comment); mCommentNum = (TextView) findViewById(R.id.comment_num); mRefreshView = (CommonRefreshView) findViewById(R.id.refreshView); mRefreshView.setEmptyLayoutId(R.layout.view_no_data_comment);