Merge remote-tracking branch 'origin/master'
# Conflicts: # common/src/main/res/values-zh-rHK/strings.xml # common/src/main/res/values-zh-rTW/strings.xml # common/src/main/res/values-zh/strings.xml # common/src/main/res/values/strings.xml # main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java
This commit is contained in:
commit
47c3282861
@ -135,7 +135,7 @@ public class InvitePopDialog extends AbsDialogPopupWindow {
|
|||||||
|
|
||||||
private ShareBuilder builder(int type) {
|
private ShareBuilder builder(int type) {
|
||||||
ShareBuilder builder = ShareBuilder.builder(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.setLink(url);
|
||||||
builder.setUid(uid);
|
builder.setUid(uid);
|
||||||
builder.setAnchorId(anchorId);
|
builder.setAnchorId(anchorId);
|
||||||
@ -148,7 +148,7 @@ public class InvitePopDialog extends AbsDialogPopupWindow {
|
|||||||
ClipboardManager cm = (ClipboardManager) getContext().getSystemService(CLIPBOARD_SERVICE);
|
ClipboardManager cm = (ClipboardManager) getContext().getSystemService(CLIPBOARD_SERVICE);
|
||||||
ClipData clipData = ClipData.newPlainText("text", info.getText() + "\n" + url);
|
ClipData clipData = ClipData.newPlainText("text", info.getText() + "\n" + url);
|
||||||
cm.setPrimaryClip(clipData);
|
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) {
|
public InvitePopDialog setUrl(String data) {
|
||||||
|
@ -114,13 +114,13 @@ public class SharePopDialog extends AbsDialogPopupWindow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
link.setText(url);
|
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);
|
ImgLoader.display(getContext(), anchorAvatar, avatar);
|
||||||
}
|
}
|
||||||
|
|
||||||
private ShareBuilder builder(int type) {
|
private ShareBuilder builder(int type) {
|
||||||
ShareBuilder builder = ShareBuilder.builder(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.setUid(uid);
|
||||||
builder.setAnchorId(anchorId);
|
builder.setAnchorId(anchorId);
|
||||||
builder.setAnchorName(anchorName);
|
builder.setAnchorName(anchorName);
|
||||||
@ -141,6 +141,6 @@ public class SharePopDialog extends AbsDialogPopupWindow {
|
|||||||
ClipboardManager cm = (ClipboardManager) getContext().getSystemService(CLIPBOARD_SERVICE);
|
ClipboardManager cm = (ClipboardManager) getContext().getSystemService(CLIPBOARD_SERVICE);
|
||||||
ClipData clipData = ClipData.newPlainText("text",info.getText().toString()+"\n"+url);
|
ClipData clipData = ClipData.newPlainText("text",info.getText().toString()+"\n"+url);
|
||||||
cm.setPrimaryClip(clipData);
|
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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -80,6 +80,7 @@ public class AppContext extends CommonAppContext {
|
|||||||
public LiveImDeletUtil liveImDeletUtil;
|
public LiveImDeletUtil liveImDeletUtil;
|
||||||
private final static List<WeakReference<Activity>> activities = new ArrayList<>();
|
private final static List<WeakReference<Activity>> activities = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
private static final class AdjustLifecycleCallbacks implements ActivityLifecycleCallbacks {
|
private static final class AdjustLifecycleCallbacks implements ActivityLifecycleCallbacks {
|
||||||
@Override
|
@Override
|
||||||
public void onActivityResumed(Activity activity) {
|
public void onActivityResumed(Activity activity) {
|
||||||
|
@ -532,7 +532,7 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
|
|||||||
}
|
}
|
||||||
} else if (e == TXLiveConstants.PLAY_ERR_NET_DISCONNECT ||
|
} else if (e == TXLiveConstants.PLAY_ERR_NET_DISCONNECT ||
|
||||||
e == TXLiveConstants.PLAY_ERR_FILE_NOT_FOUND) {
|
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();
|
checkUidAndToken();
|
||||||
} else if (e == TXLiveConstants.PLAY_EVT_PLAY_PROGRESS) {
|
} else if (e == TXLiveConstants.PLAY_EVT_PLAY_PROGRESS) {
|
||||||
int progress = bundle.getInt("EVT_PLAY_PROGRESS_MS");
|
int progress = bundle.getInt("EVT_PLAY_PROGRESS_MS");
|
||||||
|
@ -86,7 +86,7 @@ public class TieZhiAdapter extends RecyclerView.Adapter<TieZhiAdapter.Vh> {
|
|||||||
TiUtils.unzip(file, targetDir);
|
TiUtils.unzip(file, targetDir);
|
||||||
bean.setDownloadSuccess(mContext);
|
bean.setDownloadSuccess(mContext);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
ToastUtil.show(WordUtil.getString(R.string.tiezhi_download_failed));
|
ToastUtil.show(mContext.getString(R.string.tiezhi_download_failed));
|
||||||
bean.setDownloading(false);
|
bean.setDownloading(false);
|
||||||
} finally {
|
} finally {
|
||||||
file.delete();
|
file.delete();
|
||||||
@ -103,7 +103,7 @@ public class TieZhiAdapter extends RecyclerView.Adapter<TieZhiAdapter.Vh> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Throwable e) {
|
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);
|
bean.setDownloading(false);
|
||||||
notifyItemChanged(position, Constants.PAYLOAD);
|
notifyItemChanged(position, Constants.PAYLOAD);
|
||||||
mLoadingTaskMap.remove(position);
|
mLoadingTaskMap.remove(position);
|
||||||
|
@ -383,7 +383,7 @@ public class CommonAppConfig {
|
|||||||
public String getAppName() {
|
public String getAppName() {
|
||||||
if (TextUtils.isEmpty(mAppName)) {
|
if (TextUtils.isEmpty(mAppName)) {
|
||||||
int res = CommonAppContext.sInstance.getResources().getIdentifier("app_name", "string", "myname.pdlive.shayu");
|
int res = CommonAppContext.sInstance.getResources().getIdentifier("app_name", "string", "myname.pdlive.shayu");
|
||||||
mAppName = WordUtil.getString(res);
|
mAppName =WordUtil.getString(res);
|
||||||
}
|
}
|
||||||
return mAppName;
|
return mAppName;
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,7 @@ import androidx.appcompat.app.AppCompatActivity;
|
|||||||
import com.yunbao.common.R;
|
import com.yunbao.common.R;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.interfaces.LifeCycleListener;
|
import com.yunbao.common.interfaces.LifeCycleListener;
|
||||||
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
import com.yunbao.common.utils.ClickUtil;
|
import com.yunbao.common.utils.ClickUtil;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -48,6 +49,7 @@ public abstract class AbsActivity extends AppCompatActivity {
|
|||||||
Resources res = super.getResources();
|
Resources res = super.getResources();
|
||||||
Configuration config = new Configuration();
|
Configuration config = new Configuration();
|
||||||
config.setToDefaults();
|
config.setToDefaults();
|
||||||
|
config.locale = IMLoginManager.get(this).getLocaleLanguage();
|
||||||
res.updateConfiguration(config, res.getDisplayMetrics());
|
res.updateConfiguration(config, res.getDisplayMetrics());
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
@ -60,6 +60,6 @@ public class ErrorActivity extends AbsActivity {
|
|||||||
ClipboardManager clipboardManager = (ClipboardManager) mContext.getSystemService(Context.CLIPBOARD_SERVICE);
|
ClipboardManager clipboardManager = (ClipboardManager) mContext.getSystemService(Context.CLIPBOARD_SERVICE);
|
||||||
ClipData clipData = ClipData.newPlainText("text", mErrorInfo);
|
ClipData clipData = ClipData.newPlainText("text", mErrorInfo);
|
||||||
clipboardManager.setPrimaryClip(clipData);
|
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.setData(MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
|
||||||
}
|
}
|
||||||
intent.setType("image/*");
|
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)
|
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||||
|
@ -41,7 +41,7 @@ public class ChatChargeCoinAdapter extends RecyclerView.Adapter<ChatChargeCoinAd
|
|||||||
mList = list;
|
mList = list;
|
||||||
mCoinName = CommonAppConfig.getInstance().getCoinName();
|
mCoinName = CommonAppConfig.getInstance().getCoinName();
|
||||||
mGoldCoinName = CommonAppConfig.getInstance().getGoldCoinName();
|
mGoldCoinName = CommonAppConfig.getInstance().getGoldCoinName();
|
||||||
mGiveString = WordUtil.getString(R.string.coin_give);
|
mGiveString = context.getString(R.string.coin_give);
|
||||||
mOnClickListener = new View.OnClickListener() {
|
mOnClickListener = new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
@ -14,6 +14,26 @@ public class LiveClassBean {
|
|||||||
private boolean isAll;
|
private boolean isAll;
|
||||||
private String des;
|
private String des;
|
||||||
private boolean checked;
|
private boolean checked;
|
||||||
|
private String chinese;
|
||||||
|
private String english;
|
||||||
|
|
||||||
|
public String getChinese() {
|
||||||
|
return chinese;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveClassBean setChinese(String chinese) {
|
||||||
|
this.chinese = chinese;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEnglish() {
|
||||||
|
return english;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveClassBean setEnglish(String english) {
|
||||||
|
this.english = english;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public int getId() {
|
public int getId() {
|
||||||
return id;
|
return id;
|
||||||
|
@ -87,7 +87,7 @@ public class LiveTaskModel extends BaseModel {
|
|||||||
|
|
||||||
public String getEndTime() {
|
public String getEndTime() {
|
||||||
if (!StringUtil.isEmpty(endTime)) {
|
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;
|
return endTime;
|
||||||
}
|
}
|
||||||
|
@ -489,7 +489,7 @@ public class UserBean implements Parcelable {
|
|||||||
if (this.liang != null) {
|
if (this.liang != null) {
|
||||||
String liangName = this.liang.getName();
|
String liangName = this.liang.getName();
|
||||||
if (!TextUtils.isEmpty(liangName) && !"0".equals(liangName)) {
|
if (!TextUtils.isEmpty(liangName) && !"0".equals(liangName)) {
|
||||||
// return WordUtil.getString(R.string.live_liang) + ":" + liangName;
|
// returnmContext.getString(R.string.live_liang) + ":" + liangName;
|
||||||
return liangName;
|
return liangName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -138,8 +138,8 @@ public class LiveChargeDialogFragment extends AbsDialogFragment implements View.
|
|||||||
private void showMoney(CoinBean bean) {
|
private void showMoney(CoinBean bean) {
|
||||||
mCheckedCoinBean = bean;
|
mCheckedCoinBean = bean;
|
||||||
if (mCheckedCoinBean != null && mBtnCharge != null) {
|
if (mCheckedCoinBean != null && mBtnCharge != null) {
|
||||||
// mBtnCharge.setText(String.format(WordUtil.getString(R.string.chat_charge_tip), mCheckedCoinBean.getMoney()));
|
// mBtnCharge.setText(String.format(mContext.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)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,6 @@ import io.rong.message.RecallNotificationMessage;
|
|||||||
import io.rong.message.TextMessage;
|
import io.rong.message.TextMessage;
|
||||||
|
|
||||||
import static android.content.Context.CLIPBOARD_SERVICE;
|
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);
|
ClipboardManager cm = (ClipboardManager) mContext.getSystemService(CLIPBOARD_SERVICE);
|
||||||
ClipData clipData = ClipData.newPlainText("text", content);
|
ClipData clipData = ClipData.newPlainText("text", content);
|
||||||
cm.setPrimaryClip(clipData);
|
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>() {
|
IMCenter.getInstance().recallMessage(message, "撤回成功", new RongIMClient.ResultCallback<RecallNotificationMessage>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(RecallNotificationMessage recallNotificationMessage) {
|
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);
|
IMCenter.getInstance().clearTextMessageDraft(message.getConversationType(), message.getTargetId(), null);
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,7 @@ import com.yunbao.common.event.FollowEvent;
|
|||||||
import com.yunbao.common.interfaces.CommonCallback;
|
import com.yunbao.common.interfaces.CommonCallback;
|
||||||
import com.yunbao.common.manager.APKManager;
|
import com.yunbao.common.manager.APKManager;
|
||||||
import com.yunbao.common.manager.IMLoginManager;
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
|
import com.yunbao.common.manager.LiveClassManager;
|
||||||
import com.yunbao.common.manager.NewLevelManager;
|
import com.yunbao.common.manager.NewLevelManager;
|
||||||
import com.yunbao.common.utils.L;
|
import com.yunbao.common.utils.L;
|
||||||
import com.yunbao.common.utils.MD5Util;
|
import com.yunbao.common.utils.MD5Util;
|
||||||
@ -156,7 +157,7 @@ public class CommonHttpUtil {
|
|||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||||
locale = context.getResources().getConfiguration().getLocales().get(0);
|
locale = context.getResources().getConfiguration().getLocales().get(0);
|
||||||
} else {
|
} else {
|
||||||
locale = context.getResources().getConfiguration().locale;
|
locale = IMLoginManager.get(context).getLocaleLanguage();
|
||||||
}
|
}
|
||||||
if (locale.getLanguage().equals("zh")) {
|
if (locale.getLanguage().equals("zh")) {
|
||||||
lang = "chinese";
|
lang = "chinese";
|
||||||
@ -202,6 +203,10 @@ public class CommonHttpUtil {
|
|||||||
JSONArray levelArray = obj.getJSONArray("levelanchor_new");
|
JSONArray levelArray = obj.getJSONArray("levelanchor_new");
|
||||||
new NewLevelManager(context).UpAnchorDataLevel(levelArray.toJSONString());
|
new NewLevelManager(context).UpAnchorDataLevel(levelArray.toJSONString());
|
||||||
}
|
}
|
||||||
|
if (obj.containsKey("liveclass")) {//缓存直播间分类
|
||||||
|
JSONArray levelArray = obj.getJSONArray("liveclass");
|
||||||
|
new LiveClassManager(context).UpDataLiveClass(levelArray.toJSONString());
|
||||||
|
}
|
||||||
if (obj.containsKey("apk_ver")) {
|
if (obj.containsKey("apk_ver")) {
|
||||||
APKManager.get().setApkVer(obj.getString("apk_ver"));
|
APKManager.get().setApkVer(obj.getString("apk_ver"));
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,8 @@ import com.yunbao.common.views.floatingview.APPEasyFloat;
|
|||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登录者信息管理
|
* 登录者信息管理
|
||||||
*/
|
*/
|
||||||
@ -46,6 +48,20 @@ public class IMLoginManager extends BaseCacheManager {
|
|||||||
private final String STATUS_ANCHOR_SAY = "anchorSay";
|
private final String STATUS_ANCHOR_SAY = "anchorSay";
|
||||||
private final String STATUS_ANCHOR_CALL = "anchorCallMe";
|
private final String STATUS_ANCHOR_CALL = "anchorCallMe";
|
||||||
|
|
||||||
|
private final String KEY_LANGUAGE = "language";
|
||||||
|
|
||||||
|
public void setLanguage(boolean isEnglish) {
|
||||||
|
put(KEY_LANGUAGE, isEnglish);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Locale getLocaleLanguage() {
|
||||||
|
if (!getBoolean(KEY_LANGUAGE, false)) {
|
||||||
|
return Locale.SIMPLIFIED_CHINESE;
|
||||||
|
} else {
|
||||||
|
return new Locale("en", "rUS");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void setDefaultBubbleUrl(String defaultBubbleUrl) {
|
public void setDefaultBubbleUrl(String defaultBubbleUrl) {
|
||||||
put(keyDefaultBubbleUrl, defaultBubbleUrl);
|
put(keyDefaultBubbleUrl, defaultBubbleUrl);
|
||||||
}
|
}
|
||||||
@ -55,7 +71,6 @@ public class IMLoginManager extends BaseCacheManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void setXiaJBG(boolean xjbg) {
|
public void setXiaJBG(boolean xjbg) {
|
||||||
put(xiaJBG, xjbg);
|
put(xiaJBG, xjbg);
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,42 @@
|
|||||||
|
package com.yunbao.common.manager;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
import com.yunbao.common.bean.LiveClassBean;
|
||||||
|
import com.yunbao.common.bean.NewLevelModel;
|
||||||
|
import com.yunbao.common.manager.base.BaseCacheManager;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class LiveClassManager extends BaseCacheManager {
|
||||||
|
private final String KEY_LIVE_CLASS = "keyLiveClass";
|
||||||
|
private List<LiveClassBean> liveClass = new ArrayList<>();
|
||||||
|
|
||||||
|
public LiveClassManager(Context context) {
|
||||||
|
super(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 缓存等级图标
|
||||||
|
*
|
||||||
|
* @param json
|
||||||
|
*/
|
||||||
|
public void UpDataLiveClass(String json) {
|
||||||
|
liveClass = new Gson().fromJson(json, new TypeToken<List<LiveClassBean>>() {
|
||||||
|
}.getType());
|
||||||
|
put(KEY_LIVE_CLASS, liveClass);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取等级数据
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<LiveClassBean> getLiveClass() {
|
||||||
|
return getList(KEY_LIVE_CLASS, new TypeToken<List<LiveClassBean>>() {
|
||||||
|
}.getType());
|
||||||
|
}
|
||||||
|
}
|
@ -309,7 +309,7 @@ public class DialogUitl {
|
|||||||
if (v.getId() == R.id.btn_confirm) {
|
if (v.getId() == R.id.btn_confirm) {
|
||||||
if (callback != null) {
|
if (callback != null) {
|
||||||
if (c.getTime().getTime() > new Date().getTime()) {
|
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 {
|
} else {
|
||||||
String result = DateFormat.format("yyyy-MM-dd", c).toString();
|
String result = DateFormat.format("yyyy-MM-dd", c).toString();
|
||||||
callback.onConfirmClick(result);
|
callback.onConfirmClick(result);
|
||||||
|
@ -10,6 +10,9 @@ import com.yunbao.common.CommonAppContext;
|
|||||||
import com.yunbao.common.Constants;
|
import com.yunbao.common.Constants;
|
||||||
import com.yunbao.common.HtmlConfig;
|
import com.yunbao.common.HtmlConfig;
|
||||||
import com.yunbao.common.bean.LiveBean;
|
import com.yunbao.common.bean.LiveBean;
|
||||||
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by cxf on 2019/2/25.
|
* Created by cxf on 2019/2/25.
|
||||||
@ -109,7 +112,7 @@ public class RouteUtil {
|
|||||||
if (!"".equals(Constants.chatActionUrl)) {
|
if (!"".equals(Constants.chatActionUrl)) {
|
||||||
url = Constants.chatActionUrl;
|
url = Constants.chatActionUrl;
|
||||||
}
|
}
|
||||||
Constants.myUrl = url + "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&t=" + System.currentTimeMillis();
|
Constants.myUrl = url + "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&t=" + System.currentTimeMillis() + "&isZh=" + ((IMLoginManager.get(context).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0");
|
||||||
ARouter.getInstance().build(PATH_MYWEBVIEWACTIVTITY)
|
ARouter.getInstance().build(PATH_MYWEBVIEWACTIVTITY)
|
||||||
.withString(Constants.URL, url)
|
.withString(Constants.URL, url)
|
||||||
.navigation();
|
.navigation();
|
||||||
|
@ -48,10 +48,10 @@ public class VersionUtil {
|
|||||||
//不强更
|
//不强更
|
||||||
if (configBean.getForceUpdate() != 1) {
|
if (configBean.getForceUpdate() != 1) {
|
||||||
DialogUitl.Builder builder = new DialogUitl.Builder(context);
|
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())
|
.setContent(configBean.getUpdateDes())
|
||||||
.setConfrimString(WordUtil.getString(R.string.version_immediate_use))
|
.setConfrimString(context.getString(R.string.version_immediate_use))
|
||||||
.setCancelString(WordUtil.getString(R.string.version_not_update))
|
.setCancelString(context.getString(R.string.version_not_update))
|
||||||
.setCancelable(false)
|
.setCancelable(false)
|
||||||
.setClickCallback(new DialogUitl.SimpleCallback2() {
|
.setClickCallback(new DialogUitl.SimpleCallback2() {
|
||||||
public void onCancelClick() {
|
public void onCancelClick() {
|
||||||
@ -79,10 +79,10 @@ public class VersionUtil {
|
|||||||
.show();
|
.show();
|
||||||
} else {
|
} else {
|
||||||
DialogUitl.Builder builder = new DialogUitl.Builder(context);
|
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())
|
.setContent(configBean.getUpdateDes())
|
||||||
.setConfrimString(WordUtil.getString(R.string.version_immediate_use))
|
.setConfrimString(context.getString(R.string.version_immediate_use))
|
||||||
.setCancelString(WordUtil.getString(R.string.version_not_update))
|
.setCancelString(context.getString(R.string.version_not_update))
|
||||||
.setCancelable(false)
|
.setCancelable(false)
|
||||||
.setClickCallback(new DialogUitl.SimpleCallback2() {
|
.setClickCallback(new DialogUitl.SimpleCallback2() {
|
||||||
public void onCancelClick() {
|
public void onCancelClick() {
|
||||||
@ -109,10 +109,10 @@ public class VersionUtil {
|
|||||||
//谷歌强制更新
|
//谷歌强制更新
|
||||||
if (configBean.getGoogle_isup().equals("1")) {
|
if (configBean.getGoogle_isup().equals("1")) {
|
||||||
DialogUitl.Builder builder = new DialogUitl.Builder(context);
|
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())
|
.setContent(configBean.getUpdateDes())
|
||||||
.setConfrimString(WordUtil.getString(R.string.version_immediate_use))
|
.setConfrimString(context.getString(R.string.version_immediate_use))
|
||||||
.setCancelString(WordUtil.getString(R.string.version_not_update))
|
.setCancelString(context.getString(R.string.version_not_update))
|
||||||
.setCancelable(false)
|
.setCancelable(false)
|
||||||
.setClickCallback(new DialogUitl.SimpleCallback2() {
|
.setClickCallback(new DialogUitl.SimpleCallback2() {
|
||||||
public void onCancelClick() {
|
public void onCancelClick() {
|
||||||
@ -132,10 +132,10 @@ public class VersionUtil {
|
|||||||
//谷歌不强制
|
//谷歌不强制
|
||||||
} else {
|
} else {
|
||||||
DialogUitl.Builder builder = new DialogUitl.Builder(context);
|
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())
|
.setContent(configBean.getUpdateDes())
|
||||||
.setConfrimString(WordUtil.getString(R.string.version_immediate_use))
|
.setConfrimString(context.getString(R.string.version_immediate_use))
|
||||||
.setCancelString(WordUtil.getString(R.string.version_not_update))
|
.setCancelString(context.getString(R.string.version_not_update))
|
||||||
.setCancelable(false)
|
.setCancelable(false)
|
||||||
.setClickCallback(new DialogUitl.SimpleCallback2() {
|
.setClickCallback(new DialogUitl.SimpleCallback2() {
|
||||||
public void onCancelClick() {
|
public void onCancelClick() {
|
||||||
|
1142
common/src/main/res/values-en-rUS/string.xml
Normal file
1142
common/src/main/res/values-en-rUS/string.xml
Normal file
File diff suppressed because it is too large
Load Diff
@ -1125,4 +1125,19 @@
|
|||||||
<string name="live_room_chat_fount_size_high">大</string>
|
<string name="live_room_chat_fount_size_high">大</string>
|
||||||
<string name="dialog_live_fount_title">選擇字號大小</string>
|
<string name="dialog_live_fount_title">選擇字號大小</string>
|
||||||
<string name="dialog_fount_submit">確認</string>
|
<string name="dialog_fount_submit">確認</string>
|
||||||
|
|
||||||
|
<string name="chat_prompt">私聊提示</string>
|
||||||
|
<string name="broadcast_oom">直播間內的側邊私聊浮標</string>
|
||||||
|
<string name="chat_prompt2">動態消息</string>
|
||||||
|
<string name="chat_prompt3">主播發佈新動態通知</string>
|
||||||
|
<string name="chat_prompt4">互動通知</string>
|
||||||
|
<string name="chat_prompt5">點讚、評論、鼓勵送禮</string>
|
||||||
|
<string name="chat_prompt6">聊天通知</string>
|
||||||
|
<string name="chat_prompt7">用戶聊天訊息</string>
|
||||||
|
<string name="chat_prompt8">系統通知</string>
|
||||||
|
<string name="chat_prompt9">新活動、系統消息</string>
|
||||||
|
<string name="chat_prompt10">開播通知</string>
|
||||||
|
<string name="chat_prompt11">開啟後獲得直播通知</string>
|
||||||
|
<string name="PK_Ladder_Race">PK天梯赛</string>
|
||||||
|
<string name="party_studio">是否確認前往對方直播間?</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1125,4 +1125,18 @@
|
|||||||
<string name="live_room_chat_fount_size_high">大</string>
|
<string name="live_room_chat_fount_size_high">大</string>
|
||||||
<string name="dialog_live_fount_title">選擇字號大小</string>
|
<string name="dialog_live_fount_title">選擇字號大小</string>
|
||||||
<string name="dialog_fount_submit">確認</string>
|
<string name="dialog_fount_submit">確認</string>
|
||||||
|
|
||||||
|
<string name="chat_prompt">私聊提示</string>
|
||||||
|
<string name="broadcast_oom">直播間內的側邊私聊浮標</string>
|
||||||
|
<string name="chat_prompt2">動態消息</string>
|
||||||
|
<string name="chat_prompt3">主播發佈新動態通知</string>
|
||||||
|
<string name="chat_prompt4">互動通知</string>
|
||||||
|
<string name="chat_prompt5">點讚、評論、鼓勵送禮</string>
|
||||||
|
<string name="chat_prompt6">聊天通知</string>
|
||||||
|
<string name="chat_prompt7">用戶聊天訊息</string>
|
||||||
|
<string name="chat_prompt8">系統通知</string>
|
||||||
|
<string name="chat_prompt9">新活動、系統消息</string>
|
||||||
|
<string name="chat_prompt10">開播通知</string>
|
||||||
|
<string name="chat_prompt11">開啟後獲得直播通知</string>
|
||||||
|
<string name="PK_Ladder_Race">PK天梯赛</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1125,4 +1125,19 @@
|
|||||||
<string name="live_room_chat_fount_size_high">大</string>
|
<string name="live_room_chat_fount_size_high">大</string>
|
||||||
<string name="dialog_live_fount_title">選擇字號大小</string>
|
<string name="dialog_live_fount_title">選擇字號大小</string>
|
||||||
<string name="dialog_fount_submit">確認</string>
|
<string name="dialog_fount_submit">確認</string>
|
||||||
|
|
||||||
|
<string name="chat_prompt">私聊提示</string>
|
||||||
|
<string name="broadcast_oom">直播間內的側邊私聊浮標</string>
|
||||||
|
<string name="chat_prompt2">動態消息</string>
|
||||||
|
<string name="chat_prompt3">主播發佈新動態通知</string>
|
||||||
|
<string name="chat_prompt4">互動通知</string>
|
||||||
|
<string name="chat_prompt5">點讚、評論、鼓勵送禮</string>
|
||||||
|
<string name="chat_prompt6">聊天通知</string>
|
||||||
|
<string name="chat_prompt7">用戶聊天訊息</string>
|
||||||
|
<string name="chat_prompt8">系統通知</string>
|
||||||
|
<string name="chat_prompt9">新活動、系統消息</string>
|
||||||
|
<string name="chat_prompt10">開播通知</string>
|
||||||
|
<string name="chat_prompt11">開啟後獲得直播通知</string>
|
||||||
|
<string name="PK_Ladder_Race">PK天梯赛</string>
|
||||||
|
<string name="party_studio">是否確認前往對方直播間?</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1132,4 +1132,18 @@ Limited ride And limited avatar frame</string>
|
|||||||
<string name="dialog_live_fount_title">Select font size</string>
|
<string name="dialog_live_fount_title">Select font size</string>
|
||||||
<string name="dialog_fount_submit">confirm</string>
|
<string name="dialog_fount_submit">confirm</string>
|
||||||
|
|
||||||
|
<string name="chat_prompt">Private chat prompt</string>
|
||||||
|
<string name="broadcast_oom">A private buoy on the side of the broadcast room</string>
|
||||||
|
<string name="chat_prompt2">Dynamic message</string>
|
||||||
|
<string name="chat_prompt3">The anchor posts a new dynamic notification</string>
|
||||||
|
<string name="chat_prompt4">Interactive notification</string>
|
||||||
|
<string name="chat_prompt5">Like, comment, and encourage gifts</string>
|
||||||
|
<string name="chat_prompt6">Chat notification</string>
|
||||||
|
<string name="chat_prompt7">User chat message</string>
|
||||||
|
<string name="chat_prompt8">System notification</string>
|
||||||
|
<string name="chat_prompt9">New activity, system message</string>
|
||||||
|
<string name="chat_prompt10">Broadcast notice</string>
|
||||||
|
<string name="PK_Ladder_Race">PK Ladder Race</string>
|
||||||
|
<string name="chat_prompt11">Get live notification after opening</string>
|
||||||
|
<string name="party_studio">Confirm whether to go to the other party\'s studio?</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -44,7 +44,7 @@ public class EditNameRemarksActivity extends AbsActivity implements View.OnClick
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void main() {
|
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);
|
userId = getIntent().getStringExtra(NAMEREMARK);
|
||||||
mEditText = (EditText) findViewById(R.id.edit);
|
mEditText = (EditText) findViewById(R.id.edit);
|
||||||
mEditText.setFilters(new InputFilter[]{
|
mEditText.setFilters(new InputFilter[]{
|
||||||
|
@ -911,7 +911,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
|||||||
if (!mIsAnchor) {
|
if (!mIsAnchor) {
|
||||||
UserBean u = CommonAppConfig.getInstance().getUserBean();
|
UserBean u = CommonAppConfig.getInstance().getUserBean();
|
||||||
if (u != null && u.getLevel() < mDanMuLevel) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -948,7 +948,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
|||||||
if (!mIsAnchor) {
|
if (!mIsAnchor) {
|
||||||
UserBean u = CommonAppConfig.getInstance().getUserBean();
|
UserBean u = CommonAppConfig.getInstance().getUserBean();
|
||||||
if (u != null && u.getLevel() < mChatLevel) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1154,7 +1154,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
|||||||
ClipboardManager cm = (ClipboardManager) mContext.getSystemService(CLIPBOARD_SERVICE);
|
ClipboardManager cm = (ClipboardManager) mContext.getSystemService(CLIPBOARD_SERVICE);
|
||||||
ClipData clipData = ClipData.newPlainText("text", link);
|
ClipData clipData = ClipData.newPlainText("text", link);
|
||||||
cm.setPrimaryClip(clipData);
|
cm.setPrimaryClip(clipData);
|
||||||
ToastUtil.show(WordUtil.getString(R.string.copy_success));
|
ToastUtil.show(mContext.getString(R.string.copy_success));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package com.yunbao.live.activity;
|
package com.yunbao.live.activity;
|
||||||
|
|
||||||
|
import static com.tencent.trtc.TRTCCloudDef.TRTC_VIDEO_MIRROR_TYPE_DISABLE;
|
||||||
|
import static com.tencent.trtc.TRTCCloudDef.TRTC_VIDEO_MIRROR_TYPE_ENABLE;
|
||||||
|
import static com.yunbao.live.views.LivePushTxViewHolder.mTRTCCloud;
|
||||||
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
@ -24,6 +28,7 @@ import com.tencent.trtc.TRTCCloudDef;
|
|||||||
import com.yunbao.common.CommonAppConfig;
|
import com.yunbao.common.CommonAppConfig;
|
||||||
import com.yunbao.common.CommonAppContext;
|
import com.yunbao.common.CommonAppContext;
|
||||||
import com.yunbao.common.Constants;
|
import com.yunbao.common.Constants;
|
||||||
|
import com.yunbao.common.bean.LiveBean;
|
||||||
import com.yunbao.common.bean.UserBean;
|
import com.yunbao.common.bean.UserBean;
|
||||||
import com.yunbao.common.dialog.NotCancelableDialog;
|
import com.yunbao.common.dialog.NotCancelableDialog;
|
||||||
import com.yunbao.common.event.LoginInvalidEvent;
|
import com.yunbao.common.event.LoginInvalidEvent;
|
||||||
@ -32,14 +37,13 @@ import com.yunbao.common.http.CommonHttpUtil;
|
|||||||
import com.yunbao.common.http.HttpCallback;
|
import com.yunbao.common.http.HttpCallback;
|
||||||
import com.yunbao.common.http.HttpClient;
|
import com.yunbao.common.http.HttpClient;
|
||||||
import com.yunbao.common.http.JsonBean;
|
import com.yunbao.common.http.JsonBean;
|
||||||
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
import com.yunbao.common.utils.DateFormatUtil;
|
import com.yunbao.common.utils.DateFormatUtil;
|
||||||
import com.yunbao.common.utils.DialogUitl;
|
import com.yunbao.common.utils.DialogUitl;
|
||||||
import com.yunbao.common.utils.L;
|
import com.yunbao.common.utils.L;
|
||||||
import com.yunbao.common.utils.LogUtil;
|
import com.yunbao.common.utils.LogUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.common.bean.LiveBean;
|
|
||||||
import com.yunbao.live.bean.LiveGuardInfo;
|
import com.yunbao.live.bean.LiveGuardInfo;
|
||||||
import com.yunbao.live.bean.LiveKsyConfigBean;
|
import com.yunbao.live.bean.LiveKsyConfigBean;
|
||||||
import com.yunbao.live.dialog.LiveBeautyDialogFragment;
|
import com.yunbao.live.dialog.LiveBeautyDialogFragment;
|
||||||
@ -72,13 +76,10 @@ import org.greenrobot.eventbus.ThreadMode;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
import pl.droidsonroids.gif.GifImageView;
|
import pl.droidsonroids.gif.GifImageView;
|
||||||
|
|
||||||
import static com.tencent.trtc.TRTCCloudDef.TRTC_VIDEO_MIRROR_TYPE_DISABLE;
|
|
||||||
import static com.tencent.trtc.TRTCCloudDef.TRTC_VIDEO_MIRROR_TYPE_ENABLE;
|
|
||||||
import static com.yunbao.live.views.LivePushTxViewHolder.mTRTCCloud;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by cxf on 2018/10/7.
|
* Created by cxf on 2018/10/7.
|
||||||
* 主播直播间
|
* 主播直播间
|
||||||
@ -225,11 +226,11 @@ public class LiveAnchorActivity extends LiveActivity implements LiveFunctionClic
|
|||||||
if (leave == 0) {
|
if (leave == 0) {
|
||||||
leave = 1;
|
leave = 1;
|
||||||
mLivePushViewHolder.leave.setVisibility(View.VISIBLE);
|
mLivePushViewHolder.leave.setVisibility(View.VISIBLE);
|
||||||
sendSystemMessage(WordUtil.getString(R.string.live_anchor_leave));
|
sendSystemMessage(mContext.getString(R.string.live_anchor_leave));
|
||||||
} else {
|
} else {
|
||||||
leave = 0;
|
leave = 0;
|
||||||
mLivePushViewHolder.leave.setVisibility(View.GONE);
|
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")
|
HttpClient.getInstance().get("Live.isLeave", "Live.isLeave")
|
||||||
.params("isleave", leave)
|
.params("isleave", leave)
|
||||||
@ -276,7 +277,11 @@ public class LiveAnchorActivity extends LiveActivity implements LiveFunctionClic
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case Constants.LIVE_FUNC_WKS:
|
case Constants.LIVE_FUNC_WKS:
|
||||||
String url = CommonAppConfig.HOST + "/h5/activity/weekStar/index.html?&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid;
|
String url = CommonAppConfig.HOST
|
||||||
|
+ "/h5/activity/weekStar/index.html?&uid="
|
||||||
|
+ CommonAppConfig.getInstance().getUid() + "&token="
|
||||||
|
+ CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid
|
||||||
|
+ "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0");
|
||||||
ZhuangBanActivity.forward(mContext, url, false);
|
ZhuangBanActivity.forward(mContext, url, false);
|
||||||
break;
|
break;
|
||||||
case Constants.LIVE_FUNC_LINK_MIC://连麦
|
case Constants.LIVE_FUNC_LINK_MIC://连麦
|
||||||
@ -552,7 +557,7 @@ public class LiveAnchorActivity extends LiveActivity implements LiveFunctionClic
|
|||||||
* 关闭直播
|
* 关闭直播
|
||||||
*/
|
*/
|
||||||
public void closeLive() {
|
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
|
@Override
|
||||||
public void onConfirmClick(Dialog dialog, String content) {
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
endLive();
|
endLive();
|
||||||
@ -661,7 +666,7 @@ public class LiveAnchorActivity extends LiveActivity implements LiveFunctionClic
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Dialog createLoadingDialog() {
|
public Dialog createLoadingDialog() {
|
||||||
return DialogUitl.loadingDialog(mContext, WordUtil.getString(R.string.live_end_ing));
|
return DialogUitl.loadingDialog(mContext, mContext.getString(R.string.live_end_ing));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -728,7 +733,7 @@ public class LiveAnchorActivity extends LiveActivity implements LiveFunctionClic
|
|||||||
mLiveRoomViewHolder.anchorPause();
|
mLiveRoomViewHolder.anchorPause();
|
||||||
}
|
}
|
||||||
super.onPause();
|
super.onPause();
|
||||||
sendSystemMessage(WordUtil.getString(R.string.live_anchor_leave));
|
sendSystemMessage(mContext.getString(R.string.live_anchor_leave));
|
||||||
mPaused = true;
|
mPaused = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -739,7 +744,7 @@ public class LiveAnchorActivity extends LiveActivity implements LiveFunctionClic
|
|||||||
if (mLiveRoomViewHolder != null) {
|
if (mLiveRoomViewHolder != null) {
|
||||||
mLiveRoomViewHolder.anchorResume();
|
mLiveRoomViewHolder.anchorResume();
|
||||||
}
|
}
|
||||||
sendSystemMessage(WordUtil.getString(R.string.live_anchor_come_back));
|
sendSystemMessage(mContext.getString(R.string.live_anchor_come_back));
|
||||||
CommonHttpUtil.checkTokenInvalid();
|
CommonHttpUtil.checkTokenInvalid();
|
||||||
}
|
}
|
||||||
mPaused = false;
|
mPaused = false;
|
||||||
@ -761,7 +766,7 @@ public class LiveAnchorActivity extends LiveActivity implements LiveFunctionClic
|
|||||||
@Override
|
@Override
|
||||||
public void onSuperCloseLive() {
|
public void onSuperCloseLive() {
|
||||||
endLive();
|
endLive();
|
||||||
DialogUitl.showSimpleTipDialog(mContext, WordUtil.getString(R.string.live_illegal));
|
DialogUitl.showSimpleTipDialog(mContext, mContext.getString(R.string.live_illegal));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
@ -1073,7 +1078,7 @@ public class LiveAnchorActivity extends LiveActivity implements LiveFunctionClic
|
|||||||
printLog(DateFormatUtil.getCurTimeString2() + " <=== " + mReqCount + "----status=" + status + "\n");
|
printLog(DateFormatUtil.getCurTimeString2() + " <=== " + mReqCount + "----status=" + status + "\n");
|
||||||
if (status == 0) {
|
if (status == 0) {
|
||||||
NotCancelableDialog dialog = new NotCancelableDialog();
|
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() {
|
dialog.setActionListener(new NotCancelableDialog.ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onConfirmClick(Context context, DialogFragment dialog) {
|
public void onConfirmClick(Context context, DialogFragment dialog) {
|
||||||
|
@ -1235,7 +1235,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
if (micListener != null) {
|
if (micListener != null) {
|
||||||
micListener.updateMicList(mMicQueueList);
|
micListener.updateMicList(mMicQueueList);
|
||||||
DialogUitl.showSimpleDialog(mContext,
|
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() {
|
new DialogUitl.SimpleCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onConfirmClick(Dialog dialog, String content) {
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
|
@ -48,7 +48,7 @@ public class LiveBlackActivity extends AbsActivity implements OnItemClickListene
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void main() {
|
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);
|
mLiveUid = getIntent().getStringExtra(Constants.LIVE_UID);
|
||||||
if (TextUtils.isEmpty(mLiveUid)) {
|
if (TextUtils.isEmpty(mLiveUid)) {
|
||||||
return;
|
return;
|
||||||
|
@ -34,7 +34,7 @@ public class LiveChooseClassActivity extends AbsActivity implements OnItemClickL
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void main() {
|
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 = (RecyclerView) findViewById(R.id.recyclerView);
|
||||||
mRecyclerView.setHasFixedSize(true);
|
mRecyclerView.setHasFixedSize(true);
|
||||||
mRecyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
|
mRecyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
|
||||||
|
@ -45,7 +45,7 @@ public class LiveGuardListActivity extends AbsActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void main() {
|
protected void main() {
|
||||||
setTitle(WordUtil.getString(R.string.guard_list));
|
setTitle(mContext.getString(R.string.guard_list));
|
||||||
mToUid = getIntent().getStringExtra(Constants.TO_UID);
|
mToUid = getIntent().getStringExtra(Constants.TO_UID);
|
||||||
if (TextUtils.isEmpty(mToUid)) {
|
if (TextUtils.isEmpty(mToUid)) {
|
||||||
return;
|
return;
|
||||||
|
@ -35,7 +35,7 @@ public class LiveRecordActivity extends AbsActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void main() {
|
protected void main() {
|
||||||
setTitle(WordUtil.getString(R.string.live_record));
|
setTitle(mContext.getString(R.string.live_record));
|
||||||
mUserBean = getIntent().getParcelableExtra(Constants.USER_BEAN);
|
mUserBean = getIntent().getParcelableExtra(Constants.USER_BEAN);
|
||||||
if (mUserBean == null) {
|
if (mUserBean == null) {
|
||||||
return;
|
return;
|
||||||
|
@ -71,7 +71,7 @@ public class LiveReportActivity extends AbsActivity implements LiveReportAdapter
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void main() {
|
protected void main() {
|
||||||
setTitle(WordUtil.getString(R.string.report));
|
setTitle(mContext.getString(R.string.report));
|
||||||
mToUid = getIntent().getStringExtra(Constants.TO_UID);
|
mToUid = getIntent().getStringExtra(Constants.TO_UID);
|
||||||
mVideoId = getIntent().getStringExtra(Constants.VIDEO_ID);
|
mVideoId = getIntent().getStringExtra(Constants.VIDEO_ID);
|
||||||
mIntoIndex = getIntent().getIntExtra(Constants.INTOINDEX, 0);
|
mIntoIndex = getIntent().getIntExtra(Constants.INTOINDEX, 0);
|
||||||
|
@ -168,7 +168,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
|||||||
@Override
|
@Override
|
||||||
public void onTimer(String time) {
|
public void onTimer(String time) {
|
||||||
if (mLiveRoomViewHolder != null) {
|
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) {
|
public void onResourceReady(@NonNull Bitmap resource, @Nullable Transition<? super Bitmap> transition) {
|
||||||
|
|
||||||
boolean ret = RCRTCEngine.getInstance().getDefaultVideoStream().setWatermark(BitmapUtil.getInstance().convertMirror(resource), rect);
|
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
|
@Override
|
||||||
@ -552,7 +552,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
|||||||
leave_img.setVisibility(View.GONE);
|
leave_img.setVisibility(View.GONE);
|
||||||
// 清除水印
|
// 清除水印
|
||||||
boolean ret = RCRTCEngine.getInstance().getDefaultVideoStream().setWatermark(null, rect);
|
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")
|
HttpClient.getInstance().get("Live.isLeave", "Live.isLeave")
|
||||||
@ -861,7 +861,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
|||||||
* 关闭直播
|
* 关闭直播
|
||||||
*/
|
*/
|
||||||
public void closeLive() {
|
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
|
@Override
|
||||||
public void onConfirmClick(Dialog dialog, String content) {
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
PKing = false;
|
PKing = false;
|
||||||
@ -990,7 +990,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Dialog createLoadingDialog() {
|
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();
|
super.onPause();
|
||||||
// if (isKeyBack) {
|
// if (isKeyBack) {
|
||||||
// sendSystemMessage(WordUtil.getString(R.string.live_anchor_leave));
|
// sendSystemMessage(mContext.getString(R.string.live_anchor_leave));
|
||||||
// }
|
// }
|
||||||
// mPaused = true;
|
// mPaused = true;
|
||||||
}
|
}
|
||||||
@ -1100,7 +1100,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
|||||||
// if (mLiveRoomViewHolder != null) {
|
// if (mLiveRoomViewHolder != null) {
|
||||||
// mLiveRoomViewHolder.anchorResume();
|
// mLiveRoomViewHolder.anchorResume();
|
||||||
// }
|
// }
|
||||||
// sendSystemMessage(WordUtil.getString(R.string.live_anchor_come_back));
|
// sendSystemMessage(mContext.getString(R.string.live_anchor_come_back));
|
||||||
// CommonHttpUtil.checkTokenInvalid();
|
// CommonHttpUtil.checkTokenInvalid();
|
||||||
// }
|
// }
|
||||||
// mPaused = false;
|
// mPaused = false;
|
||||||
@ -1122,7 +1122,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
|||||||
@Override
|
@Override
|
||||||
public void onSuperCloseLive() {
|
public void onSuperCloseLive() {
|
||||||
endLive();
|
endLive();
|
||||||
DialogUitl.showSimpleTipDialog(mContext, WordUtil.getString(R.string.live_illegal));
|
DialogUitl.showSimpleTipDialog(mContext,mContext.getString(R.string.live_illegal));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
@ -1443,7 +1443,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
|||||||
printLog(DateFormatUtil.getCurTimeString2() + " <=== " + mReqCount + "----status=" + status + "\n");
|
printLog(DateFormatUtil.getCurTimeString2() + " <=== " + mReqCount + "----status=" + status + "\n");
|
||||||
if (status == 0) {
|
if (status == 0) {
|
||||||
NotCancelableDialog dialog = new NotCancelableDialog();
|
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() {
|
dialog.setActionListener(new NotCancelableDialog.ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onConfirmClick(Context context, DialogFragment dialog) {
|
public void onConfirmClick(Context context, DialogFragment dialog) {
|
||||||
@ -1526,7 +1526,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
|||||||
if (micListener != null) {
|
if (micListener != null) {
|
||||||
micListener.updateMicList(mMicQueueList);
|
micListener.updateMicList(mMicQueueList);
|
||||||
DialogUitl.showSimpleDialog(mContext,
|
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() {
|
new DialogUitl.SimpleCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onConfirmClick(Dialog dialog, String content) {
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
|
@ -48,7 +48,7 @@ public class LiveShutUpActivity extends AbsActivity implements OnItemClickListen
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void main() {
|
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);
|
mLiveUid = getIntent().getStringExtra(Constants.LIVE_UID);
|
||||||
if (TextUtils.isEmpty(mLiveUid)) {
|
if (TextUtils.isEmpty(mLiveUid)) {
|
||||||
return;
|
return;
|
||||||
|
@ -340,7 +340,7 @@ public class LiveTRTCAnchorActivity extends TRTCBaseActivity {
|
|||||||
* 密码房间
|
* 密码房间
|
||||||
*/
|
*/
|
||||||
private void onLiveTypePwd(final LiveRoomTypeBean bean) {
|
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
|
@Override
|
||||||
public void onConfirmClick(Dialog dialog, String content) {
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
if (TextUtils.isEmpty(content)) {
|
if (TextUtils.isEmpty(content)) {
|
||||||
|
@ -133,7 +133,7 @@ public class MedalQuestionWebViewActivity extends AbsActivity {
|
|||||||
intent.setData(MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
|
intent.setData(MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
|
||||||
}
|
}
|
||||||
intent.setType("image/*");
|
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)
|
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||||
|
@ -80,7 +80,7 @@ public class RoomManageActivity extends AbsActivity {
|
|||||||
});
|
});
|
||||||
mViewHolders = new AbsCommonViewHolder[PAGE_COUNT];
|
mViewHolders = new AbsCommonViewHolder[PAGE_COUNT];
|
||||||
mIndicator = (MagicIndicator) findViewById(R.id.indicator);
|
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 commonNavigator = new CommonNavigator(mContext);
|
||||||
commonNavigator.setAdapter(new CommonNavigatorAdapter() {
|
commonNavigator.setAdapter(new CommonNavigatorAdapter() {
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ public class RoomManageDetailActivity extends AbsActivity implements View.OnClic
|
|||||||
if (mAdminRoomBean == null) {
|
if (mAdminRoomBean == null) {
|
||||||
return;
|
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_shut_up).setOnClickListener(this);
|
||||||
findViewById(R.id.btn_user_black).setOnClickListener(this);
|
findViewById(R.id.btn_user_black).setOnClickListener(this);
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,7 @@ import com.yunbao.common.activity.AbsActivity;
|
|||||||
import com.yunbao.common.bean.LiveBean;
|
import com.yunbao.common.bean.LiveBean;
|
||||||
import com.yunbao.common.event.JavascriptInterfaceEvent;
|
import com.yunbao.common.event.JavascriptInterfaceEvent;
|
||||||
import com.yunbao.common.http.HttpCallback;
|
import com.yunbao.common.http.HttpCallback;
|
||||||
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
import com.yunbao.common.utils.Bus;
|
import com.yunbao.common.utils.Bus;
|
||||||
import com.yunbao.common.utils.DpUtil;
|
import com.yunbao.common.utils.DpUtil;
|
||||||
import com.yunbao.common.utils.JavascriptInterfaceUtils;
|
import com.yunbao.common.utils.JavascriptInterfaceUtils;
|
||||||
@ -45,6 +46,8 @@ import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
|||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
import org.greenrobot.eventbus.ThreadMode;
|
import org.greenrobot.eventbus.ThreadMode;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by cxf on 2018/9/25.
|
* Created by cxf on 2018/9/25.
|
||||||
* 我的徽章 h5页面
|
* 我的徽章 h5页面
|
||||||
@ -152,7 +155,7 @@ public class WebViewActivityMedal extends AbsActivity {
|
|||||||
mIvQuestion.setOnClickListener(new View.OnClickListener() {
|
mIvQuestion.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
MedalQuestionWebViewActivity.forward(mContext, HtmlConfig.MEDAL_QUESTION);
|
MedalQuestionWebViewActivity.forward(mContext, HtmlConfig.MEDAL_QUESTION + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -212,7 +215,7 @@ public class WebViewActivityMedal extends AbsActivity {
|
|||||||
intent.setData(MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
|
intent.setData(MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
|
||||||
}
|
}
|
||||||
intent.setType("image/*");
|
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)
|
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||||
|
@ -215,7 +215,7 @@ public class ZhuangBanActivity extends AbsActivity {
|
|||||||
intent.setData(MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
|
intent.setData(MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
|
||||||
}
|
}
|
||||||
intent.setType("image/*");
|
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)
|
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||||
|
@ -125,14 +125,14 @@ public class AnchorUserMicInfoAdapter extends RefreshAdapter<MicUserBean> {
|
|||||||
if (length <= 4) {
|
if (length <= 4) {
|
||||||
if (tag.getType() == TYPE_MIC_REQUEST) {
|
if (tag.getType() == TYPE_MIC_REQUEST) {
|
||||||
applyMic(tag, 4, createSocketSendBean());
|
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) {
|
} else if (tag.getType() == TYPE_MIC_INVITE) {
|
||||||
SocketSendBean bean = createSocketSendBean().param("targetId", tag.getId());
|
SocketSendBean bean = createSocketSendBean().param("targetId", tag.getId());
|
||||||
applyMic(tag, 1, bean);
|
applyMic(tag, 1, bean);
|
||||||
ToastUtil.show(WordUtil.getString(R.string.live_mic_invite));
|
ToastUtil.show(mContext.getString(R.string.live_mic_invite));
|
||||||
}
|
}
|
||||||
} else {
|
} 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
|
@Override
|
||||||
public void accept(ResponseModel<BaseModel> stringResponseModel) throws Exception {
|
public void accept(ResponseModel<BaseModel> stringResponseModel) throws Exception {
|
||||||
applyMic((MicUserBean) v.getTag(), 8, createSocketSendBean());
|
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();
|
}, Throwable::printStackTrace).isDisposed();
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ public class GuardAdapter extends RefreshAdapter<GuardUserBean> {
|
|||||||
this.isShowTitle = isShowTitle;
|
this.isShowTitle = isShowTitle;
|
||||||
mDialog = dialog;
|
mDialog = dialog;
|
||||||
mVotesName = CommonAppConfig.getInstance().getVotesName();
|
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);
|
mGuardDrawable0 = ContextCompat.getDrawable(context, R.mipmap.icon_guard_type_0);
|
||||||
mGuardDrawable1 = ContextCompat.getDrawable(context, R.mipmap.icon_guard_type_1);
|
mGuardDrawable1 = ContextCompat.getDrawable(context, R.mipmap.icon_guard_type_1);
|
||||||
mGuardDrawable2 = ContextCompat.getDrawable(context, R.mipmap.icon_guard_type_2);
|
mGuardDrawable2 = ContextCompat.getDrawable(context, R.mipmap.icon_guard_type_2);
|
||||||
|
@ -24,7 +24,7 @@ public class LiveAdminRoomAdapter extends RefreshAdapter<LiveAdminRoomBean> {
|
|||||||
|
|
||||||
public LiveAdminRoomAdapter(Context context) {
|
public LiveAdminRoomAdapter(Context context) {
|
||||||
super(context);
|
super(context);
|
||||||
mSuffix = WordUtil.getString(R.string.live_admin_room);
|
mSuffix =mContext.getString(R.string.live_admin_room);
|
||||||
mOnClickListener = new View.OnClickListener() {
|
mOnClickListener = new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
@ -177,7 +177,7 @@ public class LiveAnchorEditCallMeAdapter extends RecyclerView.Adapter<LiveAnchor
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.setShowNumber(false)
|
.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)
|
.setHideGiftType(true)
|
||||||
.showDialog()
|
.showDialog()
|
||||||
;
|
;
|
||||||
@ -250,7 +250,7 @@ public class LiveAnchorEditCallMeAdapter extends RecyclerView.Adapter<LiveAnchor
|
|||||||
super.setData(data, position);
|
super.setData(data, position);
|
||||||
if (StringUtil.isEmpty(data.getValue())) {
|
if (StringUtil.isEmpty(data.getValue())) {
|
||||||
contact.setTag(null);
|
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"));
|
contact.setTextColor(Color.parseColor("#80FFFFFF"));
|
||||||
} else {
|
} else {
|
||||||
contact.setTag(data.getValue());
|
contact.setTag(data.getValue());
|
||||||
@ -265,7 +265,7 @@ public class LiveAnchorEditCallMeAdapter extends RecyclerView.Adapter<LiveAnchor
|
|||||||
status.setTag(data.getStatus());
|
status.setTag(data.getStatus());
|
||||||
status.setOnClickListener(v -> {
|
status.setOnClickListener(v -> {
|
||||||
if (StringUtil.isEmpty((String) contact.getTag())) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
int tag = (int) v.getTag();
|
int tag = (int) v.getTag();
|
||||||
@ -286,7 +286,7 @@ public class LiveAnchorEditCallMeAdapter extends RecyclerView.Adapter<LiveAnchor
|
|||||||
public void onItemClick(String bean, int position) {
|
public void onItemClick(String bean, int position) {
|
||||||
if (StringUtil.isEmpty(bean)) {
|
if (StringUtil.isEmpty(bean)) {
|
||||||
contact.setTag(null);
|
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) {
|
if(position==0) {
|
||||||
contact.setTextColor(Color.parseColor("#80FFFFFF"));
|
contact.setTextColor(Color.parseColor("#80FFFFFF"));
|
||||||
}
|
}
|
||||||
|
@ -212,7 +212,7 @@ public class LiveGiftAdapter extends RecyclerView.Adapter<LiveGiftAdapter.Vh> {
|
|||||||
@Override
|
@Override
|
||||||
public void callback(File bean) {
|
public void callback(File bean) {
|
||||||
if(bean==null){
|
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);
|
mLoading.setImageResource(R.mipmap.icon_download_gift);
|
||||||
animation.setRepeatCount(0);
|
animation.setRepeatCount(0);
|
||||||
animation.setDuration(0);
|
animation.setDuration(0);
|
||||||
|
@ -114,7 +114,7 @@ public class LiveNewGuardBuyItemsAdapter extends RecyclerView.Adapter<LiveNewGua
|
|||||||
title.invalidate();
|
title.invalidate();
|
||||||
}
|
}
|
||||||
title.setTag(id);
|
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);
|
msg.setText(msgText + coin);
|
||||||
this.coin.setText(coin);
|
this.coin.setText(coin);
|
||||||
if (id == selectId) {
|
if (id == selectId) {
|
||||||
|
@ -39,7 +39,7 @@ public class LivePkAdapter extends RefreshAdapter<LivePkBean> {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
mLivePkInviteString = "PK";
|
mLivePkInviteString = "PK";
|
||||||
mLivePkInviteString2 = WordUtil.getString(R.string.live_pk_invite_2);
|
mLivePkInviteString2 =mContext.getString(R.string.live_pk_invite_2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@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.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);
|
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>"));
|
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'>" + WordUtil.getString(R.string.live_task_item_xp) + "</font>  <font color='#FFF69F'>" + task.getExp() + "</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) {
|
void setData(LiveUserMailBoxModel box, int position) {
|
||||||
userName.setText(box.getUserName());
|
userName.setText(box.getUserName());
|
||||||
topText.setText(String.format(WordUtil.getString(R.string.live_user_mailbox_top_text), box.getAnchorName()));
|
topText.setText(String.format(mContext.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()));
|
tipText.setText(String.format(mContext.getString(R.string.live_user_mailbox_tip_text), box.getAnchorName()));
|
||||||
del.setOnClickListener(v -> {
|
del.setOnClickListener(v -> {
|
||||||
new DialogUitl.Builder(mContext)
|
new DialogUitl.Builder(mContext)
|
||||||
.setTitle(WordUtil.getString(R.string.live_user_letter_dialog_title))
|
.setTitle(mContext.getString(R.string.live_user_letter_dialog_title))
|
||||||
.setContent(WordUtil.getString(R.string.live_user_letter_dialog_content))
|
.setContent(mContext.getString(R.string.live_user_letter_dialog_content))
|
||||||
.setConfrimString(WordUtil.getString(R.string.live_user_letter_dialog_yes))
|
.setConfrimString(mContext.getString(R.string.live_user_letter_dialog_yes))
|
||||||
.setCancelString(WordUtil.getString(R.string.live_user_letter_dialog_no))
|
.setCancelString(mContext.getString(R.string.live_user_letter_dialog_no))
|
||||||
.setView(R.layout.dialog_live_random_pk)
|
.setView(R.layout.dialog_live_random_pk)
|
||||||
.setCancelable(true)
|
.setCancelable(true)
|
||||||
.setClickCallback((dialog, content) -> LiveNetManager.get(mContext).delContactInfo(box.getId(), new HttpCallback<String>() {
|
.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;
|
mContext=context;
|
||||||
mList = list;
|
mList = list;
|
||||||
mInflater = LayoutInflater.from(context);
|
mInflater = LayoutInflater.from(context);
|
||||||
mTypeString1 = WordUtil.getString(R.string.red_pack_11);
|
mTypeString1 =mContext.getString(R.string.red_pack_11);
|
||||||
mTypeString2 = WordUtil.getString(R.string.red_pack_12);
|
mTypeString2 =mContext.getString(R.string.red_pack_12);
|
||||||
mOnClickListener = new View.OnClickListener() {
|
mOnClickListener = new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package com.yunbao.live.bean;
|
package com.yunbao.live.bean;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
import com.yunbao.common.utils.WordUtil;
|
import com.yunbao.common.utils.WordUtil;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
|
|
||||||
@ -58,14 +60,14 @@ public class GuardBuyBean {
|
|||||||
this.privilege = privilege;
|
this.privilege = privilege;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getShopName() {
|
public String getShopName(Context mContext) {
|
||||||
switch (this.id) {
|
switch (this.id) {
|
||||||
case 1:
|
case 1:
|
||||||
return WordUtil.getString(R.string.guard_name_1);
|
return mContext.getString(R.string.guard_name_1);
|
||||||
case 2:
|
case 2:
|
||||||
return WordUtil.getString(R.string.guard_name_2);
|
return mContext.getString(R.string.guard_name_2);
|
||||||
case 3:
|
case 3:
|
||||||
return WordUtil.getString(R.string.guard_name_3);
|
return mContext.getString(R.string.guard_name_3);
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ public class GiftPrizePoolFragment extends AbsDialogFragment implements View.OnC
|
|||||||
if (code == 0 && info.length > 0) {
|
if (code == 0 && info.length > 0) {
|
||||||
JSONObject obj = JSON.parseObject(info[0]);
|
JSONObject obj = JSON.parseObject(info[0]);
|
||||||
if (mLevel != null) {
|
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")));
|
obj.getString("level")));
|
||||||
}
|
}
|
||||||
if (mCoin != null) {
|
if (mCoin != null) {
|
||||||
|
@ -325,7 +325,7 @@ public class LiveBeautyDialogFragment extends AbsDialogFragment {
|
|||||||
// }
|
// }
|
||||||
// } else {
|
// } else {
|
||||||
BeautyFaceBean AUTOBEAUTY_NATURAL = new BeautyFaceBean();
|
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.setB_name(AutoBeautyType.AUTOBEAUTY_NATURAL);
|
||||||
AUTOBEAUTY_NATURAL.setImg_id(R.mipmap.beauty_ziran);
|
AUTOBEAUTY_NATURAL.setImg_id(R.mipmap.beauty_ziran);
|
||||||
AUTOBEAUTY_NATURAL.setValue(0);
|
AUTOBEAUTY_NATURAL.setValue(0);
|
||||||
@ -333,21 +333,21 @@ public class LiveBeautyDialogFragment extends AbsDialogFragment {
|
|||||||
beautifulList.add(AUTOBEAUTY_NATURAL);
|
beautifulList.add(AUTOBEAUTY_NATURAL);
|
||||||
|
|
||||||
BeautyFaceBean AUTOBEAUTY_CUTE = new BeautyFaceBean();
|
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.setB_name(AutoBeautyType.AUTOBEAUTY_CUTE);
|
||||||
AUTOBEAUTY_CUTE.setImg_id(R.mipmap.beauty_keai);
|
AUTOBEAUTY_CUTE.setImg_id(R.mipmap.beauty_keai);
|
||||||
AUTOBEAUTY_CUTE.setValue(0);
|
AUTOBEAUTY_CUTE.setValue(0);
|
||||||
beautifulList.add(AUTOBEAUTY_CUTE);
|
beautifulList.add(AUTOBEAUTY_CUTE);
|
||||||
|
|
||||||
BeautyFaceBean AUTOBEAUTY_GODDESS = new BeautyFaceBean();
|
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.setB_name(AutoBeautyType.AUTOBEAUTY_GODDESS);
|
||||||
AUTOBEAUTY_GODDESS.setImg_id(R.mipmap.beauty_nvshen);
|
AUTOBEAUTY_GODDESS.setImg_id(R.mipmap.beauty_nvshen);
|
||||||
AUTOBEAUTY_GODDESS.setValue(0);
|
AUTOBEAUTY_GODDESS.setValue(0);
|
||||||
beautifulList.add(AUTOBEAUTY_GODDESS);
|
beautifulList.add(AUTOBEAUTY_GODDESS);
|
||||||
|
|
||||||
BeautyFaceBean AUTOBEAUTY_PUREWHITE = new BeautyFaceBean();
|
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.setB_name(AutoBeautyType.AUTOBEAUTY_PUREWHITE);
|
||||||
AUTOBEAUTY_PUREWHITE.setImg_id(R.mipmap.beauty_jingbai);
|
AUTOBEAUTY_PUREWHITE.setImg_id(R.mipmap.beauty_jingbai);
|
||||||
AUTOBEAUTY_PUREWHITE.setValue(0);
|
AUTOBEAUTY_PUREWHITE.setValue(0);
|
||||||
@ -366,7 +366,7 @@ public class LiveBeautyDialogFragment extends AbsDialogFragment {
|
|||||||
beauty_seek.setProgress(beautyFaceList.get(0).getValue());
|
beauty_seek.setProgress(beautyFaceList.get(0).getValue());
|
||||||
} else {
|
} else {
|
||||||
BeautyFaceBean RUDDY = new BeautyFaceBean();
|
BeautyFaceBean RUDDY = new BeautyFaceBean();
|
||||||
RUDDY.setTitle(WordUtil.getString(R.string.rosy));
|
RUDDY.setTitle(mContext.getString(R.string.rosy));
|
||||||
RUDDY.setName(SimpleBeautyType.RUDDY);
|
RUDDY.setName(SimpleBeautyType.RUDDY);
|
||||||
RUDDY.setImg_id(R.mipmap.ruddy);
|
RUDDY.setImg_id(R.mipmap.ruddy);
|
||||||
RUDDY.setValue(64);
|
RUDDY.setValue(64);
|
||||||
@ -374,42 +374,42 @@ public class LiveBeautyDialogFragment extends AbsDialogFragment {
|
|||||||
beautyFaceList.add(RUDDY);
|
beautyFaceList.add(RUDDY);
|
||||||
|
|
||||||
BeautyFaceBean SKIN_WHITENING = new BeautyFaceBean();
|
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.setImg_id(R.mipmap.momo_mb);
|
||||||
SKIN_WHITENING.setName(SimpleBeautyType.SKIN_WHITENING);
|
SKIN_WHITENING.setName(SimpleBeautyType.SKIN_WHITENING);
|
||||||
SKIN_WHITENING.setValue(55);
|
SKIN_WHITENING.setValue(55);
|
||||||
beautyFaceList.add(SKIN_WHITENING);
|
beautyFaceList.add(SKIN_WHITENING);
|
||||||
|
|
||||||
BeautyFaceBean SKIN_SMOOTH = new BeautyFaceBean();
|
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.setImg_id(R.mipmap.momo_mp);
|
||||||
SKIN_SMOOTH.setName(SimpleBeautyType.SKIN_SMOOTH);
|
SKIN_SMOOTH.setName(SimpleBeautyType.SKIN_SMOOTH);
|
||||||
SKIN_SMOOTH.setValue(58);
|
SKIN_SMOOTH.setValue(58);
|
||||||
beautyFaceList.add(SKIN_SMOOTH);
|
beautyFaceList.add(SKIN_SMOOTH);
|
||||||
|
|
||||||
BeautyFaceBean BIG_EYE = new BeautyFaceBean();
|
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.setImg_id(R.mipmap.momo_dy);
|
||||||
BIG_EYE.setName(SimpleBeautyType.BIG_EYE);
|
BIG_EYE.setName(SimpleBeautyType.BIG_EYE);
|
||||||
BIG_EYE.setValue(52);
|
BIG_EYE.setValue(52);
|
||||||
beautyFaceList.add(BIG_EYE);
|
beautyFaceList.add(BIG_EYE);
|
||||||
|
|
||||||
BeautyFaceBean THIN_FACE = new BeautyFaceBean();
|
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.setImg_id(R.mipmap.momo_sl);
|
||||||
THIN_FACE.setName(SimpleBeautyType.THIN_FACE);
|
THIN_FACE.setName(SimpleBeautyType.THIN_FACE);
|
||||||
THIN_FACE.setValue(52);
|
THIN_FACE.setValue(52);
|
||||||
beautyFaceList.add(THIN_FACE);
|
beautyFaceList.add(THIN_FACE);
|
||||||
|
|
||||||
BeautyFaceBean JAW_SHAPE = new BeautyFaceBean();
|
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.setImg_id(R.mipmap.momo_xl);
|
||||||
JAW_SHAPE.setName(SimpleBeautyType.JAW_SHAPE);
|
JAW_SHAPE.setName(SimpleBeautyType.JAW_SHAPE);
|
||||||
JAW_SHAPE.setValue(38);
|
JAW_SHAPE.setValue(38);
|
||||||
beautyFaceList.add(JAW_SHAPE);
|
beautyFaceList.add(JAW_SHAPE);
|
||||||
|
|
||||||
BeautyFaceBean CHIN_LENGTH = new BeautyFaceBean();
|
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.setName(SimpleBeautyType.CHIN_LENGTH);
|
||||||
CHIN_LENGTH.setImg_id(R.mipmap.chin);
|
CHIN_LENGTH.setImg_id(R.mipmap.chin);
|
||||||
CHIN_LENGTH.setValue(39);
|
CHIN_LENGTH.setValue(39);
|
||||||
@ -417,7 +417,7 @@ public class LiveBeautyDialogFragment extends AbsDialogFragment {
|
|||||||
|
|
||||||
|
|
||||||
BeautyFaceBean NOSE_SIZE = new BeautyFaceBean();
|
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.setName(SimpleBeautyType.NOSE_SIZE);
|
||||||
NOSE_SIZE.setImg_id(R.mipmap.nose_size);
|
NOSE_SIZE.setImg_id(R.mipmap.nose_size);
|
||||||
NOSE_SIZE.setValue(55);
|
NOSE_SIZE.setValue(55);
|
||||||
@ -425,21 +425,21 @@ public class LiveBeautyDialogFragment extends AbsDialogFragment {
|
|||||||
|
|
||||||
|
|
||||||
BeautyFaceBean MOUTH_SIZE = new BeautyFaceBean();
|
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.setName(SimpleBeautyType.MOUTH_SIZE);
|
||||||
MOUTH_SIZE.setImg_id(R.mipmap.lip_size);
|
MOUTH_SIZE.setImg_id(R.mipmap.lip_size);
|
||||||
MOUTH_SIZE.setValue(45);
|
MOUTH_SIZE.setValue(45);
|
||||||
beautyFaceList.add(MOUTH_SIZE);
|
beautyFaceList.add(MOUTH_SIZE);
|
||||||
|
|
||||||
BeautyFaceBean EYE_BRIGHT = new BeautyFaceBean();
|
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.setName(SimpleBeautyType.EYE_BRIGHT);
|
||||||
EYE_BRIGHT.setImg_id(R.mipmap.bright_eyes);
|
EYE_BRIGHT.setImg_id(R.mipmap.bright_eyes);
|
||||||
EYE_BRIGHT.setValue(36);
|
EYE_BRIGHT.setValue(36);
|
||||||
beautyFaceList.add(EYE_BRIGHT);
|
beautyFaceList.add(EYE_BRIGHT);
|
||||||
|
|
||||||
BeautyFaceBean TEETH_WHITE = new BeautyFaceBean();
|
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.setName(SimpleBeautyType.TEETH_WHITE);
|
||||||
TEETH_WHITE.setImg_id(R.mipmap.white_teeth);
|
TEETH_WHITE.setImg_id(R.mipmap.white_teeth);
|
||||||
TEETH_WHITE.setValue(39);
|
TEETH_WHITE.setValue(39);
|
||||||
@ -461,7 +461,7 @@ public class LiveBeautyDialogFragment extends AbsDialogFragment {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
BeautyFaceBean ZR = new BeautyFaceBean();
|
BeautyFaceBean ZR = new BeautyFaceBean();
|
||||||
ZR.setTitle(WordUtil.getString(R.string.light));
|
ZR.setTitle(mContext.getString(R.string.light));
|
||||||
ZR.setPaths("zr");
|
ZR.setPaths("zr");
|
||||||
ZR.setValue(0);
|
ZR.setValue(0);
|
||||||
ZR.setImg_id(R.mipmap.filter_ziran);
|
ZR.setImg_id(R.mipmap.filter_ziran);
|
||||||
@ -469,28 +469,28 @@ public class LiveBeautyDialogFragment extends AbsDialogFragment {
|
|||||||
filterList.add(ZR);
|
filterList.add(ZR);
|
||||||
|
|
||||||
BeautyFaceBean BX = new BeautyFaceBean();
|
BeautyFaceBean BX = new BeautyFaceBean();
|
||||||
BX.setTitle(WordUtil.getString(R.string.white));
|
BX.setTitle(mContext.getString(R.string.white));
|
||||||
BX.setPaths("bx");
|
BX.setPaths("bx");
|
||||||
BX.setValue(0);
|
BX.setValue(0);
|
||||||
BX.setImg_id(R.mipmap.filter_baixixx);
|
BX.setImg_id(R.mipmap.filter_baixixx);
|
||||||
filterList.add(BX);
|
filterList.add(BX);
|
||||||
|
|
||||||
BeautyFaceBean RX = new BeautyFaceBean();
|
BeautyFaceBean RX = new BeautyFaceBean();
|
||||||
RX.setTitle(WordUtil.getString(R.string.jp));
|
RX.setTitle(mContext.getString(R.string.jp));
|
||||||
RX.setPaths("rx");
|
RX.setPaths("rx");
|
||||||
RX.setValue(0);
|
RX.setValue(0);
|
||||||
RX.setImg_id(R.mipmap.filter_rii);
|
RX.setImg_id(R.mipmap.filter_rii);
|
||||||
filterList.add(RX);
|
filterList.add(RX);
|
||||||
|
|
||||||
BeautyFaceBean HB = new BeautyFaceBean();
|
BeautyFaceBean HB = new BeautyFaceBean();
|
||||||
HB.setTitle(WordUtil.getString(R.string.bw));
|
HB.setTitle(mContext.getString(R.string.bw));
|
||||||
HB.setPaths("hb");
|
HB.setPaths("hb");
|
||||||
HB.setImg_id(R.mipmap.filter_heibai);
|
HB.setImg_id(R.mipmap.filter_heibai);
|
||||||
HB.setValue(0);
|
HB.setValue(0);
|
||||||
filterList.add(HB);
|
filterList.add(HB);
|
||||||
|
|
||||||
BeautyFaceBean RH = new BeautyFaceBean();
|
BeautyFaceBean RH = new BeautyFaceBean();
|
||||||
RH.setTitle(WordUtil.getString(R.string.soft));
|
RH.setTitle(mContext.getString(R.string.soft));
|
||||||
|
|
||||||
RX.setPaths("rh");
|
RX.setPaths("rh");
|
||||||
RH.setImg_id(R.mipmap.filter_rouhe);
|
RH.setImg_id(R.mipmap.filter_rouhe);
|
||||||
@ -498,14 +498,14 @@ public class LiveBeautyDialogFragment extends AbsDialogFragment {
|
|||||||
filterList.add(RH);
|
filterList.add(RH);
|
||||||
|
|
||||||
BeautyFaceBean RG = new BeautyFaceBean();
|
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.setImg_id(R.mipmap.filter_nuanguang);
|
||||||
RG.setPaths("rg");
|
RG.setPaths("rg");
|
||||||
RG.setValue(0);
|
RG.setValue(0);
|
||||||
filterList.add(RG);
|
filterList.add(RG);
|
||||||
|
|
||||||
BeautyFaceBean FG = new BeautyFaceBean();
|
BeautyFaceBean FG = new BeautyFaceBean();
|
||||||
FG.setTitle(WordUtil.getString(R.string.retro));
|
FG.setTitle(mContext.getString(R.string.retro));
|
||||||
FG.setPaths("fg");
|
FG.setPaths("fg");
|
||||||
FG.setImg_id(R.mipmap.filter_fugu);
|
FG.setImg_id(R.mipmap.filter_fugu);
|
||||||
FG.setValue(0);
|
FG.setValue(0);
|
||||||
@ -513,7 +513,7 @@ public class LiveBeautyDialogFragment extends AbsDialogFragment {
|
|||||||
|
|
||||||
|
|
||||||
BeautyFaceBean HX = new BeautyFaceBean();
|
BeautyFaceBean HX = new BeautyFaceBean();
|
||||||
HX.setTitle(WordUtil.getString(R.string.flower));
|
HX.setTitle(mContext.getString(R.string.flower));
|
||||||
HX.setPaths("hx");
|
HX.setPaths("hx");
|
||||||
HX.setImg_id(R.mipmap.filter_huaxiang);
|
HX.setImg_id(R.mipmap.filter_huaxiang);
|
||||||
HX.setValue(0);
|
HX.setValue(0);
|
||||||
@ -521,49 +521,49 @@ public class LiveBeautyDialogFragment extends AbsDialogFragment {
|
|||||||
|
|
||||||
|
|
||||||
BeautyFaceBean QY = new BeautyFaceBean();
|
BeautyFaceBean QY = new BeautyFaceBean();
|
||||||
QY.setTitle(WordUtil.getString(R.string.easy));
|
QY.setTitle(mContext.getString(R.string.easy));
|
||||||
QY.setPaths("qy");
|
QY.setPaths("qy");
|
||||||
QY.setImg_id(R.mipmap.filter_qingyang);
|
QY.setImg_id(R.mipmap.filter_qingyang);
|
||||||
QY.setValue(0);
|
QY.setValue(0);
|
||||||
filterList.add(QY);
|
filterList.add(QY);
|
||||||
|
|
||||||
BeautyFaceBean YQ = new BeautyFaceBean();
|
BeautyFaceBean YQ = new BeautyFaceBean();
|
||||||
YQ.setTitle(WordUtil.getString(R.string.vitality));
|
YQ.setTitle(mContext.getString(R.string.vitality));
|
||||||
YQ.setPaths("yq");
|
YQ.setPaths("yq");
|
||||||
YQ.setImg_id(R.mipmap.filter_yuanqi);
|
YQ.setImg_id(R.mipmap.filter_yuanqi);
|
||||||
YQ.setValue(0);
|
YQ.setValue(0);
|
||||||
filterList.add(YQ);
|
filterList.add(YQ);
|
||||||
|
|
||||||
BeautyFaceBean XM = new BeautyFaceBean();
|
BeautyFaceBean XM = new BeautyFaceBean();
|
||||||
XM.setTitle(WordUtil.getString(R.string.bright));
|
XM.setTitle(mContext.getString(R.string.bright));
|
||||||
XM.setPaths("xm");
|
XM.setPaths("xm");
|
||||||
XM.setImg_id(R.mipmap.filter_xianming);
|
XM.setImg_id(R.mipmap.filter_xianming);
|
||||||
XM.setValue(0);
|
XM.setValue(0);
|
||||||
filterList.add(XM);
|
filterList.add(XM);
|
||||||
|
|
||||||
BeautyFaceBean ML = new BeautyFaceBean();
|
BeautyFaceBean ML = new BeautyFaceBean();
|
||||||
ML.setTitle(WordUtil.getString(R.string.bright));
|
ML.setTitle(mContext.getString(R.string.bright));
|
||||||
ML.setPaths("ml");
|
ML.setPaths("ml");
|
||||||
ML.setImg_id(R.mipmap.filter_mingliang);
|
ML.setImg_id(R.mipmap.filter_mingliang);
|
||||||
ML.setValue(0);
|
ML.setValue(0);
|
||||||
filterList.add(ML);
|
filterList.add(ML);
|
||||||
|
|
||||||
BeautyFaceBean SH = new BeautyFaceBean();
|
BeautyFaceBean SH = new BeautyFaceBean();
|
||||||
SH.setTitle(WordUtil.getString(R.string.deep));
|
SH.setTitle(mContext.getString(R.string.deep));
|
||||||
SH.setPaths("sh");
|
SH.setPaths("sh");
|
||||||
SH.setImg_id(R.mipmap.filter_shenhai);
|
SH.setImg_id(R.mipmap.filter_shenhai);
|
||||||
SH.setValue(0);
|
SH.setValue(0);
|
||||||
filterList.add(SH);
|
filterList.add(SH);
|
||||||
|
|
||||||
BeautyFaceBean XY = new BeautyFaceBean();
|
BeautyFaceBean XY = new BeautyFaceBean();
|
||||||
XY.setTitle(WordUtil.getString(R.string.sunset));
|
XY.setTitle(mContext.getString(R.string.sunset));
|
||||||
XY.setPaths("xy");
|
XY.setPaths("xy");
|
||||||
XY.setImg_id(R.mipmap.filter_xiyang);
|
XY.setImg_id(R.mipmap.filter_xiyang);
|
||||||
XY.setValue(0);
|
XY.setValue(0);
|
||||||
filterList.add(XY);
|
filterList.add(XY);
|
||||||
|
|
||||||
BeautyFaceBean ZY = new BeautyFaceBean();
|
BeautyFaceBean ZY = new BeautyFaceBean();
|
||||||
ZY.setTitle(WordUtil.getString(R.string.cure));
|
ZY.setTitle(mContext.getString(R.string.cure));
|
||||||
ZY.setPaths("zy");
|
ZY.setPaths("zy");
|
||||||
ZY.setImg_id(R.mipmap.filter_zhiyu);
|
ZY.setImg_id(R.mipmap.filter_zhiyu);
|
||||||
ZY.setValue(0);
|
ZY.setValue(0);
|
||||||
|
@ -62,28 +62,28 @@ public class LiveDataInfoDialog extends AbsDialogPopupWindow {
|
|||||||
|
|
||||||
private void initData() {
|
private void initData() {
|
||||||
list = new ArrayList<>();
|
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("#00FFFF",getContext().getString(R.string.live_data_coin),getContext().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("#FFF69F",getContext().getString(R.string.live_data_gold),getContext().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(getContext().getString(R.string.live_data_accept),getContext().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(getContext().getString(R.string.live_data_enter),getContext().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(getContext().getString(R.string.live_data_attention),getContext().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(getContext().getString(R.string.live_data_attention_rate),getContext().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(getContext().getString(R.string.live_data_fan_group),getContext().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(getContext().getString(R.string.live_data_fan_group_rate),getContext().getString(R.string.live_data_loading)));
|
||||||
adapter.setList(list);
|
adapter.setList(list);
|
||||||
LiveNetManager.get(getContext())
|
LiveNetManager.get(getContext())
|
||||||
.getLiveData(liveUid, new HttpCallback<com.yunbao.common.bean.LiveDataInfoModel>() {
|
.getLiveData(liveUid, new HttpCallback<com.yunbao.common.bean.LiveDataInfoModel>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(com.yunbao.common.bean.LiveDataInfoModel data) {
|
public void onSuccess(com.yunbao.common.bean.LiveDataInfoModel data) {
|
||||||
list.clear();
|
list.clear();
|
||||||
list.add(new LiveDataInfoModel("#00FFFF", WordUtil.getString(R.string.live_data_coin), data.getTotalCoin() + ""));
|
list.add(new LiveDataInfoModel("#00FFFF",getContext().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("#FFF69F",getContext().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(getContext().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(getContext().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(getContext().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(getContext().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(getContext().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(getContext().getString(R.string.live_data_fan_group_rate), data.getFanGroupNumRate() + ""));
|
||||||
adapter.setList(list);
|
adapter.setList(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -181,14 +181,14 @@ public class LiveFansMedalDialogFragment extends AbsDialogFragment implements Vi
|
|||||||
// mFans.setText(LiveTextRender.renderLiveUserDialogData(obj.getLongValue("fans")));
|
// mFans.setText(LiveTextRender.renderLiveUserDialogData(obj.getLongValue("fans")));
|
||||||
// mConsume.setText(LiveTextRender.renderLiveUserDialogData(obj.getLongValue("consumption")));
|
// mConsume.setText(LiveTextRender.renderLiveUserDialogData(obj.getLongValue("consumption")));
|
||||||
// mVotes.setText(LiveTextRender.renderLiveUserDialogData(obj.getLongValue("votestotal")));
|
// mVotes.setText(LiveTextRender.renderLiveUserDialogData(obj.getLongValue("votestotal")));
|
||||||
// mConsumeTip.setText(WordUtil.getString(R.string.live_user_send) + appConfig.getCoinName());
|
// mConsumeTip.setText(mContext.getString(R.string.live_user_send) + appConfig.getCoinName());
|
||||||
// mVotesTip.setText(WordUtil.getString(R.string.live_user_get) + appConfig.getVotesName());
|
// mVotesTip.setText(mContext.getString(R.string.live_user_get) + appConfig.getVotesName());
|
||||||
// if (mType == TYPE_AUD_ANC) {
|
// if (mType == TYPE_AUD_ANC) {
|
||||||
// showImpress(obj.getString("label"));
|
// showImpress(obj.getString("label"));
|
||||||
// }
|
// }
|
||||||
// mFollowing = obj.getIntValue("isattention") == 1;
|
// mFollowing = obj.getIntValue("isattention") == 1;
|
||||||
// if (mFollowText != null) {
|
// 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) {
|
// if (mFollowImage != null) {
|
||||||
// mFollowImage.setImageDrawable(mFollowing ? mFollowDrawable : mUnFollowDrawable);
|
// mFollowImage.setImageDrawable(mFollowing ? mFollowDrawable : mUnFollowDrawable);
|
||||||
@ -306,7 +306,7 @@ public class LiveFansMedalDialogFragment extends AbsDialogFragment implements Vi
|
|||||||
// }
|
// }
|
||||||
// if (isAttention == 1 && mLiveUid.equals(mToUid)) {//关注了主播
|
// if (isAttention == 1 && mLiveUid.equals(mToUid)) {//关注了主播
|
||||||
// ((LiveActivity) mContext).sendSystemMessage(
|
// ((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) {
|
if (bundle != null) {
|
||||||
mLiveUid = bundle.getString(Constants.LIVE_UID);
|
mLiveUid = bundle.getString(Constants.LIVE_UID);
|
||||||
mStream = bundle.getString(Constants.STREAM);
|
mStream = bundle.getString(Constants.STREAM);
|
||||||
String coinName = WordUtil.getString(R.string.diamond);
|
String coinName =mContext.getString(R.string.diamond);
|
||||||
mCoinName = coinName;
|
mCoinName = coinName;
|
||||||
mCoinNameTextView.setText(WordUtil.getString(R.string.guard_my) + coinName + ":");
|
mCoinNameTextView.setText(mContext.getString(R.string.guard_my) + coinName + ":");
|
||||||
}
|
}
|
||||||
LiveHttpUtil.getGuardBuyList(new HttpCallback() {
|
LiveHttpUtil.getGuardBuyList(new HttpCallback() {
|
||||||
@Override
|
@Override
|
||||||
@ -258,7 +258,7 @@ public class LiveGuardBuyDialogFragment extends AbsDialogFragment implements Vie
|
|||||||
}
|
}
|
||||||
Log.d("ffffff", "" + mLiveGuardInfo.getMyGuardType() + " " + mTargetBuyBean.getType());
|
Log.d("ffffff", "" + mLiveGuardInfo.getMyGuardType() + " " + mTargetBuyBean.getType());
|
||||||
if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_MONTH && mTargetBuyBean.getType() == Constants.GUARD_TYPE_DAY) {
|
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;
|
return;
|
||||||
} else if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_YEAR && mTargetBuyBean.getType() == Constants.GUARD_TYPE_DAY) {
|
} else if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_YEAR && mTargetBuyBean.getType() == Constants.GUARD_TYPE_DAY) {
|
||||||
DialogUitl.showSimpleTipDialog(mContext, "您為當前主播的年守護無法開通周守護");
|
DialogUitl.showSimpleTipDialog(mContext, "您為當前主播的年守護無法開通周守護");
|
||||||
@ -269,7 +269,7 @@ public class LiveGuardBuyDialogFragment extends AbsDialogFragment implements Vie
|
|||||||
} else {
|
} else {
|
||||||
if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_MONTH
|
if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_MONTH
|
||||||
&& mTargetBuyBean.getType() == Constants.GUARD_TYPE_YEAR) {
|
&& 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
|
@Override
|
||||||
public void onConfirmClick(Dialog dialog, String content) {
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
doBuyGuard();
|
doBuyGuard();
|
||||||
@ -308,7 +308,7 @@ public class LiveGuardBuyDialogFragment extends AbsDialogFragment implements Vie
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
DialogUitl.showSimpleDialog(mContext,
|
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() {
|
new DialogUitl.SimpleCallback() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -87,7 +87,7 @@ public class LiveGuardDialogFragment extends AbsDialogFragment implements View.O
|
|||||||
if (mIsAnchor) {
|
if (mIsAnchor) {
|
||||||
mBottom.setVisibility(View.GONE);
|
mBottom.setVisibility(View.GONE);
|
||||||
if (mLiveGuardInfo != null) {
|
if (mLiveGuardInfo != null) {
|
||||||
mGuardNum.setText(WordUtil.getString(R.string.guard_guard) + "(" + mLiveGuardInfo.getGuardNum() + ")");
|
mGuardNum.setText(mContext.getString(R.string.guard_guard) + "(" + mLiveGuardInfo.getGuardNum() + ")");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
mTip = (TextView) mRootView.findViewById(R.id.tip);
|
mTip = (TextView) mRootView.findViewById(R.id.tip);
|
||||||
@ -100,18 +100,18 @@ public class LiveGuardDialogFragment extends AbsDialogFragment implements View.O
|
|||||||
return false;
|
return false;
|
||||||
});*/
|
});*/
|
||||||
if (mLiveGuardInfo != null) {
|
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();
|
int guardType = mLiveGuardInfo.getMyGuardType();
|
||||||
if (guardType == Constants.GUARD_TYPE_NONE) {
|
if (guardType == Constants.GUARD_TYPE_NONE) {
|
||||||
mTip.setText(R.string.guard_tip_0);
|
mTip.setText(R.string.guard_tip_0);
|
||||||
} else if (guardType == Constants.GUARD_TYPE_DAY) {
|
} 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);
|
mBtnBuy.setText(R.string.guard_buy_3);
|
||||||
} else if (guardType == Constants.GUARD_TYPE_MONTH) {
|
} 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);
|
mBtnBuy.setText(R.string.guard_buy_3);
|
||||||
} else if (guardType == Constants.GUARD_TYPE_YEAR) {
|
} 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);
|
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 danmuPrice = bundle.getString(Constants.LIVE_DANMU_PRICE);
|
||||||
String coinName = bundle.getString(Constants.COIN_NAME);
|
String coinName = bundle.getString(Constants.COIN_NAME);
|
||||||
mLiveUid = bundle.getString(Constants.LIVE_UID);
|
mLiveUid = bundle.getString(Constants.LIVE_UID);
|
||||||
mHint1 = WordUtil.getString(R.string.live_open_alba) + danmuPrice + coinName + "/" + WordUtil.getString(R.string.live_tiao);
|
mHint1 =mContext.getString(R.string.live_open_alba) + danmuPrice + coinName + "/" +mContext.getString(R.string.live_tiao);
|
||||||
mHint2 = WordUtil.getString(R.string.live_say_something);
|
mHint2 =mContext.getString(R.string.live_say_something);
|
||||||
mCheckBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
mCheckBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onCheckedChanged(CompoundButton button, boolean isChecked) {
|
public void onCheckedChanged(CompoundButton button, boolean isChecked) {
|
||||||
@ -312,7 +312,7 @@ public class LiveInputDialogFragment extends AbsDialogFragment implements View.O
|
|||||||
messageType = SendMessageType.POPUPSCREEN;
|
messageType = SendMessageType.POPUPSCREEN;
|
||||||
} else {
|
} else {
|
||||||
radioButton.setCompoundDrawablesRelativeWithIntrinsicBounds(worldHornP, null, null, null);
|
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;
|
messageType = SendMessageType.WORLDHORN;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.yunbao.live.dialog;
|
package com.yunbao.live.dialog;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.Html;
|
import android.text.Html;
|
||||||
@ -173,10 +174,10 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
|
|||||||
mAncherIcon = bundle.getString(Constants.LIVE_ANCHER_ICON);
|
mAncherIcon = bundle.getString(Constants.LIVE_ANCHER_ICON);
|
||||||
mUserIcon = bundle.getString(Constants.USER_ICON);
|
mUserIcon = bundle.getString(Constants.USER_ICON);
|
||||||
showBuyView = bundle.getBoolean("showBuyView", true);
|
showBuyView = bundle.getBoolean("showBuyView", true);
|
||||||
String coinName = WordUtil.getString(R.string.diamond);
|
String coinName =mContext.getString(R.string.diamond);
|
||||||
mCoinName = coinName;
|
mCoinName = coinName;
|
||||||
isEmpty = bundle.getBoolean("guard", true);
|
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);
|
mCoinNameTextView.setText(R.string.favoriteanchor);
|
||||||
anchorName.setText(String.format(mContext.getString(R.string.theguardianof), mAncherName));
|
anchorName.setText(String.format(mContext.getString(R.string.theguardianof), mAncherName));
|
||||||
}
|
}
|
||||||
@ -193,7 +194,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
mCoin.setText(String.valueOf(mCoinVal));
|
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);
|
buyItemsAdapter.setItems(mBuyList);
|
||||||
mGuardRightAdapter.setList(mRightList);
|
mGuardRightAdapter.setList(mRightList);
|
||||||
buyItemsAdapter.notifyDataSetChanged();
|
buyItemsAdapter.notifyDataSetChanged();
|
||||||
@ -326,7 +327,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
|
|||||||
}
|
}
|
||||||
Log.d("ffffff", "" + mLiveGuardInfo.getMyGuardType() + " " + mTargetBuyBean.getType());
|
Log.d("ffffff", "" + mLiveGuardInfo.getMyGuardType() + " " + mTargetBuyBean.getType());
|
||||||
if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_MONTH && mTargetBuyBean.getType() == Constants.GUARD_TYPE_DAY) {
|
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;
|
return;
|
||||||
} else if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_YEAR && mTargetBuyBean.getType() == Constants.GUARD_TYPE_DAY) {
|
} else if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_YEAR && mTargetBuyBean.getType() == Constants.GUARD_TYPE_DAY) {
|
||||||
DialogUitl.showSimpleTipDialog(mContext, "您為當前主播的年守護無法開通周守護");
|
DialogUitl.showSimpleTipDialog(mContext, "您為當前主播的年守護無法開通周守護");
|
||||||
@ -337,7 +338,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
|
|||||||
} else {
|
} else {
|
||||||
if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_MONTH
|
if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_MONTH
|
||||||
&& mTargetBuyBean.getType() == Constants.GUARD_TYPE_YEAR) {
|
&& 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
|
@Override
|
||||||
public void onConfirmClick(Dialog dialog, String content) {
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
doBuyGuard();
|
doBuyGuard();
|
||||||
@ -418,7 +419,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
|
|||||||
bean = datum;
|
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(),
|
bean.getName(),
|
||||||
"###",//占位符
|
"###",//占位符
|
||||||
"###"
|
"###"
|
||||||
@ -435,9 +436,9 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
|
|||||||
Dialog dialog = new DialogUitl.Builder(mContext)
|
Dialog dialog = new DialogUitl.Builder(mContext)
|
||||||
.setHtmlCode(content)
|
.setHtmlCode(content)
|
||||||
.setView(R.layout.dialog_live_random_pk)
|
.setView(R.layout.dialog_live_random_pk)
|
||||||
.setTitle(WordUtil.getString(R.string.dialog_tip))
|
.setTitle(mContext.getString(R.string.dialog_tip))
|
||||||
.setCancelString(WordUtil.getString(R.string.live_use_discount_no))
|
.setCancelString(mContext.getString(R.string.live_use_discount_no))
|
||||||
.setConfrimString(WordUtil.getString(R.string.live_use_discount_yes))
|
.setConfrimString(mContext.getString(R.string.live_use_discount_yes))
|
||||||
.setClickCallback(new DialogUitl.SimpleCallback2() {
|
.setClickCallback(new DialogUitl.SimpleCallback2() {
|
||||||
@Override
|
@Override
|
||||||
public void onCancelClick() {
|
public void onCancelClick() {
|
||||||
@ -463,7 +464,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
|
|||||||
|
|
||||||
private void buy() {
|
private void buy() {
|
||||||
DialogUitl.showSimpleDialog(mContext,
|
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() {
|
new DialogUitl.SimpleCallback() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -194,7 +194,7 @@ public class LiveNewGuardListDialogFragment extends AbsDialogFragment implements
|
|||||||
ImgLoader.display(mContext, bean.getAvatar(), guardIcon);
|
ImgLoader.display(mContext, bean.getAvatar(), guardIcon);
|
||||||
guardIcon.setVisibility(View.VISIBLE);
|
guardIcon.setVisibility(View.VISIBLE);
|
||||||
userName.setText(bean.getUserNiceName());
|
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());
|
userGuard.setText(guardString + " " + bean.getContribute());
|
||||||
userSex.setImageResource(CommonIconUtil.getSexIcon(bean.getSex()));
|
userSex.setImageResource(CommonIconUtil.getSexIcon(bean.getSex()));
|
||||||
LevelBean levelBean = CommonAppConfig.getInstance().getLevel(bean.getLevel());
|
LevelBean levelBean = CommonAppConfig.getInstance().getLevel(bean.getLevel());
|
||||||
@ -207,13 +207,13 @@ public class LiveNewGuardListDialogFragment extends AbsDialogFragment implements
|
|||||||
if (guardType == Constants.GUARD_TYPE_NONE) {
|
if (guardType == Constants.GUARD_TYPE_NONE) {
|
||||||
tip1.setText(R.string.guard_tip_0);
|
tip1.setText(R.string.guard_tip_0);
|
||||||
} else if (guardType == Constants.GUARD_TYPE_DAY) {
|
} 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);
|
mBtnBuy.setText(R.string.guard_buy_3);
|
||||||
} else if (guardType == Constants.GUARD_TYPE_MONTH) {
|
} 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);
|
mBtnBuy.setText(R.string.guard_buy_3);
|
||||||
} else if (guardType == Constants.GUARD_TYPE_YEAR) {
|
} 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);
|
mBtnBuy.setText(R.string.guard_buy_3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@ public class LiveNewRoomTypeDialogFragment extends AbsDialogFragment implements
|
|||||||
pwd.setOnClickListener(view -> select(false));
|
pwd.setOnClickListener(view -> select(false));
|
||||||
submit.setOnClickListener(view -> {
|
submit.setOnClickListener(view -> {
|
||||||
if (isSelectPublic) {
|
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) {
|
if(mCallback!=null) {
|
||||||
mCallback.callback(bean);
|
mCallback.callback(bean);
|
||||||
}
|
}
|
||||||
|
@ -455,14 +455,14 @@ public class LiveOldUserDialogFragment extends AbsDialogFragment implements View
|
|||||||
mFans.setText(new LiveTextRender().renderLiveUserDialogData(obj.getLongValue("fans")));
|
mFans.setText(new LiveTextRender().renderLiveUserDialogData(obj.getLongValue("fans")));
|
||||||
mConsume.setText(new LiveTextRender().renderLiveUserDialogData(obj.getLongValue("consumption")));
|
mConsume.setText(new LiveTextRender().renderLiveUserDialogData(obj.getLongValue("consumption")));
|
||||||
mVotes.setText(new LiveTextRender().renderLiveUserDialogData(obj.getLongValue("votestotal")));
|
mVotes.setText(new LiveTextRender().renderLiveUserDialogData(obj.getLongValue("votestotal")));
|
||||||
mConsumeTip.setText(WordUtil.getString(R.string.live_user_send) + appConfig.getCoinName());
|
mConsumeTip.setText(mContext.getString(R.string.live_user_send) + appConfig.getCoinName());
|
||||||
mVotesTip.setText(WordUtil.getString(R.string.live_user_get) + appConfig.getVotesName());
|
mVotesTip.setText(mContext.getString(R.string.live_user_get) + appConfig.getVotesName());
|
||||||
if (mType == TYPE_AUD_ANC) {
|
if (mType == TYPE_AUD_ANC) {
|
||||||
showImpress(obj.getString("label"));
|
showImpress(obj.getString("label"));
|
||||||
}
|
}
|
||||||
mFollowing = obj.getIntValue("isattention") == 1;
|
mFollowing = obj.getIntValue("isattention") == 1;
|
||||||
if (mFollowText != null) {
|
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) {
|
if (mFollowImage != null) {
|
||||||
mFollowImage.setImageDrawable(mFollowing ? mFollowDrawable : mUnFollowDrawable);
|
mFollowImage.setImageDrawable(mFollowing ? mFollowDrawable : mUnFollowDrawable);
|
||||||
@ -575,7 +575,7 @@ public class LiveOldUserDialogFragment extends AbsDialogFragment implements View
|
|||||||
}
|
}
|
||||||
if (isAttention == 1 && mLiveUid.equals(mToUid)) {//关注了主播
|
if (isAttention == 1 && mLiveUid.equals(mToUid)) {//关注了主播
|
||||||
((LiveActivity) mContext).sendSystemMessage(
|
((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 = new RedPackAdapter(mContext, list);
|
||||||
mRedPackAdapter.setOnItemClickListener(LiveRedPackListDialogFragment.this);
|
mRedPackAdapter.setOnItemClickListener(LiveRedPackListDialogFragment.this);
|
||||||
mRecyclerView.setAdapter(mRedPackAdapter);
|
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 {
|
} else {
|
||||||
ToastUtil.show(msg);
|
ToastUtil.show(msg);
|
||||||
}
|
}
|
||||||
|
@ -110,10 +110,10 @@ public class LiveRedPackResultDialogFragment extends AbsDialogFragment {
|
|||||||
ImgLoader.displayAvatar(mContext,redPackInfo.getString("avatar"), mAvatar);
|
ImgLoader.displayAvatar(mContext,redPackInfo.getString("avatar"), mAvatar);
|
||||||
}
|
}
|
||||||
if (mName != null) {
|
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) {
|
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("nums_rob") + "/" + redPackInfo.getString("nums"),
|
||||||
redPackInfo.getString("coin_rob") + "/" + redPackInfo.getString("coin"),
|
redPackInfo.getString("coin_rob") + "/" + redPackInfo.getString("coin"),
|
||||||
mCoinName));
|
mCoinName));
|
||||||
@ -132,7 +132,7 @@ public class LiveRedPackResultDialogFragment extends AbsDialogFragment {
|
|||||||
mWinCoin.setText(winCoinVal);
|
mWinCoin.setText(winCoinVal);
|
||||||
}
|
}
|
||||||
if (mCoinNameTextView != null) {
|
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) {
|
if (mRecyclerView != null) {
|
||||||
|
@ -208,7 +208,7 @@ public class LiveRedPackRobDialogFragment extends AbsDialogFragment implements V
|
|||||||
mWinCoin.setText(winCoin);
|
mWinCoin.setText(winCoin);
|
||||||
}
|
}
|
||||||
if (mWinTip != null) {
|
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)) {
|
if (TextUtils.isEmpty(mStream)) {
|
||||||
return;
|
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);
|
mCoinName1 = mRootView.findViewById(R.id.coin_name_1);
|
||||||
mCoinName2 = mRootView.findViewById(R.id.coin_name_2);
|
mCoinName2 = mRootView.findViewById(R.id.coin_name_2);
|
||||||
mCoinName = CommonAppConfig.getInstance().getCoinName();
|
mCoinName = CommonAppConfig.getInstance().getCoinName();
|
||||||
|
@ -243,11 +243,11 @@ public class LiveTaskDialog extends AbsDialogPopupWindow {
|
|||||||
LiveTaskModel.Task task = new LiveTaskModel.Task();
|
LiveTaskModel.Task task = new LiveTaskModel.Task();
|
||||||
LiveTaskModel.Task task2 = new LiveTaskModel.Task();
|
LiveTaskModel.Task task2 = new LiveTaskModel.Task();
|
||||||
if (type == 1) {
|
if (type == 1) {
|
||||||
task.setTaskName(WordUtil.getString(R.string.live_task_no1));
|
task.setTaskName(getContext().getString(R.string.live_task_no1));
|
||||||
task2.setTaskName(WordUtil.getString(R.string.live_task_no2));
|
task2.setTaskName(getContext().getString(R.string.live_task_no2));
|
||||||
} else {
|
} else {
|
||||||
task.setTaskName(WordUtil.getString(R.string.live_task_fans_no1));
|
task.setTaskName(getContext().getString(R.string.live_task_fans_no1));
|
||||||
task2.setTaskName(WordUtil.getString(R.string.live_task_fans_no2));
|
task2.setTaskName(getContext().getString(R.string.live_task_fans_no2));
|
||||||
}
|
}
|
||||||
task.setType(LiveTaskModel.TASK_TYPE_TIP);
|
task.setType(LiveTaskModel.TASK_TYPE_TIP);
|
||||||
task2.setType(LiveTaskModel.TASK_TYPE_TIP);
|
task2.setType(LiveTaskModel.TASK_TYPE_TIP);
|
||||||
|
@ -12,6 +12,7 @@ import com.yunbao.common.Constants;
|
|||||||
import com.yunbao.common.HtmlConfig;
|
import com.yunbao.common.HtmlConfig;
|
||||||
import com.yunbao.common.bean.JsTurnTableBean;
|
import com.yunbao.common.bean.JsTurnTableBean;
|
||||||
import com.yunbao.common.dialog.AbsDialogFragment;
|
import com.yunbao.common.dialog.AbsDialogFragment;
|
||||||
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.live.views.TurnTableWebViewHolder;
|
import com.yunbao.live.views.TurnTableWebViewHolder;
|
||||||
|
|
||||||
@ -19,6 +20,8 @@ import org.greenrobot.eventbus.EventBus;
|
|||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
import org.greenrobot.eventbus.ThreadMode;
|
import org.greenrobot.eventbus.ThreadMode;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
import cn.qqtheme.framework.util.ScreenUtils;
|
import cn.qqtheme.framework.util.ScreenUtils;
|
||||||
|
|
||||||
|
|
||||||
@ -73,7 +76,7 @@ public class LiveTurnTableDialogFragment4Audience extends AbsDialogFragment {
|
|||||||
if (mTurnTableViewHolder == null) {
|
if (mTurnTableViewHolder == null) {
|
||||||
String url = HtmlConfig.TURNTABLE_URL;
|
String url = HtmlConfig.TURNTABLE_URL;
|
||||||
url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token="
|
url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token="
|
||||||
+ CommonAppConfig.getInstance().getToken() + "&liveUid=" + mLiveUid;
|
+ CommonAppConfig.getInstance().getToken() + "&liveUid=" + mLiveUid + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0");
|
||||||
mTurnTableViewHolder = new TurnTableWebViewHolder(getActivity(), rlWebview, url);
|
mTurnTableViewHolder = new TurnTableWebViewHolder(getActivity(), rlWebview, url);
|
||||||
mTurnTableViewHolder.subscribeActivityLifeCycle();
|
mTurnTableViewHolder.subscribeActivityLifeCycle();
|
||||||
mTurnTableViewHolder.addToParent();
|
mTurnTableViewHolder.addToParent();
|
||||||
|
@ -62,7 +62,7 @@ public class LiveUserAnchorMailBoxWebInfoPopDialog extends AbsDialogPopupWindow
|
|||||||
Bus.getOn(this);
|
Bus.getOn(this);
|
||||||
mWebView = findViewById(R.id.webView);
|
mWebView = findViewById(R.id.webView);
|
||||||
textView = findViewById(R.id.title);
|
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()
|
mWebView.addJavascriptInterface(JavascriptInterfaceUtils.getInstance()
|
||||||
.setDialogClose(true)
|
.setDialogClose(true)
|
||||||
.setmContext(CommonAppContext.getTopActivity(), mWebView), "androidObject");
|
.setmContext(CommonAppContext.getTopActivity(), mWebView), "androidObject");
|
||||||
|
@ -412,8 +412,8 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
mNoble.setVisibility(View.GONE);
|
mNoble.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
mGuard.setText(String.format(mGuard.getText().toString(), obj.getInteger("guard_num")));
|
mGuard.setText(String.format(mGuard.getText().toString(), obj.getInteger("guard_num")));
|
||||||
mFansVal.setText(WordUtil.getString(R.string.fans) + ":" + mUserBean.getFans());
|
mFansVal.setText(mContext.getString(R.string.fans) + ":" + mUserBean.getFans());
|
||||||
mPraise.setText(WordUtil.getString(R.string.praise) + ":" + obj.getInteger("user_love_num"));
|
mPraise.setText(mContext.getString(R.string.praise) + ":" + obj.getInteger("user_love_num"));
|
||||||
mSignDesc.setText(mUserBean.getSignature());
|
mSignDesc.setText(mUserBean.getSignature());
|
||||||
if (isAnchor) {
|
if (isAnchor) {
|
||||||
mNobleVal.setText("" + obj.getInteger("level_fans_num"));
|
mNobleVal.setText("" + obj.getInteger("level_fans_num"));
|
||||||
@ -533,9 +533,9 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
private void setAttention() {
|
private void setAttention() {
|
||||||
if (mFollowing) {
|
if (mFollowing) {
|
||||||
DialogUitl.Builder builder = new DialogUitl.Builder(mContext)
|
DialogUitl.Builder builder = new DialogUitl.Builder(mContext)
|
||||||
.setContent(WordUtil.getString(R.string.unfollow))
|
.setContent(mContext.getString(R.string.unfollow))
|
||||||
.setConfrimString(WordUtil.getString(R.string.unfollow_confrim))
|
.setConfrimString(mContext.getString(R.string.unfollow_confrim))
|
||||||
.setCancelString(WordUtil.getString(R.string.unfollow_cancel))
|
.setCancelString(mContext.getString(R.string.unfollow_cancel))
|
||||||
.setView(R.layout.dialog_live_unfollow)
|
.setView(R.layout.dialog_live_unfollow)
|
||||||
.setClickCallback3(new DialogUitl.SimpleCallback3() {
|
.setClickCallback3(new DialogUitl.SimpleCallback3() {
|
||||||
|
|
||||||
@ -565,7 +565,7 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
updateFollow();
|
updateFollow();
|
||||||
if (isAttention == 1 && mLiveUid.equals(mToUid)) {//关注了主播
|
if (isAttention == 1 && mLiveUid.equals(mToUid)) {//关注了主播
|
||||||
((LiveActivity) mContext).sendSystemMessage(
|
((LiveActivity) mContext).sendSystemMessage(
|
||||||
CommonAppConfig.getInstance().getUserBean().getUserNiceName() + WordUtil.getString(R.string.live_follow_anchor));
|
CommonAppConfig.getInstance().getUserBean().getUserNiceName() +mContext.getString(R.string.live_follow_anchor));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -589,7 +589,7 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
|
|
||||||
|
|
||||||
private void gotoLive(String live_id) {
|
private void gotoLive(String live_id) {
|
||||||
DialogUitl.showSimpleDialog(mContext, "是否確認前往對方直播間?", new DialogUitl.SimpleCallback() {
|
DialogUitl.showSimpleDialog(mContext, mContext.getString(R.string.party_studio), new DialogUitl.SimpleCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onConfirmClick(Dialog dialog, String content) {
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
LiveUserDialogFragment.this.dismiss();
|
LiveUserDialogFragment.this.dismiss();
|
||||||
|
@ -11,6 +11,7 @@ import com.yunbao.common.Constants;
|
|||||||
import com.yunbao.common.HtmlConfig;
|
import com.yunbao.common.HtmlConfig;
|
||||||
import com.yunbao.common.bean.JsWishBean;
|
import com.yunbao.common.bean.JsWishBean;
|
||||||
import com.yunbao.common.dialog.AbsDialogFragment;
|
import com.yunbao.common.dialog.AbsDialogFragment;
|
||||||
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
import com.yunbao.common.utils.DpUtil;
|
import com.yunbao.common.utils.DpUtil;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.live.activity.LiveAudienceActivity;
|
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||||
@ -20,6 +21,8 @@ import org.greenrobot.eventbus.EventBus;
|
|||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
import org.greenrobot.eventbus.ThreadMode;
|
import org.greenrobot.eventbus.ThreadMode;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by cxf on 2018/10/19.
|
* Created by cxf on 2018/10/19.
|
||||||
* 观众查看 心愿单弹窗
|
* 观众查看 心愿单弹窗
|
||||||
@ -69,7 +72,7 @@ public class LiveWishListDialogFragment4Audience extends AbsDialogFragment {
|
|||||||
if (mWishWebViewHolder == null) {
|
if (mWishWebViewHolder == null) {
|
||||||
String url = HtmlConfig.WISHLIST_URL;
|
String url = HtmlConfig.WISHLIST_URL;
|
||||||
url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token="
|
url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token="
|
||||||
+ CommonAppConfig.getInstance().getToken() + "&liveUid=" + mLiveUid;
|
+ CommonAppConfig.getInstance().getToken() + "&liveUid=" + mLiveUid + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0");
|
||||||
mWishWebViewHolder = new WishlistWebViewHolder(mContext, rlWebview, url);
|
mWishWebViewHolder = new WishlistWebViewHolder(mContext, rlWebview, url);
|
||||||
mWishWebViewHolder.subscribeActivityLifeCycle();
|
mWishWebViewHolder.subscribeActivityLifeCycle();
|
||||||
mWishWebViewHolder.addToParent();
|
mWishWebViewHolder.addToParent();
|
||||||
|
@ -46,7 +46,7 @@ public class RandomPkDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Log.i(TAG, "onTimer: " + time);
|
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.setText(R.string.random_pk_info_btn_end_desc);
|
||||||
mPkBtnDesc.setVisibility(View.VISIBLE);
|
mPkBtnDesc.setVisibility(View.VISIBLE);
|
||||||
mPkBtn.setBackgroundResource(R.drawable.bg_live_room_random_pk_timer);
|
mPkBtn.setBackgroundResource(R.drawable.bg_live_room_random_pk_timer);
|
||||||
@ -72,7 +72,7 @@ public class RandomPkDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
@Override
|
@Override
|
||||||
public void onPkEndTimer(String time) {
|
public void onPkEndTimer(String time) {
|
||||||
super.onPkEndTimer(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);
|
mPkBtnDesc.setText(R.string.random_pk_info_btn_end_desc);
|
||||||
mPkBtn.setEnabled(false);
|
mPkBtn.setEnabled(false);
|
||||||
}
|
}
|
||||||
@ -152,12 +152,12 @@ public class RandomPkDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
RandomPkManager.getInstance().addOnRandomPkTimer(randomPkTimer);
|
RandomPkManager.getInstance().addOnRandomPkTimer(randomPkTimer);
|
||||||
initPkSwitch();
|
initPkSwitch();
|
||||||
if (RandomPkManager.getInstance().isRequestPk()) {
|
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.setText(R.string.random_pk_info_btn_end_desc);
|
||||||
mPkBtnDesc.setVisibility(View.VISIBLE);
|
mPkBtnDesc.setVisibility(View.VISIBLE);
|
||||||
mPkBtn.setBackgroundResource(R.drawable.bg_live_room_random_pk_timer);
|
mPkBtn.setBackgroundResource(R.drawable.bg_live_room_random_pk_timer);
|
||||||
} else if (RandomPkManager.getInstance().isExiting()) {
|
} 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);
|
mPkBtnDesc.setText(R.string.random_pk_info_btn_end_desc);
|
||||||
mPkBtn.setEnabled(false);
|
mPkBtn.setEnabled(false);
|
||||||
}
|
}
|
||||||
|
@ -72,6 +72,7 @@ import java.io.File;
|
|||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.lang.ref.SoftReference;
|
import java.lang.ref.SoftReference;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||||
|
|
||||||
@ -339,7 +340,7 @@ public class LiveGiftAnimPresenter {
|
|||||||
mGifGiftTipGroupBuyZuoji.setOnClickListener(new View.OnClickListener() {
|
mGifGiftTipGroupBuyZuoji.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
WebViewActivity.forward(mContext, HtmlConfig.SHOP);
|
WebViewActivity.forward(mContext, HtmlConfig.SHOP + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -348,7 +349,7 @@ public class LiveGiftAnimPresenter {
|
|||||||
mGifGiftTipGroupBuyLiangName.setOnClickListener(new View.OnClickListener() {
|
mGifGiftTipGroupBuyLiangName.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
WebViewActivity.forward(mContext, HtmlConfig.SHOP);
|
WebViewActivity.forward(mContext, HtmlConfig.SHOP + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -933,7 +934,7 @@ public class LiveGiftAnimPresenter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String text = mTempGifGiftBean.getUserNiceName() + " <myfont size='24px'>"
|
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());
|
+ "</myfont> " + (mTempGifGiftBean.getCarName());
|
||||||
Spanned spanned = Html.fromHtml(text, null, new HtmlTagHandler("myfont"));
|
Spanned spanned = Html.fromHtml(text, null, new HtmlTagHandler("myfont"));
|
||||||
mGifGiftTipBuyZuoji.setText(spanned);
|
mGifGiftTipBuyZuoji.setText(spanned);
|
||||||
@ -974,7 +975,7 @@ public class LiveGiftAnimPresenter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String text = mTempGifGiftBean.getUserNiceName() + " <myfont size='24px'>"
|
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();
|
+ "</myfont> " + mTempGifGiftBean.getLiangName();
|
||||||
Spanned spanned = Html.fromHtml(text, null, new HtmlTagHandler("myfont"));
|
Spanned spanned = Html.fromHtml(text, null, new HtmlTagHandler("myfont"));
|
||||||
mGifGiftTipBuyLiangName.setText(spanned);
|
mGifGiftTipBuyLiangName.setText(spanned);
|
||||||
@ -1622,7 +1623,7 @@ public class LiveGiftAnimPresenter {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
mPrizePoolLevel.setText(String.format(WordUtil.getString(R.string.live_gift_prize_pool_3), level));
|
mPrizePoolLevel.setText(String.format(mContext.getString(R.string.live_gift_prize_pool_3), level));
|
||||||
mPrizePoolGuang.startAnimation(mPrizePoolGuangAnim);
|
mPrizePoolGuang.startAnimation(mPrizePoolGuangAnim);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ public class LiveLinkMicAnchorPresenter implements View.OnClickListener {
|
|||||||
mPkContainer = linkMicViewHolder.getPkContainer();
|
mPkContainer = linkMicViewHolder.getPkContainer();
|
||||||
|
|
||||||
|
|
||||||
mLinkMicWaitString = WordUtil.getString(R.string.link_mic_wait);
|
mLinkMicWaitString =mContext.getString(R.string.link_mic_wait);
|
||||||
mHandler = new Handler() {
|
mHandler = new Handler() {
|
||||||
@Override
|
@Override
|
||||||
public void handleMessage(Message msg) {
|
public void handleMessage(Message msg) {
|
||||||
@ -280,7 +280,7 @@ public class LiveLinkMicAnchorPresenter implements View.OnClickListener {
|
|||||||
*/
|
*/
|
||||||
private void acceptLinkMic() {
|
private void acceptLinkMic() {
|
||||||
if (((LiveAnchorActivity) mContext).isBgmPlaying()) {
|
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
|
@Override
|
||||||
public void onConfirmClick(Dialog dialog, String content) {
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
((LiveAnchorActivity) mContext).stopBgm();
|
((LiveAnchorActivity) mContext).stopBgm();
|
||||||
@ -494,7 +494,7 @@ public class LiveLinkMicAnchorPresenter implements View.OnClickListener {
|
|||||||
*/
|
*/
|
||||||
public void onlinkMicPlayGaming() {
|
public void onlinkMicPlayGaming() {
|
||||||
mLastApplyLinkMicTime = 0;
|
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) {
|
public void setLiveSdk(int mLiveSDK) {
|
||||||
|
@ -111,7 +111,7 @@ public class LiveLinkMicPkPresenter implements View.OnClickListener {
|
|||||||
mIsAnchor = isAnchor;
|
mIsAnchor = isAnchor;
|
||||||
mRoot = root;
|
mRoot = root;
|
||||||
mPkContainer = linkMicViewHolder.getPkContainer();
|
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();
|
String pkTime = CommonAppConfig.getInstance().getAnchorPkTime();
|
||||||
|
@ -184,7 +184,7 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
|
|||||||
|
|
||||||
mLinkMicTip = btnLinkMic.findViewById(R.id.link_mic_tip);
|
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() {
|
mHandler = new Handler() {
|
||||||
@Override
|
@Override
|
||||||
public void handleMessage(Message msg) {
|
public void handleMessage(Message msg) {
|
||||||
@ -284,7 +284,7 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPushFailed() {//推流失败的回调
|
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);
|
SocketLinkMicUtil.audienceCloseLinkMic(mSocketClient);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -363,7 +363,7 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
|
|||||||
*/
|
*/
|
||||||
private void closeLinkMic(String uid, String uname) {
|
private void closeLinkMic(String uid, String uname) {
|
||||||
if (!TextUtils.isEmpty(uid) && uid.equals(mLinkMicUid)) {
|
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 (!mIsAnchor && !TextUtils.isEmpty(mLinkMicUid) && mLinkMicUid.equals(CommonAppConfig.getInstance().getUid())) {//参与连麦的是自己
|
||||||
if (mLiveLinkMicPushViewHolder != null) {
|
if (mLiveLinkMicPushViewHolder != null) {
|
||||||
mLiveLinkMicPushViewHolder.release();
|
mLiveLinkMicPushViewHolder.release();
|
||||||
@ -682,7 +682,7 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
|
|||||||
*/
|
*/
|
||||||
private void anchorAcceptLinkMicApply() {
|
private void anchorAcceptLinkMicApply() {
|
||||||
if (((LiveAnchorActivity) mContext).isBgmPlaying()) {
|
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
|
@Override
|
||||||
public void onConfirmClick(Dialog dialog, String content) {
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
((LiveAnchorActivity) mContext).stopBgm();
|
((LiveAnchorActivity) mContext).stopBgm();
|
||||||
|
@ -60,7 +60,7 @@ public class LiveRoomCheckLivePresenter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void forwardPwdRoom(CheckLiveModel model) {
|
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
|
@Override
|
||||||
public void onCancelClick() {
|
public void onCancelClick() {
|
||||||
if (mContext instanceof Activity) {
|
if (mContext instanceof Activity) {
|
||||||
@ -71,7 +71,7 @@ public class LiveRoomCheckLivePresenter {
|
|||||||
@Override
|
@Override
|
||||||
public void onConfirmClick(Dialog dialog, String content) {
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
if (TextUtils.isEmpty(content)) {
|
if (TextUtils.isEmpty(content)) {
|
||||||
ToastUtil.show(WordUtil.getString(R.string.live_input_password));
|
ToastUtil.show(mContext.getString(R.string.live_input_password));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String password = MD5Util.getMD5(content);
|
String password = MD5Util.getMD5(content);
|
||||||
@ -81,7 +81,7 @@ public class LiveRoomCheckLivePresenter {
|
|||||||
actionListener.onLiveRoomChanged(liveUid, stream, model.getType(), model.getTypeVal(), model.getLiveSdk());
|
actionListener.onLiveRoomChanged(liveUid, stream, model.getType(), model.getTypeVal(), model.getLiveSdk());
|
||||||
}
|
}
|
||||||
} else {
|
} 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() {
|
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
|
@Override
|
||||||
public void onCancelClick() {
|
public void onCancelClick() {
|
||||||
if (mContext instanceof Activity) {
|
if (mContext instanceof Activity) {
|
||||||
@ -201,7 +201,7 @@ public class LiveRoomCheckLivePresenter {
|
|||||||
@Override
|
@Override
|
||||||
public void onConfirmClick(Dialog dialog, String content) {
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
if (TextUtils.isEmpty(content)) {
|
if (TextUtils.isEmpty(content)) {
|
||||||
ToastUtil.show(WordUtil.getString(R.string.live_input_password));
|
ToastUtil.show(mContext.getString(R.string.live_input_password));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String password = MD5Util.getMD5(content);
|
String password = MD5Util.getMD5(content);
|
||||||
@ -209,7 +209,7 @@ public class LiveRoomCheckLivePresenter {
|
|||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
enterLiveRoom();
|
enterLiveRoom();
|
||||||
} else {
|
} 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;
|
mRoot = root;
|
||||||
mPkContainer = linkMicViewHolder.getPkContainer();
|
mPkContainer = linkMicViewHolder.getPkContainer();
|
||||||
mPkTimeString1 = "";
|
mPkTimeString1 = "";
|
||||||
mPkTimeString2 = WordUtil.getString(R.string.live_pk_time_2);
|
mPkTimeString2 =mContext.getString(R.string.live_pk_time_2);
|
||||||
//从本地取数据
|
//从本地取数据
|
||||||
String pkTime = CommonAppConfig.getInstance().getAnchorPkTime();
|
String pkTime = CommonAppConfig.getInstance().getAnchorPkTime();
|
||||||
if (!pkTime.isEmpty()) {
|
if (!pkTime.isEmpty()) {
|
||||||
@ -254,7 +254,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
|
|||||||
mPkContainer = linkMicViewHolder.getPkContainer();
|
mPkContainer = linkMicViewHolder.getPkContainer();
|
||||||
livePushRyViewHolder = linkMicViewHolder;
|
livePushRyViewHolder = linkMicViewHolder;
|
||||||
mPkTimeString1 = "";
|
mPkTimeString1 = "";
|
||||||
mPkTimeString2 = WordUtil.getString(R.string.live_pk_time_2);
|
mPkTimeString2 =mContext.getString(R.string.live_pk_time_2);
|
||||||
//从本地取数据
|
//从本地取数据
|
||||||
String pkTime = CommonAppConfig.getInstance().getAnchorPkTime();
|
String pkTime = CommonAppConfig.getInstance().getAnchorPkTime();
|
||||||
if (!pkTime.isEmpty()) {
|
if (!pkTime.isEmpty()) {
|
||||||
|
@ -6,10 +6,13 @@ import android.content.Context;
|
|||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
||||||
import com.yunbao.common.HtmlConfig;
|
import com.yunbao.common.HtmlConfig;
|
||||||
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
import com.yunbao.common.utils.WordUtil;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by cxf on 2018/10/30.
|
* Created by cxf on 2018/10/30.
|
||||||
*/
|
*/
|
||||||
@ -56,7 +59,7 @@ public class UserHomeSharePresenter {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String link = HtmlConfig.SHARE_HOME_PAGE + mToUid;
|
String link = HtmlConfig.SHARE_HOME_PAGE + mToUid;
|
||||||
ClipboardManager cm = (ClipboardManager) mContext.getSystemService(Context.CLIPBOARD_SERVICE);
|
ClipboardManager cm = (ClipboardManager) mContext.getSystemService(Context.CLIPBOARD_SERVICE + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||||
ClipData clipData = ClipData.newPlainText("text", link);
|
ClipData clipData = ClipData.newPlainText("text", link);
|
||||||
cm.setPrimaryClip(clipData);
|
cm.setPrimaryClip(clipData);
|
||||||
ToastUtil.show(R.string.copy_success);
|
ToastUtil.show(R.string.copy_success);
|
||||||
@ -71,9 +74,9 @@ public class UserHomeSharePresenter {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// ShareData data = new ShareData();
|
// 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);
|
// 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.setDes(des);
|
||||||
// data.setImgUrl(mToAvatarThumb);
|
// data.setImgUrl(mToAvatarThumb);
|
||||||
// String webUrl = HtmlConfig.SHARE_HOME_PAGE + mToUid;
|
// String webUrl = HtmlConfig.SHARE_HOME_PAGE + mToUid;
|
||||||
|
@ -146,7 +146,7 @@ public class SocketChatUtil {
|
|||||||
.param("medal_name", u.getMedalName())
|
.param("medal_name", u.getMedalName())
|
||||||
.param("medal_level", u.getMedalLevel())
|
.param("medal_level", u.getMedalLevel())
|
||||||
.param("good_num", u.getGoodnum())
|
.param("good_num", u.getGoodnum())
|
||||||
.param("ct", WordUtil.getString(R.string.live_lighted));
|
.param("ct",WordUtil.getString(R.string.live_lighted));
|
||||||
msg.create();
|
msg.create();
|
||||||
V2TIMManager.getInstance().sendGroupTextMessage(msg.mResult.toString(), "g" + mLiveUid, V2TIMMessage.V2TIM_PRIORITY_NORMAL, new V2TIMSendCallback<V2TIMMessage>() {
|
V2TIMManager.getInstance().sendGroupTextMessage(msg.mResult.toString(), "g" + mLiveUid, V2TIMMessage.V2TIM_PRIORITY_NORMAL, new V2TIMSendCallback<V2TIMMessage>() {
|
||||||
@Override
|
@Override
|
||||||
@ -321,7 +321,7 @@ public class SocketChatUtil {
|
|||||||
.param("uid", u.getId())
|
.param("uid", u.getId())
|
||||||
.param("touid", toUid)
|
.param("touid", toUid)
|
||||||
.param("toname", toName)
|
.param("toname", toName)
|
||||||
.param("ct", toName + WordUtil.getString(R.string.live_kicked));
|
.param("ct", toName +WordUtil.getString(R.string.live_kicked));
|
||||||
msg.create();
|
msg.create();
|
||||||
V2TIMManager.getInstance().sendGroupTextMessage(msg.mResult.toString(), "g" + mLiveUid, V2TIMMessage.V2TIM_PRIORITY_NORMAL, new V2TIMSendCallback<V2TIMMessage>() {
|
V2TIMManager.getInstance().sendGroupTextMessage(msg.mResult.toString(), "g" + mLiveUid, V2TIMMessage.V2TIM_PRIORITY_NORMAL, new V2TIMSendCallback<V2TIMMessage>() {
|
||||||
@Override
|
@Override
|
||||||
@ -364,7 +364,7 @@ public class SocketChatUtil {
|
|||||||
.param("uid", u.getId())
|
.param("uid", u.getId())
|
||||||
.param("touid", toUid)
|
.param("touid", toUid)
|
||||||
.param("toname", toName)
|
.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();
|
msg.create();
|
||||||
V2TIMManager.getInstance().sendGroupTextMessage(msg.mResult.toString(), "g" + mLiveUid, V2TIMMessage.V2TIM_PRIORITY_NORMAL, new V2TIMSendCallback<V2TIMMessage>() {
|
V2TIMManager.getInstance().sendGroupTextMessage(msg.mResult.toString(), "g" + mLiveUid, V2TIMMessage.V2TIM_PRIORITY_NORMAL, new V2TIMSendCallback<V2TIMMessage>() {
|
||||||
@Override
|
@Override
|
||||||
@ -396,7 +396,7 @@ public class SocketChatUtil {
|
|||||||
if (u == null) {
|
if (u == null) {
|
||||||
return;
|
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()
|
final SocketSendBean msg = new SocketSendBean()
|
||||||
.param("_method_", Constants.SOCKET_SET_ADMIN)
|
.param("_method_", Constants.SOCKET_SET_ADMIN)
|
||||||
.param("action", action)
|
.param("action", action)
|
||||||
@ -644,7 +644,7 @@ public class SocketChatUtil {
|
|||||||
.param("msgtype", 0)
|
.param("msgtype", 0)
|
||||||
.param("uid", u.getId())
|
.param("uid", u.getId())
|
||||||
.param("uname", u.getUserNiceName())
|
.param("uname", u.getUserNiceName())
|
||||||
.param("ct", WordUtil.getString(R.string.red_pack_22)
|
.param("ct",WordUtil.getString(R.string.red_pack_22)
|
||||||
);
|
);
|
||||||
msg.create();
|
msg.create();
|
||||||
V2TIMManager.getInstance().sendGroupTextMessage(msg.mResult.toString(), "g" + mLiveUid, V2TIMMessage.V2TIM_PRIORITY_NORMAL, new V2TIMSendCallback<V2TIMMessage>() {
|
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 liveChatBean = new LiveChatBean();
|
||||||
liveChatBean.setType(LiveChatBean.RED_PACK);
|
liveChatBean.setType(LiveChatBean.RED_PACK);
|
||||||
liveChatBean.setId(uid);
|
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"));
|
liveChatBean.setContent(name + map.getString("ct"));
|
||||||
mListener.onRedPack(liveChatBean);
|
mListener.onRedPack(liveChatBean);
|
||||||
break;
|
break;
|
||||||
@ -545,9 +545,9 @@ public class SocketClient {
|
|||||||
//聊天列表显示 玩家名 送 1 个 礼物名
|
//聊天列表显示 玩家名 送 1 个 礼物名
|
||||||
|
|
||||||
if (CommonAppContext.lang.equals("chinese")) {
|
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 {
|
} 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"));
|
chatBean.setGuardType(map.getInteger("guard_type"));
|
||||||
}
|
}
|
||||||
if (CommonAppContext.lang.equals("chinese")) {
|
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 {
|
} 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_name", u.getMedalName())
|
||||||
.param("medal_level", u.getMedalLevel())
|
.param("medal_level", u.getMedalLevel())
|
||||||
.param("good_num", u.getGoodnum())
|
.param("good_num", u.getGoodnum())
|
||||||
.param("ct", WordUtil.getString(R.string.live_lighted));
|
.param("ct",WordUtil.getString(R.string.live_lighted));
|
||||||
msg.create();
|
msg.create();
|
||||||
String targetId = "g" + mLiveUid;
|
String targetId = "g" + mLiveUid;
|
||||||
Conversation.ConversationType conversationType = Conversation.ConversationType.CHATROOM;
|
Conversation.ConversationType conversationType = Conversation.ConversationType.CHATROOM;
|
||||||
@ -356,7 +356,7 @@ public class SocketRyChatUtil {
|
|||||||
.param("uid", u.getId())
|
.param("uid", u.getId())
|
||||||
.param("touid", toUid)
|
.param("touid", toUid)
|
||||||
.param("toname", toName)
|
.param("toname", toName)
|
||||||
.param("ct", toName + WordUtil.getString(R.string.live_kicked));
|
.param("ct", toName +WordUtil.getString(R.string.live_kicked));
|
||||||
msg.create();
|
msg.create();
|
||||||
String targetId = "g" + mLiveUid;
|
String targetId = "g" + mLiveUid;
|
||||||
Conversation.ConversationType conversationType = Conversation.ConversationType.CHATROOM;
|
Conversation.ConversationType conversationType = Conversation.ConversationType.CHATROOM;
|
||||||
@ -403,7 +403,7 @@ public class SocketRyChatUtil {
|
|||||||
.param("uid", u.getId())
|
.param("uid", u.getId())
|
||||||
.param("touid", toUid)
|
.param("touid", toUid)
|
||||||
.param("toname", toName)
|
.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();
|
msg.create();
|
||||||
String targetId = "g" + mLiveUid;
|
String targetId = "g" + mLiveUid;
|
||||||
Conversation.ConversationType conversationType = Conversation.ConversationType.CHATROOM;
|
Conversation.ConversationType conversationType = Conversation.ConversationType.CHATROOM;
|
||||||
@ -440,7 +440,7 @@ public class SocketRyChatUtil {
|
|||||||
if (u == null) {
|
if (u == null) {
|
||||||
return;
|
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()
|
final SocketSendBean msg = new SocketSendBean()
|
||||||
.param("_method_", Constants.SOCKET_SET_ADMIN)
|
.param("_method_", Constants.SOCKET_SET_ADMIN)
|
||||||
.param("action", action)
|
.param("action", action)
|
||||||
@ -710,7 +710,7 @@ public class SocketRyChatUtil {
|
|||||||
.param("msgtype", 0)
|
.param("msgtype", 0)
|
||||||
.param("uid", u.getId())
|
.param("uid", u.getId())
|
||||||
.param("uname", u.getUserNiceName())
|
.param("uname", u.getUserNiceName())
|
||||||
.param("ct", WordUtil.getString(R.string.red_pack_22)
|
.param("ct",WordUtil.getString(R.string.red_pack_22)
|
||||||
);
|
);
|
||||||
msg.create();
|
msg.create();
|
||||||
String targetId = "g" + mLiveUid;
|
String targetId = "g" + mLiveUid;
|
||||||
|
@ -428,7 +428,7 @@ public class SocketRyClient {
|
|||||||
LiveChatBean liveChatBean = new LiveChatBean();
|
LiveChatBean liveChatBean = new LiveChatBean();
|
||||||
liveChatBean.setType(LiveChatBean.RED_PACK);
|
liveChatBean.setType(LiveChatBean.RED_PACK);
|
||||||
liveChatBean.setId(uid);
|
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"));
|
liveChatBean.setContent(name + map.getString("ct"));
|
||||||
mListener.onRedPack(liveChatBean);
|
mListener.onRedPack(liveChatBean);
|
||||||
break;
|
break;
|
||||||
@ -864,9 +864,9 @@ public class SocketRyClient {
|
|||||||
//聊天列表显示 玩家名 送 1 个 礼物名
|
//聊天列表显示 玩家名 送 1 个 礼物名
|
||||||
|
|
||||||
if (CommonAppContext.lang.equals("chinese")) {
|
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 {
|
} 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);
|
receiveGiftBean.setLiveChatBean(chatBean);
|
||||||
@ -927,9 +927,9 @@ public class SocketRyClient {
|
|||||||
chatBean.setGuardType(map.getInteger("guard_type"));
|
chatBean.setGuardType(map.getInteger("guard_type"));
|
||||||
}
|
}
|
||||||
if (CommonAppContext.lang.equals("chinese")) {
|
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 {
|
} 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);
|
mListener.onSendGift(receiveGiftBean);
|
||||||
@ -967,9 +967,9 @@ public class SocketRyClient {
|
|||||||
chatBean.setGuardType(map.getInteger("guard_type"));
|
chatBean.setGuardType(map.getInteger("guard_type"));
|
||||||
}
|
}
|
||||||
if (CommonAppContext.lang.equals("chinese")) {
|
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 {
|
} 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) {
|
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());
|
msg = String.format(msg, msgModel.getUserName(), msgModel.getGiftName());
|
||||||
int unameIndexOf = msg.indexOf(msgModel.getUserName());
|
int unameIndexOf = msg.indexOf(msgModel.getUserName());
|
||||||
int giftIndexOf = msg.indexOf(msgModel.getGiftName());
|
int giftIndexOf = msg.indexOf(msgModel.getGiftName());
|
||||||
@ -164,7 +164,7 @@ public class LiveTextRender {
|
|||||||
* 幸运100%活动
|
* 幸运100%活动
|
||||||
*/
|
*/
|
||||||
public void lucky100(Context mContext, TextView mTextView, MsgModel msgModel) {
|
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());
|
msg = String.format(msg, msgModel.getUserName(), msgModel.getGiftName());
|
||||||
int unameIndexOf = msg.indexOf(msgModel.getUserName());
|
int unameIndexOf = msg.indexOf(msgModel.getUserName());
|
||||||
int giftIndexOf = msg.indexOf(msgModel.getGiftName());
|
int giftIndexOf = msg.indexOf(msgModel.getGiftName());
|
||||||
@ -774,7 +774,7 @@ public class LiveTextRender {
|
|||||||
|
|
||||||
public SpannableStringBuilder renderGiftInfo2(String giftName) {
|
public SpannableStringBuilder renderGiftInfo2(String giftName) {
|
||||||
SpannableStringBuilder builder = new SpannableStringBuilder();
|
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;
|
String content = s1 + " " + giftName;
|
||||||
int index1 = s1.length();
|
int index1 = s1.length();
|
||||||
builder.append(content);
|
builder.append(content);
|
||||||
@ -784,8 +784,8 @@ public class LiveTextRender {
|
|||||||
|
|
||||||
public SpannableStringBuilder renderGiftInfo(int giftCount, String giftName) {
|
public SpannableStringBuilder renderGiftInfo(int giftCount, String giftName) {
|
||||||
SpannableStringBuilder builder = new SpannableStringBuilder();
|
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 s2 = WordUtil.getString(R.string.live_send_gift_2) + giftName;
|
String s2 =WordUtil.getString(R.string.live_send_gift_2) + giftName;
|
||||||
String content = s1 + giftCount + s2;
|
String content = s1 + giftCount + s2;
|
||||||
int index1 = s1.length();
|
int index1 = s1.length();
|
||||||
int index2 = index1 + String.valueOf(giftCount).length();
|
int index2 = index1 + String.valueOf(giftCount).length();
|
||||||
@ -823,7 +823,7 @@ public class LiveTextRender {
|
|||||||
}
|
}
|
||||||
SpannableStringBuilder builder = new SpannableStringBuilder();
|
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;
|
String s = StringUtil.toWan2(num) + wan;
|
||||||
builder.append(s);
|
builder.append(s);
|
||||||
int index2 = s.length();
|
int index2 = s.length();
|
||||||
|
@ -73,7 +73,7 @@ public class LiveAdminListViewHolder extends AbsLivePageViewHolder implements On
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void showTip() {
|
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 + ")");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,11 +14,14 @@ import android.widget.ProgressBar;
|
|||||||
|
|
||||||
import com.yunbao.common.CommonAppConfig;
|
import com.yunbao.common.CommonAppConfig;
|
||||||
import com.yunbao.common.HtmlConfig;
|
import com.yunbao.common.HtmlConfig;
|
||||||
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.live.activity.LiveAudienceActivity;
|
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||||
import com.yunbao.live.activity.LiveContributeActivity;
|
import com.yunbao.live.activity.LiveContributeActivity;
|
||||||
import com.yunbao.common.utils.L;
|
import com.yunbao.common.utils.L;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by cxf on 2018/10/15.
|
* Created by cxf on 2018/10/15.
|
||||||
* 直播间粉丝排行榜
|
* 直播间粉丝排行榜
|
||||||
@ -79,7 +82,7 @@ public class LiveContributeViewHolder extends AbsLivePageViewHolder implements V
|
|||||||
public void loadData() {
|
public void loadData() {
|
||||||
if (!mLoad) {
|
if (!mLoad) {
|
||||||
mLoad = true;
|
mLoad = true;
|
||||||
mWebView.loadUrl(HtmlConfig.LIVE_LIST + mLiveUid);
|
mWebView.loadUrl(HtmlConfig.LIVE_LIST + mLiveUid + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||||
} else {
|
} else {
|
||||||
mWebView.reload();
|
mWebView.reload();
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ public class LiveGiftLuckTopViewHolder extends AbsViewHolder {
|
|||||||
@Override
|
@Override
|
||||||
public void init() {
|
public void init() {
|
||||||
mQueue = new ConcurrentLinkedQueue<>();
|
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);
|
mRoot = findViewById(R.id.root);
|
||||||
mGiftTip = (TextView) findViewById(R.id.luck_gift_tip);
|
mGiftTip = (TextView) findViewById(R.id.luck_gift_tip);
|
||||||
mParentWidth = mParentView.getWidth();
|
mParentWidth = mParentView.getWidth();
|
||||||
|
@ -84,8 +84,8 @@ public class LiveLinkMicPkViewHolder extends AbsViewHolder {
|
|||||||
public void init() {
|
public void init() {
|
||||||
|
|
||||||
mHalfScreenWidth = ScreenDimenUtil.getInstance().getScreenWdith() / 2;
|
mHalfScreenWidth = ScreenDimenUtil.getInstance().getScreenWdith() / 2;
|
||||||
mLeftString = WordUtil.getString(R.string.live_link_mic_pk_1);
|
mLeftString =mContext.getString(R.string.live_link_mic_pk_1);
|
||||||
mRightString = WordUtil.getString(R.string.live_link_mic_pk_2);
|
mRightString =mContext.getString(R.string.live_link_mic_pk_2);
|
||||||
mFrameImageView = (FrameImageView) findViewById(R.id.frame_img);
|
mFrameImageView = (FrameImageView) findViewById(R.id.frame_img);
|
||||||
mFrameImageView.setImageList(LiveIconUtil.getLinkMicPkAnim());//PK开始动画
|
mFrameImageView.setImageList(LiveIconUtil.getLinkMicPkAnim());//PK开始动画
|
||||||
frame_img_pk = (ImageView) findViewById(R.id.frame_img_pk);
|
frame_img_pk = (ImageView) findViewById(R.id.frame_img_pk);
|
||||||
|
@ -185,7 +185,7 @@ public class LiveLinkMicPlayTxViewHolder extends AbsLiveLinkMicPlayViewHolder im
|
|||||||
break;
|
break;
|
||||||
case TXLiveConstants.PLAY_ERR_NET_DISCONNECT://播放失败
|
case TXLiveConstants.PLAY_ERR_NET_DISCONNECT://播放失败
|
||||||
case TXLiveConstants.PLAY_ERR_FILE_NOT_FOUND:
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,11 +13,14 @@ import android.widget.ProgressBar;
|
|||||||
|
|
||||||
import com.yunbao.common.CommonAppConfig;
|
import com.yunbao.common.CommonAppConfig;
|
||||||
import com.yunbao.common.HtmlConfig;
|
import com.yunbao.common.HtmlConfig;
|
||||||
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
import com.yunbao.common.utils.L;
|
import com.yunbao.common.utils.L;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.live.activity.LiveAudienceActivity;
|
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||||
import com.yunbao.live.activity.LiveContributeActivity;
|
import com.yunbao.live.activity.LiveContributeActivity;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by cxf on 2018/10/15.
|
* Created by cxf on 2018/10/15.
|
||||||
* 直播间粉丝排行榜
|
* 直播间粉丝排行榜
|
||||||
@ -78,7 +81,7 @@ public class LiveMedalRankViewHolder extends AbsLivePageViewHolder implements Vi
|
|||||||
public void loadData() {
|
public void loadData() {
|
||||||
if (!mLoad) {
|
if (!mLoad) {
|
||||||
mLoad = true;
|
mLoad = true;
|
||||||
mWebView.loadUrl(HtmlConfig.LIVE_FANS_MEDAL_RANKING + mLiveUid);
|
mWebView.loadUrl(HtmlConfig.LIVE_FANS_MEDAL_RANKING + mLiveUid + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||||
} else {
|
} else {
|
||||||
mWebView.reload();
|
mWebView.reload();
|
||||||
}
|
}
|
||||||
|
@ -182,7 +182,7 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (mAvatarFile == null) {
|
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));
|
mCoverText.setBackground(ContextCompat.getDrawable(mContext, R.drawable.bg_live_cover));
|
||||||
}
|
}
|
||||||
mAvatarFile = file;
|
mAvatarFile = file;
|
||||||
@ -662,9 +662,9 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
|||||||
private void switchLocation() {
|
private void switchLocation() {
|
||||||
if (mOpenLocation) {
|
if (mOpenLocation) {
|
||||||
new DialogUitl.Builder(mContext)
|
new DialogUitl.Builder(mContext)
|
||||||
.setContent(WordUtil.getString(R.string.live_location_close_3))
|
.setContent(mContext.getString(R.string.live_location_close_3))
|
||||||
.setCancelable(true)
|
.setCancelable(true)
|
||||||
.setConfrimString(WordUtil.getString(R.string.live_location_close_2))
|
.setConfrimString(mContext.getString(R.string.live_location_close_2))
|
||||||
.setClickCallback(new DialogUitl.SimpleCallback() {
|
.setClickCallback(new DialogUitl.SimpleCallback() {
|
||||||
|
|
||||||
@Override
|
@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() {
|
private void chooseLiveType() {
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
@ -809,7 +809,7 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
|||||||
* 密码房间
|
* 密码房间
|
||||||
*/
|
*/
|
||||||
private void onLiveTypePwd(final LiveRoomTypeBean bean) {
|
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
|
@Override
|
||||||
public void onConfirmClick(Dialog dialog, String content) {
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
if (TextUtils.isEmpty(content)) {
|
if (TextUtils.isEmpty(content)) {
|
||||||
@ -831,7 +831,7 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
|||||||
* 付费房间
|
* 付费房间
|
||||||
*/
|
*/
|
||||||
private void onLiveTypePay(final LiveRoomTypeBean bean) {
|
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
|
@Override
|
||||||
public void onConfirmClick(Dialog dialog, String content) {
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
if (TextUtils.isEmpty(content)) {
|
if (TextUtils.isEmpty(content)) {
|
||||||
|
@ -690,7 +690,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
|||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void onUpdata(String str) {
|
public void onUpdata(String str) {
|
||||||
if ("UsertoRY".equals(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
|
@Override
|
||||||
public void onConfirmClick(Dialog dialog, String content) {
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
UsertoRY();
|
UsertoRY();
|
||||||
|
@ -159,7 +159,7 @@ public class LivePlayTxViewHolder extends LiveRoomPlayViewHolder implements ITXL
|
|||||||
// break;
|
// break;
|
||||||
// case TXLiveConstants.PLAY_ERR_NET_DISCONNECT://播放失败
|
// case TXLiveConstants.PLAY_ERR_NET_DISCONNECT://播放失败
|
||||||
// case TXLiveConstants.PLAY_ERR_FILE_NOT_FOUND:
|
// 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;
|
// break;
|
||||||
// case TXLiveConstants.PLAY_EVT_PLAY_PROGRESS:
|
// case TXLiveConstants.PLAY_EVT_PLAY_PROGRESS:
|
||||||
// int progress = bundle.getInt("EVT_PLAY_PROGRESS_MS");
|
// int progress = bundle.getInt("EVT_PLAY_PROGRESS_MS");
|
||||||
|
@ -153,7 +153,7 @@ public class LivePlayTxViewHolder_backup extends LiveRoomPlayViewHolder implemen
|
|||||||
break;
|
break;
|
||||||
case TXLiveConstants.PLAY_ERR_NET_DISCONNECT://播放失败
|
case TXLiveConstants.PLAY_ERR_NET_DISCONNECT://播放失败
|
||||||
case TXLiveConstants.PLAY_ERR_FILE_NOT_FOUND:
|
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;
|
break;
|
||||||
case TXLiveConstants.PLAY_EVT_PLAY_PROGRESS:
|
case TXLiveConstants.PLAY_EVT_PLAY_PROGRESS:
|
||||||
int progress = bundle.getInt("EVT_PLAY_PROGRESS_MS");
|
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);
|
File targetDir = new File(CommonAppConfig.VIDEO_TIE_ZHI_PATH+CommonAppConfig.TIEZHI_360_NAME);
|
||||||
try {
|
try {
|
||||||
}catch (Exception e){
|
}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();
|
}).start();
|
||||||
|
@ -131,7 +131,7 @@ public class LiveReadyRyViewHolder extends AbsViewHolder implements View.OnClick
|
|||||||
if (file != null) {
|
if (file != null) {
|
||||||
ImgLoader.display(mContext, file, mAvatar);
|
ImgLoader.display(mContext, file, mAvatar);
|
||||||
if (mAvatarFile == null) {
|
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));
|
mCoverText.setBackground(ContextCompat.getDrawable(mContext, R.drawable.bg_live_cover));
|
||||||
}
|
}
|
||||||
mAvatarFile = file;
|
mAvatarFile = file;
|
||||||
@ -229,9 +229,9 @@ public class LiveReadyRyViewHolder extends AbsViewHolder implements View.OnClick
|
|||||||
private void switchLocation() {
|
private void switchLocation() {
|
||||||
if (mOpenLocation) {
|
if (mOpenLocation) {
|
||||||
new DialogUitl.Builder(mContext)
|
new DialogUitl.Builder(mContext)
|
||||||
.setContent(WordUtil.getString(R.string.live_location_close_3))
|
.setContent(mContext.getString(R.string.live_location_close_3))
|
||||||
.setCancelable(true)
|
.setCancelable(true)
|
||||||
.setConfrimString(WordUtil.getString(R.string.live_location_close_2))
|
.setConfrimString(mContext.getString(R.string.live_location_close_2))
|
||||||
.setClickCallback(new DialogUitl.SimpleCallback() {
|
.setClickCallback(new DialogUitl.SimpleCallback() {
|
||||||
|
|
||||||
@Override
|
@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);
|
mLocationImg.setImageResource(mOpenLocation ? R.mipmap.address_choice : R.mipmap.icon_live_ready_location_0);
|
||||||
}
|
}
|
||||||
if (mCity != null) {
|
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) {
|
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
|
@Override
|
||||||
public void onConfirmClick(Dialog dialog, String content) {
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
if (TextUtils.isEmpty(content)) {
|
if (TextUtils.isEmpty(content)) {
|
||||||
@ -363,7 +363,7 @@ public class LiveReadyRyViewHolder extends AbsViewHolder implements View.OnClick
|
|||||||
* 付费房间
|
* 付费房间
|
||||||
*/
|
*/
|
||||||
private void onLiveTypePay(final LiveRoomTypeBean bean) {
|
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
|
@Override
|
||||||
public void onConfirmClick(Dialog dialog, String content) {
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
if (TextUtils.isEmpty(content)) {
|
if (TextUtils.isEmpty(content)) {
|
||||||
|
@ -144,7 +144,7 @@ public class LiveReadyViewHolder extends AbsViewHolder implements View.OnClickLi
|
|||||||
if (file != null) {
|
if (file != null) {
|
||||||
ImgLoader.display(mContext, file, mAvatar);
|
ImgLoader.display(mContext, file, mAvatar);
|
||||||
if (mAvatarFile == null) {
|
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));
|
mCoverText.setBackground(ContextCompat.getDrawable(mContext, R.drawable.bg_live_cover));
|
||||||
}
|
}
|
||||||
mAvatarFile = file;
|
mAvatarFile = file;
|
||||||
@ -253,9 +253,9 @@ public class LiveReadyViewHolder extends AbsViewHolder implements View.OnClickLi
|
|||||||
private void switchLocation() {
|
private void switchLocation() {
|
||||||
if (mOpenLocation) {
|
if (mOpenLocation) {
|
||||||
new DialogUitl.Builder(mContext)
|
new DialogUitl.Builder(mContext)
|
||||||
.setContent(WordUtil.getString(R.string.live_location_close_3))
|
.setContent(mContext.getString(R.string.live_location_close_3))
|
||||||
.setCancelable(true)
|
.setCancelable(true)
|
||||||
.setConfrimString(WordUtil.getString(R.string.live_location_close_2))
|
.setConfrimString(mContext.getString(R.string.live_location_close_2))
|
||||||
.setClickCallback(new DialogUitl.SimpleCallback() {
|
.setClickCallback(new DialogUitl.SimpleCallback() {
|
||||||
|
|
||||||
@Override
|
@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);
|
mLocationImg.setImageResource(mOpenLocation ? R.mipmap.address_choice : R.mipmap.icon_live_ready_location_0);
|
||||||
}
|
}
|
||||||
if (mCity != null) {
|
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) {
|
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
|
@Override
|
||||||
public void onConfirmClick(Dialog dialog, String content) {
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
if (TextUtils.isEmpty(content)) {
|
if (TextUtils.isEmpty(content)) {
|
||||||
@ -387,7 +387,7 @@ public class LiveReadyViewHolder extends AbsViewHolder implements View.OnClickLi
|
|||||||
* 付费房间
|
* 付费房间
|
||||||
*/
|
*/
|
||||||
private void onLiveTypePay(final LiveRoomTypeBean bean) {
|
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
|
@Override
|
||||||
public void onConfirmClick(Dialog dialog, String content) {
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
if (TextUtils.isEmpty(content)) {
|
if (TextUtils.isEmpty(content)) {
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user