多语言切换
This commit is contained in:
parent
bfbbe54308
commit
098ef7aa36
@ -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) {
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
@ -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");
|
||||
|
@ -86,7 +86,7 @@ public class TieZhiAdapter extends RecyclerView.Adapter<TieZhiAdapter.Vh> {
|
||||
TiUtils.unzip(file, targetDir);
|
||||
bean.setDownloadSuccess(mContext);
|
||||
} catch (Exception e) {
|
||||
ToastUtil.show(WordUtil.getString(R.string.tiezhi_download_failed));
|
||||
ToastUtil.show(mContext.getString(R.string.tiezhi_download_failed));
|
||||
bean.setDownloading(false);
|
||||
} finally {
|
||||
file.delete();
|
||||
@ -103,7 +103,7 @@ public class TieZhiAdapter extends RecyclerView.Adapter<TieZhiAdapter.Vh> {
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
ToastUtil.show(WordUtil.getString(R.string.tiezhi_download_failed));
|
||||
ToastUtil.show(mContext.getString(R.string.tiezhi_download_failed));
|
||||
bean.setDownloading(false);
|
||||
notifyItemChanged(position, Constants.PAYLOAD);
|
||||
mLoadingTaskMap.remove(position);
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -41,7 +41,7 @@ public class ChatChargeCoinAdapter extends RecyclerView.Adapter<ChatChargeCoinAd
|
||||
mList = list;
|
||||
mCoinName = CommonAppConfig.getInstance().getCoinName();
|
||||
mGoldCoinName = CommonAppConfig.getInstance().getGoldCoinName();
|
||||
mGiveString = WordUtil.getString(R.string.coin_give);
|
||||
mGiveString = context.getString(R.string.coin_give);
|
||||
mOnClickListener = new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
@ -87,7 +87,7 @@ public class LiveTaskModel extends BaseModel {
|
||||
|
||||
public String getEndTime() {
|
||||
if (!StringUtil.isEmpty(endTime)) {
|
||||
endTime = WordUtil.getString(R.string.live_task_new_user_timer) + new SimpleDateFormat("yyyy/MM/dd HH:mm", Locale.getDefault()).format(new Date(Long.parseLong(endTime) * 1000));
|
||||
endTime =WordUtil.getString(R.string.live_task_new_user_timer) + new SimpleDateFormat("yyyy/MM/dd HH:mm", Locale.getDefault()).format(new Date(Long.parseLong(endTime) * 1000));
|
||||
}
|
||||
return endTime;
|
||||
}
|
||||
|
@ -489,7 +489,7 @@ public class UserBean implements Parcelable {
|
||||
if (this.liang != null) {
|
||||
String liangName = this.liang.getName();
|
||||
if (!TextUtils.isEmpty(liangName) && !"0".equals(liangName)) {
|
||||
// return WordUtil.getString(R.string.live_liang) + ":" + liangName;
|
||||
// returnmContext.getString(R.string.live_liang) + ":" + liangName;
|
||||
return liangName;
|
||||
}
|
||||
}
|
||||
|
@ -138,8 +138,8 @@ public class LiveChargeDialogFragment extends AbsDialogFragment implements View.
|
||||
private void showMoney(CoinBean bean) {
|
||||
mCheckedCoinBean = bean;
|
||||
if (mCheckedCoinBean != null && mBtnCharge != null) {
|
||||
// mBtnCharge.setText(String.format(WordUtil.getString(R.string.chat_charge_tip), mCheckedCoinBean.getMoney()));
|
||||
mBtnCharge.setText(String.format(WordUtil.getString(R.string.chat_charge_tip)));
|
||||
// mBtnCharge.setText(String.format(mContext.getString(R.string.chat_charge_tip), mCheckedCoinBean.getMoney()));
|
||||
mBtnCharge.setText(String.format(mContext.getString(R.string.chat_charge_tip)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,6 @@ import io.rong.message.RecallNotificationMessage;
|
||||
import io.rong.message.TextMessage;
|
||||
|
||||
import static android.content.Context.CLIPBOARD_SERVICE;
|
||||
import static com.yunbao.common.utils.WordUtil.getString;
|
||||
|
||||
/**
|
||||
* 消息長按彈窗
|
||||
@ -123,7 +122,7 @@ public class MessageLongClickPopuwindow implements View.OnClickListener {
|
||||
ClipboardManager cm = (ClipboardManager) mContext.getSystemService(CLIPBOARD_SERVICE);
|
||||
ClipData clipData = ClipData.newPlainText("text", content);
|
||||
cm.setPrimaryClip(clipData);
|
||||
ToastUtil.show(getString(R.string.copy_success));
|
||||
ToastUtil.show(mContext.getString(R.string.copy_success));
|
||||
|
||||
}
|
||||
}
|
||||
@ -135,7 +134,7 @@ public class MessageLongClickPopuwindow implements View.OnClickListener {
|
||||
IMCenter.getInstance().recallMessage(message, "撤回成功", new RongIMClient.ResultCallback<RecallNotificationMessage>() {
|
||||
@Override
|
||||
public void onSuccess(RecallNotificationMessage recallNotificationMessage) {
|
||||
ToastUtil.show(getString(R.string.withdraw_success));
|
||||
ToastUtil.show(mContext.getString(R.string.withdraw_success));
|
||||
//删除草稿信息
|
||||
IMCenter.getInstance().clearTextMessageDraft(message.getConversationType(), message.getTargetId(), null);
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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() {
|
||||
|
@ -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[]{
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
|
@ -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));
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -168,7 +168,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
@Override
|
||||
public void onTimer(String time) {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
mLiveRoomViewHolder.setRandomPkTimer(String.format(WordUtil.getString(R.string.random_pk_info_btn_ing), time));
|
||||
mLiveRoomViewHolder.setRandomPkTimer(String.format(mContext.getString(R.string.random_pk_info_btn_ing), time));
|
||||
}
|
||||
}
|
||||
|
||||
@ -539,7 +539,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
public void onResourceReady(@NonNull Bitmap resource, @Nullable Transition<? super Bitmap> transition) {
|
||||
|
||||
boolean ret = RCRTCEngine.getInstance().getDefaultVideoStream().setWatermark(BitmapUtil.getInstance().convertMirror(resource), rect);
|
||||
sendSystemMessage(WordUtil.getString(R.string.live_anchor_leave));
|
||||
sendSystemMessage(mContext.getString(R.string.live_anchor_leave));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -552,7 +552,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
leave_img.setVisibility(View.GONE);
|
||||
// 清除水印
|
||||
boolean ret = RCRTCEngine.getInstance().getDefaultVideoStream().setWatermark(null, rect);
|
||||
sendSystemMessage(WordUtil.getString(R.string.live_anchor_come_back));
|
||||
sendSystemMessage(mContext.getString(R.string.live_anchor_come_back));
|
||||
}
|
||||
|
||||
HttpClient.getInstance().get("Live.isLeave", "Live.isLeave")
|
||||
@ -861,7 +861,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
* 关闭直播
|
||||
*/
|
||||
public void closeLive() {
|
||||
DialogUitl.showSimpleDialog(mContext, WordUtil.getString(R.string.live_end_live), new DialogUitl.SimpleCallback() {
|
||||
DialogUitl.showSimpleDialog(mContext,mContext.getString(R.string.live_end_live), new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
PKing = false;
|
||||
@ -990,7 +990,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
|
||||
@Override
|
||||
public Dialog createLoadingDialog() {
|
||||
return DialogUitl.loadingDialog(mContext, WordUtil.getString(R.string.live_end_ing));
|
||||
return DialogUitl.loadingDialog(mContext,mContext.getString(R.string.live_end_ing));
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -1088,7 +1088,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
// }
|
||||
super.onPause();
|
||||
// if (isKeyBack) {
|
||||
// sendSystemMessage(WordUtil.getString(R.string.live_anchor_leave));
|
||||
// sendSystemMessage(mContext.getString(R.string.live_anchor_leave));
|
||||
// }
|
||||
// mPaused = true;
|
||||
}
|
||||
@ -1100,7 +1100,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
// if (mLiveRoomViewHolder != null) {
|
||||
// mLiveRoomViewHolder.anchorResume();
|
||||
// }
|
||||
// sendSystemMessage(WordUtil.getString(R.string.live_anchor_come_back));
|
||||
// sendSystemMessage(mContext.getString(R.string.live_anchor_come_back));
|
||||
// CommonHttpUtil.checkTokenInvalid();
|
||||
// }
|
||||
// mPaused = false;
|
||||
@ -1122,7 +1122,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
@Override
|
||||
public void onSuperCloseLive() {
|
||||
endLive();
|
||||
DialogUitl.showSimpleTipDialog(mContext, WordUtil.getString(R.string.live_illegal));
|
||||
DialogUitl.showSimpleTipDialog(mContext,mContext.getString(R.string.live_illegal));
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
@ -1443,7 +1443,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
printLog(DateFormatUtil.getCurTimeString2() + " <=== " + mReqCount + "----status=" + status + "\n");
|
||||
if (status == 0) {
|
||||
NotCancelableDialog dialog = new NotCancelableDialog();
|
||||
dialog.setContent(WordUtil.getString(R.string.live_anchor_error));
|
||||
dialog.setContent(mContext.getString(R.string.live_anchor_error));
|
||||
dialog.setActionListener(new NotCancelableDialog.ActionListener() {
|
||||
@Override
|
||||
public void onConfirmClick(Context context, DialogFragment dialog) {
|
||||
@ -1526,7 +1526,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
if (micListener != null) {
|
||||
micListener.updateMicList(mMicQueueList);
|
||||
DialogUitl.showSimpleDialog(mContext,
|
||||
String.format(WordUtil.getString(R.string.live_mic_user_apply), ((LinkMicUserBean) event.getObject()).getUname()),
|
||||
String.format(mContext.getString(R.string.live_mic_user_apply), ((LinkMicUserBean) event.getObject()).getUname()),
|
||||
new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
|
@ -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;
|
||||
|
@ -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)) {
|
||||
|
@ -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)
|
||||
|
@ -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() {
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -125,14 +125,14 @@ public class AnchorUserMicInfoAdapter extends RefreshAdapter<MicUserBean> {
|
||||
if (length <= 4) {
|
||||
if (tag.getType() == TYPE_MIC_REQUEST) {
|
||||
applyMic(tag, 4, createSocketSendBean());
|
||||
ToastUtil.show(WordUtil.getString(R.string.live_mic_request));
|
||||
ToastUtil.show(mContext.getString(R.string.live_mic_request));
|
||||
} else if (tag.getType() == TYPE_MIC_INVITE) {
|
||||
SocketSendBean bean = createSocketSendBean().param("targetId", tag.getId());
|
||||
applyMic(tag, 1, bean);
|
||||
ToastUtil.show(WordUtil.getString(R.string.live_mic_invite));
|
||||
ToastUtil.show(mContext.getString(R.string.live_mic_invite));
|
||||
}
|
||||
} else {
|
||||
ToastUtil.show(WordUtil.getString(R.string.live_mic_max));
|
||||
ToastUtil.show(mContext.getString(R.string.live_mic_max));
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -149,7 +149,7 @@ public class AnchorUserMicInfoAdapter extends RefreshAdapter<MicUserBean> {
|
||||
@Override
|
||||
public void accept(ResponseModel<BaseModel> stringResponseModel) throws Exception {
|
||||
applyMic((MicUserBean) v.getTag(), 8, createSocketSendBean());
|
||||
ToastUtil.show(WordUtil.getString(R.string.live_mic_user_down));
|
||||
ToastUtil.show(mContext.getString(R.string.live_mic_user_down));
|
||||
}
|
||||
}, Throwable::printStackTrace).isDisposed();
|
||||
|
||||
|
@ -44,7 +44,7 @@ public class GuardAdapter extends RefreshAdapter<GuardUserBean> {
|
||||
this.isShowTitle = isShowTitle;
|
||||
mDialog = dialog;
|
||||
mVotesName = CommonAppConfig.getInstance().getVotesName();
|
||||
mWeekContributeString = WordUtil.getString(R.string.guard_week_con);
|
||||
mWeekContributeString =mContext.getString(R.string.guard_week_con);
|
||||
mGuardDrawable0 = ContextCompat.getDrawable(context, R.mipmap.icon_guard_type_0);
|
||||
mGuardDrawable1 = ContextCompat.getDrawable(context, R.mipmap.icon_guard_type_1);
|
||||
mGuardDrawable2 = ContextCompat.getDrawable(context, R.mipmap.icon_guard_type_2);
|
||||
|
@ -24,7 +24,7 @@ public class LiveAdminRoomAdapter extends RefreshAdapter<LiveAdminRoomBean> {
|
||||
|
||||
public LiveAdminRoomAdapter(Context context) {
|
||||
super(context);
|
||||
mSuffix = WordUtil.getString(R.string.live_admin_room);
|
||||
mSuffix =mContext.getString(R.string.live_admin_room);
|
||||
mOnClickListener = new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
@ -177,7 +177,7 @@ public class LiveAnchorEditCallMeAdapter extends RecyclerView.Adapter<LiveAnchor
|
||||
}
|
||||
})
|
||||
.setShowNumber(false)
|
||||
.setTitle(WordUtil.getString(R.string.live_anchor_edit_call_me_select_gift))
|
||||
.setTitle(mContext.getString(R.string.live_anchor_edit_call_me_select_gift))
|
||||
.setHideGiftType(true)
|
||||
.showDialog()
|
||||
;
|
||||
@ -250,7 +250,7 @@ public class LiveAnchorEditCallMeAdapter extends RecyclerView.Adapter<LiveAnchor
|
||||
super.setData(data, position);
|
||||
if (StringUtil.isEmpty(data.getValue())) {
|
||||
contact.setTag(null);
|
||||
contact.setText(WordUtil.getString(R.string.live_anchor_edit_call_me_not_filled));
|
||||
contact.setText(mContext.getString(R.string.live_anchor_edit_call_me_not_filled));
|
||||
contact.setTextColor(Color.parseColor("#80FFFFFF"));
|
||||
} else {
|
||||
contact.setTag(data.getValue());
|
||||
@ -265,7 +265,7 @@ public class LiveAnchorEditCallMeAdapter extends RecyclerView.Adapter<LiveAnchor
|
||||
status.setTag(data.getStatus());
|
||||
status.setOnClickListener(v -> {
|
||||
if (StringUtil.isEmpty((String) contact.getTag())) {
|
||||
ToastUtil.show(WordUtil.getString(R.string.live_anchor_edit_call_me_not_filled_toash));
|
||||
ToastUtil.show(mContext.getString(R.string.live_anchor_edit_call_me_not_filled_toash));
|
||||
return;
|
||||
}
|
||||
int tag = (int) v.getTag();
|
||||
@ -286,7 +286,7 @@ public class LiveAnchorEditCallMeAdapter extends RecyclerView.Adapter<LiveAnchor
|
||||
public void onItemClick(String bean, int position) {
|
||||
if (StringUtil.isEmpty(bean)) {
|
||||
contact.setTag(null);
|
||||
contact.setHint(WordUtil.getString(R.string.live_anchor_edit_call_me_not_filled));
|
||||
contact.setHint(mContext.getString(R.string.live_anchor_edit_call_me_not_filled));
|
||||
if(position==0) {
|
||||
contact.setTextColor(Color.parseColor("#80FFFFFF"));
|
||||
}
|
||||
|
@ -212,7 +212,7 @@ public class LiveGiftAdapter extends RecyclerView.Adapter<LiveGiftAdapter.Vh> {
|
||||
@Override
|
||||
public void callback(File bean) {
|
||||
if(bean==null){
|
||||
ToastUtil.show(WordUtil.getString(R.string.load_failure_2));
|
||||
ToastUtil.show(mContext.getString(R.string.load_failure_2));
|
||||
mLoading.setImageResource(R.mipmap.icon_download_gift);
|
||||
animation.setRepeatCount(0);
|
||||
animation.setDuration(0);
|
||||
|
@ -114,7 +114,7 @@ public class LiveNewGuardBuyItemsAdapter extends RecyclerView.Adapter<LiveNewGua
|
||||
title.invalidate();
|
||||
}
|
||||
title.setTag(id);
|
||||
String msgText = WordUtil.getString(R.string.buy_guard_back_coin);
|
||||
String msgText =context.getString(R.string.buy_guard_back_coin);
|
||||
msg.setText(msgText + coin);
|
||||
this.coin.setText(coin);
|
||||
if (id == selectId) {
|
||||
|
@ -39,7 +39,7 @@ public class LivePkAdapter extends RefreshAdapter<LivePkBean> {
|
||||
}
|
||||
};
|
||||
mLivePkInviteString = "PK";
|
||||
mLivePkInviteString2 = WordUtil.getString(R.string.live_pk_invite_2);
|
||||
mLivePkInviteString2 =mContext.getString(R.string.live_pk_invite_2);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
|
@ -110,8 +110,8 @@ public class LiveTaskRecyclerAdapter extends RecyclerView.Adapter<LiveTaskRecycl
|
||||
}
|
||||
complete.setText(task.getStatus() ? R.string.live_task_item_complete_true : R.string.live_task_item_complete_false);
|
||||
complete.setBackgroundResource(task.getStatus() ? R.drawable.background_6cbe53 : R.drawable.background_595959);
|
||||
hot.setText(Html.fromHtml("<font color='#B3B3B3'>" + WordUtil.getString(R.string.live_task_item_hot) + "</font>  <font color='#F09FC2'>" + task.getHot() + "</font>"));
|
||||
xp.setText(Html.fromHtml("<font color='#B3B3B3'>" + WordUtil.getString(R.string.live_task_item_xp) + "</font>  <font color='#FFF69F'>" + task.getExp() + "</font>"));
|
||||
hot.setText(Html.fromHtml("<font color='#B3B3B3'>" +itemView.getContext().getString(R.string.live_task_item_hot) + "</font>  <font color='#F09FC2'>" + task.getHot() + "</font>"));
|
||||
xp.setText(Html.fromHtml("<font color='#B3B3B3'>" +itemView.getContext().getString(R.string.live_task_item_xp) + "</font>  <font color='#FFF69F'>" + task.getExp() + "</font>"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -88,14 +88,14 @@ public class LiveUserAnchorMailBoxAdapter extends RecyclerView.Adapter<LiveUserA
|
||||
|
||||
void setData(LiveUserMailBoxModel box, int position) {
|
||||
userName.setText(box.getUserName());
|
||||
topText.setText(String.format(WordUtil.getString(R.string.live_user_mailbox_top_text), box.getAnchorName()));
|
||||
tipText.setText(String.format(WordUtil.getString(R.string.live_user_mailbox_tip_text), box.getAnchorName()));
|
||||
topText.setText(String.format(mContext.getString(R.string.live_user_mailbox_top_text), box.getAnchorName()));
|
||||
tipText.setText(String.format(mContext.getString(R.string.live_user_mailbox_tip_text), box.getAnchorName()));
|
||||
del.setOnClickListener(v -> {
|
||||
new DialogUitl.Builder(mContext)
|
||||
.setTitle(WordUtil.getString(R.string.live_user_letter_dialog_title))
|
||||
.setContent(WordUtil.getString(R.string.live_user_letter_dialog_content))
|
||||
.setConfrimString(WordUtil.getString(R.string.live_user_letter_dialog_yes))
|
||||
.setCancelString(WordUtil.getString(R.string.live_user_letter_dialog_no))
|
||||
.setTitle(mContext.getString(R.string.live_user_letter_dialog_title))
|
||||
.setContent(mContext.getString(R.string.live_user_letter_dialog_content))
|
||||
.setConfrimString(mContext.getString(R.string.live_user_letter_dialog_yes))
|
||||
.setCancelString(mContext.getString(R.string.live_user_letter_dialog_no))
|
||||
.setView(R.layout.dialog_live_random_pk)
|
||||
.setCancelable(true)
|
||||
.setClickCallback((dialog, content) -> LiveNetManager.get(mContext).delContactInfo(box.getId(), new HttpCallback<String>() {
|
||||
|
@ -44,8 +44,8 @@ public class RedPackAdapter extends RecyclerView.Adapter<RedPackAdapter.Vh> {
|
||||
mContext=context;
|
||||
mList = list;
|
||||
mInflater = LayoutInflater.from(context);
|
||||
mTypeString1 = WordUtil.getString(R.string.red_pack_11);
|
||||
mTypeString2 = WordUtil.getString(R.string.red_pack_12);
|
||||
mTypeString1 =mContext.getString(R.string.red_pack_11);
|
||||
mTypeString2 =mContext.getString(R.string.red_pack_12);
|
||||
mOnClickListener = new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
@ -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 "";
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
|
@ -62,28 +62,28 @@ public class LiveDataInfoDialog extends AbsDialogPopupWindow {
|
||||
|
||||
private void initData() {
|
||||
list = new ArrayList<>();
|
||||
list.add(new LiveDataInfoModel("#00FFFF", WordUtil.getString(R.string.live_data_coin), WordUtil.getString(R.string.live_data_loading)));
|
||||
list.add(new LiveDataInfoModel("#FFF69F", WordUtil.getString(R.string.live_data_gold), WordUtil.getString(R.string.live_data_loading)));
|
||||
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_accept), WordUtil.getString(R.string.live_data_loading)));
|
||||
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_enter), WordUtil.getString(R.string.live_data_loading)));
|
||||
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_attention), WordUtil.getString(R.string.live_data_loading)));
|
||||
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_attention_rate), WordUtil.getString(R.string.live_data_loading)));
|
||||
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_fan_group), WordUtil.getString(R.string.live_data_loading)));
|
||||
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_fan_group_rate), WordUtil.getString(R.string.live_data_loading)));
|
||||
list.add(new LiveDataInfoModel("#00FFFF",getContext().getString(R.string.live_data_coin),getContext().getString(R.string.live_data_loading)));
|
||||
list.add(new LiveDataInfoModel("#FFF69F",getContext().getString(R.string.live_data_gold),getContext().getString(R.string.live_data_loading)));
|
||||
list.add(new LiveDataInfoModel(getContext().getString(R.string.live_data_accept),getContext().getString(R.string.live_data_loading)));
|
||||
list.add(new LiveDataInfoModel(getContext().getString(R.string.live_data_enter),getContext().getString(R.string.live_data_loading)));
|
||||
list.add(new LiveDataInfoModel(getContext().getString(R.string.live_data_attention),getContext().getString(R.string.live_data_loading)));
|
||||
list.add(new LiveDataInfoModel(getContext().getString(R.string.live_data_attention_rate),getContext().getString(R.string.live_data_loading)));
|
||||
list.add(new LiveDataInfoModel(getContext().getString(R.string.live_data_fan_group),getContext().getString(R.string.live_data_loading)));
|
||||
list.add(new LiveDataInfoModel(getContext().getString(R.string.live_data_fan_group_rate),getContext().getString(R.string.live_data_loading)));
|
||||
adapter.setList(list);
|
||||
LiveNetManager.get(getContext())
|
||||
.getLiveData(liveUid, new HttpCallback<com.yunbao.common.bean.LiveDataInfoModel>() {
|
||||
@Override
|
||||
public void onSuccess(com.yunbao.common.bean.LiveDataInfoModel data) {
|
||||
list.clear();
|
||||
list.add(new LiveDataInfoModel("#00FFFF", WordUtil.getString(R.string.live_data_coin), data.getTotalCoin() + ""));
|
||||
list.add(new LiveDataInfoModel("#FFF69F", WordUtil.getString(R.string.live_data_gold), data.getTotalGold() + ""));
|
||||
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_accept), data.getAcceptNum() + ""));
|
||||
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_enter), data.getEnterNum() + ""));
|
||||
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_attention), data.getAttentionNum() + ""));
|
||||
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_attention_rate), data.getAttentionNumRate() + ""));
|
||||
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_fan_group), data.getFanGroupNum() + ""));
|
||||
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_fan_group_rate), data.getFanGroupNumRate() + ""));
|
||||
list.add(new LiveDataInfoModel("#00FFFF",getContext().getString(R.string.live_data_coin), data.getTotalCoin() + ""));
|
||||
list.add(new LiveDataInfoModel("#FFF69F",getContext().getString(R.string.live_data_gold), data.getTotalGold() + ""));
|
||||
list.add(new LiveDataInfoModel(getContext().getString(R.string.live_data_accept), data.getAcceptNum() + ""));
|
||||
list.add(new LiveDataInfoModel(getContext().getString(R.string.live_data_enter), data.getEnterNum() + ""));
|
||||
list.add(new LiveDataInfoModel(getContext().getString(R.string.live_data_attention), data.getAttentionNum() + ""));
|
||||
list.add(new LiveDataInfoModel(getContext().getString(R.string.live_data_attention_rate), data.getAttentionNumRate() + ""));
|
||||
list.add(new LiveDataInfoModel(getContext().getString(R.string.live_data_fan_group), data.getFanGroupNum() + ""));
|
||||
list.add(new LiveDataInfoModel(getContext().getString(R.string.live_data_fan_group_rate), data.getFanGroupNumRate() + ""));
|
||||
adapter.setList(list);
|
||||
}
|
||||
|
||||
|
@ -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));
|
||||
// }
|
||||
// }
|
||||
// };
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
|
@ -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");
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -933,7 +933,7 @@ public class LiveGiftAnimPresenter {
|
||||
}
|
||||
|
||||
String text = mTempGifGiftBean.getUserNiceName() + " <myfont size='24px'>"
|
||||
+ WordUtil.getString(R.string.live_send_buy_zuoji_1)
|
||||
+mContext.getString(R.string.live_send_buy_zuoji_1)
|
||||
+ "</myfont> " + (mTempGifGiftBean.getCarName());
|
||||
Spanned spanned = Html.fromHtml(text, null, new HtmlTagHandler("myfont"));
|
||||
mGifGiftTipBuyZuoji.setText(spanned);
|
||||
@ -974,7 +974,7 @@ public class LiveGiftAnimPresenter {
|
||||
}
|
||||
|
||||
String text = mTempGifGiftBean.getUserNiceName() + " <myfont size='24px'>"
|
||||
+ WordUtil.getString(R.string.live_send_buy_liang_name_1)
|
||||
+mContext.getString(R.string.live_send_buy_liang_name_1)
|
||||
+ "</myfont> " + mTempGifGiftBean.getLiangName();
|
||||
Spanned spanned = Html.fromHtml(text, null, new HtmlTagHandler("myfont"));
|
||||
mGifGiftTipBuyLiangName.setText(spanned);
|
||||
@ -1622,7 +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);
|
||||
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -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()) {
|
||||
|
@ -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;
|
||||
|
@ -146,7 +146,7 @@ public class SocketChatUtil {
|
||||
.param("medal_name", u.getMedalName())
|
||||
.param("medal_level", u.getMedalLevel())
|
||||
.param("good_num", u.getGoodnum())
|
||||
.param("ct", WordUtil.getString(R.string.live_lighted));
|
||||
.param("ct",WordUtil.getString(R.string.live_lighted));
|
||||
msg.create();
|
||||
V2TIMManager.getInstance().sendGroupTextMessage(msg.mResult.toString(), "g" + mLiveUid, V2TIMMessage.V2TIM_PRIORITY_NORMAL, new V2TIMSendCallback<V2TIMMessage>() {
|
||||
@Override
|
||||
@ -321,7 +321,7 @@ public class SocketChatUtil {
|
||||
.param("uid", u.getId())
|
||||
.param("touid", toUid)
|
||||
.param("toname", toName)
|
||||
.param("ct", toName + WordUtil.getString(R.string.live_kicked));
|
||||
.param("ct", toName +WordUtil.getString(R.string.live_kicked));
|
||||
msg.create();
|
||||
V2TIMManager.getInstance().sendGroupTextMessage(msg.mResult.toString(), "g" + mLiveUid, V2TIMMessage.V2TIM_PRIORITY_NORMAL, new V2TIMSendCallback<V2TIMMessage>() {
|
||||
@Override
|
||||
@ -364,7 +364,7 @@ public class SocketChatUtil {
|
||||
.param("uid", u.getId())
|
||||
.param("touid", toUid)
|
||||
.param("toname", toName)
|
||||
.param("ct", toName + WordUtil.getString(type == 0 ? R.string.live_shut : R.string.live_shut_2));
|
||||
.param("ct", toName +WordUtil.getString(type == 0 ? R.string.live_shut : R.string.live_shut_2));
|
||||
msg.create();
|
||||
V2TIMManager.getInstance().sendGroupTextMessage(msg.mResult.toString(), "g" + mLiveUid, V2TIMMessage.V2TIM_PRIORITY_NORMAL, new V2TIMSendCallback<V2TIMMessage>() {
|
||||
@Override
|
||||
@ -396,7 +396,7 @@ public class SocketChatUtil {
|
||||
if (u == null) {
|
||||
return;
|
||||
}
|
||||
String s = action == 1 ? WordUtil.getString(R.string.live_set_admin) : WordUtil.getString(R.string.live_set_admin_cancel);
|
||||
String s = action == 1 ?WordUtil.getString(R.string.live_set_admin) :WordUtil.getString(R.string.live_set_admin_cancel);
|
||||
final SocketSendBean msg = new SocketSendBean()
|
||||
.param("_method_", Constants.SOCKET_SET_ADMIN)
|
||||
.param("action", action)
|
||||
@ -644,7 +644,7 @@ public class SocketChatUtil {
|
||||
.param("msgtype", 0)
|
||||
.param("uid", u.getId())
|
||||
.param("uname", u.getUserNiceName())
|
||||
.param("ct", WordUtil.getString(R.string.red_pack_22)
|
||||
.param("ct",WordUtil.getString(R.string.red_pack_22)
|
||||
);
|
||||
msg.create();
|
||||
V2TIMManager.getInstance().sendGroupTextMessage(msg.mResult.toString(), "g" + mLiveUid, V2TIMMessage.V2TIM_PRIORITY_NORMAL, new V2TIMSendCallback<V2TIMMessage>() {
|
||||
|
@ -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());
|
||||
|
||||
}
|
||||
//增加粉丝徽章信息
|
||||
|
@ -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;
|
||||
|
@ -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());
|
||||
|
||||
}
|
||||
//增加粉丝徽章信息
|
||||
|
@ -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();
|
||||
|
@ -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 + ")");
|
||||
}
|
||||
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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)) {
|
||||
|
@ -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();
|
||||
|
@ -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");
|
||||
|
@ -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");
|
||||
|
@ -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();
|
||||
|
@ -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)) {
|
||||
|
@ -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)) {
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -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);
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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() {
|
||||
|
@ -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));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -60,10 +60,10 @@ public class FansActivity extends AbsActivity implements OnItemClickListener<Sea
|
||||
}
|
||||
mRefreshView = findViewById(R.id.refreshView);
|
||||
if (mToUid.equals(CommonAppConfig.getInstance().getUid())) {
|
||||
setTitle(WordUtil.getString(R.string.fans_my_fans));
|
||||
setTitle(mContext.getString(R.string.fans_my_fans));
|
||||
mRefreshView.setEmptyLayoutId(R.layout.view_no_data_fans);
|
||||
} else {
|
||||
setTitle(WordUtil.getString(R.string.fans_ta_fans));
|
||||
setTitle(mContext.getString(R.string.fans_ta_fans));
|
||||
mRefreshView.setEmptyLayoutId(R.layout.view_no_data_fans_2);
|
||||
}
|
||||
mRefreshView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
|
||||
|
@ -74,7 +74,7 @@ public class FindPwdActivity extends AbsActivity {
|
||||
|
||||
@Override
|
||||
protected void main() {
|
||||
setTitle(WordUtil.getString(R.string.find_pwd_forget));
|
||||
setTitle(mContext.getString(R.string.find_pwd_forget));
|
||||
mEditPhone = (EditText) findViewById(R.id.edit_phone);
|
||||
mEditCode = (EditText) findViewById(R.id.edit_code);
|
||||
mIvCountryCode =findViewById(R.id.ivCountryCode);
|
||||
@ -85,8 +85,8 @@ public class FindPwdActivity extends AbsActivity {
|
||||
mEditPwd2 = (EditText) findViewById(R.id.edit_pwd_2);
|
||||
mBtnCode = (TextView) findViewById(R.id.btn_code);
|
||||
mBtnRegister = findViewById(R.id.btn_register);
|
||||
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
|
||||
@ -238,13 +238,13 @@ public class FindPwdActivity extends AbsActivity {
|
||||
private void getCode(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;
|
||||
// }
|
||||
@ -276,36 +276,36 @@ public class FindPwdActivity 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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
@ -63,12 +63,12 @@ public class FollowActivity extends AbsActivity implements OnItemClickListener<S
|
||||
}
|
||||
mRefreshView = findViewById(R.id.refreshView);
|
||||
if(isBlack == 1){
|
||||
setTitle(WordUtil.getString(R.string.my_black));
|
||||
setTitle(mContext.getString(R.string.my_black));
|
||||
} else if (mToUid.equals(CommonAppConfig.getInstance().getUid())) {
|
||||
setTitle(WordUtil.getString(R.string.follow_my_follow));
|
||||
setTitle(mContext.getString(R.string.follow_my_follow));
|
||||
mRefreshView.setEmptyLayoutId(R.layout.view_no_data_follow);
|
||||
} else {
|
||||
setTitle(WordUtil.getString(R.string.follow_ta_follow));
|
||||
setTitle(mContext.getString(R.string.follow_ta_follow));
|
||||
mRefreshView.setEmptyLayoutId(R.layout.view_no_data_follow_2);
|
||||
}
|
||||
mRefreshView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
|
||||
|
@ -195,13 +195,13 @@ public class LoginActivity extends AbsActivity {
|
||||
private void login() {
|
||||
phoneNum = mEditPhone.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(phoneNum)) {
|
||||
mEditPhone.setError(WordUtil.getString(R.string.login_input_phone));
|
||||
mEditPhone.setError(mContext.getString(R.string.login_input_phone));
|
||||
mEditPhone.requestFocus();
|
||||
return;
|
||||
}
|
||||
pwd = mEditPwd.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(pwd)) {
|
||||
mEditPwd.setError(WordUtil.getString(R.string.login_input_pwd));
|
||||
mEditPwd.setError(mContext.getString(R.string.login_input_pwd));
|
||||
mEditPwd.requestFocus();
|
||||
return;
|
||||
}
|
||||
|
@ -690,7 +690,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
public void callback(ConfigBean configBean) {
|
||||
if (configBean != null) {
|
||||
if (configBean.getMaintainSwitch() == 1) {//开启维护
|
||||
DialogUitl.showSimpleTipDialog(mContext, WordUtil.getString(R.string.main_maintain_notice), configBean.getMaintainTips());
|
||||
DialogUitl.showSimpleTipDialog(mContext,mContext.getString(R.string.main_maintain_notice), configBean.getMaintainTips());
|
||||
}
|
||||
if (!VersionUtil.isLatest(configBean.getVersion())) {
|
||||
if (!APKManager.get().getApkVerNew()) {
|
||||
@ -713,7 +713,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
* 填写邀请码
|
||||
*/
|
||||
private void showInvitationCode() {
|
||||
DialogUitl.showSimpleInputDialog(mContext, WordUtil.getString(R.string.main_input_invatation_code), new DialogUitl.SimpleCallback() {
|
||||
DialogUitl.showSimpleInputDialog(mContext,mContext.getString(R.string.main_input_invatation_code), new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(final Dialog dialog, final String content) {
|
||||
if (TextUtils.isEmpty(content)) {
|
||||
@ -1030,7 +1030,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
public final int CHOOSE_ANDROID_5 = 200;//Android 5.0以上的
|
||||
|
||||
public void startActivityMain(Intent intent, int CHOOSE) {
|
||||
startActivityForResult(Intent.createChooser(intent, WordUtil.getString(R.string.choose_flie)), CHOOSE);
|
||||
startActivityForResult(Intent.createChooser(intent,mContext.getString(R.string.choose_flie)), CHOOSE);
|
||||
}
|
||||
|
||||
public void startActivityMain2(Intent intent, int CHOOSE_ANDROID_5) {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user