pdlive6.6.6版本改动合并
@@ -21,6 +21,7 @@ import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.blankj.utilcode.util.GsonUtils;
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
@@ -36,6 +37,8 @@ import com.yunbao.common.event.CoinChangeEvent;
|
||||
import com.yunbao.common.event.FollowEvent;
|
||||
import com.yunbao.common.event.SendBlindGiftEvent;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.LiveHttpConsts;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.interfaces.KeyBoardHeightChangeListener;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
@@ -48,7 +51,7 @@ import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.utils.formatBigNum;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.bean.GuardUserBean;
|
||||
import com.yunbao.live.bean.GuardUserModel;
|
||||
import com.yunbao.live.bean.LiveBuyGuardMsgBean;
|
||||
import com.yunbao.live.bean.LiveChatBean;
|
||||
import com.yunbao.live.bean.LiveDanMuBean;
|
||||
@@ -64,20 +67,18 @@ import com.yunbao.live.dialog.LiveFansFragment;
|
||||
import com.yunbao.live.dialog.LiveFansMedalOkDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveGiveHotDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveGuardBuyDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveGuardDialog;
|
||||
import com.yunbao.live.dialog.LiveGuardDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveInputDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveMicAnchorDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveMoreDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveNewGuardBuyDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveNewGuardListDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveRedPackListDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveRedPackSendDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveShareDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveUserAnchorMailBoxPopDialog;
|
||||
import com.yunbao.live.dialog.LiveUserDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveUserMoreDialogFragment;
|
||||
import com.yunbao.common.http.LiveHttpConsts;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
import com.yunbao.live.presenter.LiveLinkMicAnchorPresenter;
|
||||
import com.yunbao.live.presenter.LiveLinkMicPkPresenter;
|
||||
import com.yunbao.live.presenter.LiveLinkMicPresenter;
|
||||
@@ -734,7 +735,8 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
|
||||
}
|
||||
}
|
||||
public Handler mHandler = new Handler();
|
||||
|
||||
public Handler mHandler = new Handler();
|
||||
public pkRunnable pr;
|
||||
|
||||
public class pkRunnable implements Runnable {
|
||||
@@ -1265,22 +1267,32 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
if (uid == null) {
|
||||
uid = mLiveUid;
|
||||
}
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
MobclickAgent.onEvent(mContext, "guardian_people", "守护席点击次数及人数");
|
||||
}
|
||||
}, 500);
|
||||
|
||||
LiveHttpUtil.getGuardList(uid, 1, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
List<GuardUserBean> list = JSON.parseArray(Arrays.toString(info), GuardUserBean.class);
|
||||
List<GuardUserModel> list = JSON.parseArray(Arrays.toString(info), GuardUserModel.class);
|
||||
Log.e("getGuardList", list.toString());
|
||||
if (list.isEmpty()) {
|
||||
openNewBuyGuardWindow(true);
|
||||
// openNewBuyGuardWindow(true);
|
||||
new LiveGuardDialog(mContext, true, mLiveUid, mStream).showDialog();
|
||||
} else {
|
||||
LiveNewGuardListDialogFragment fragment = new LiveNewGuardListDialogFragment();
|
||||
fragment.setList(list);
|
||||
fragment.setLiveGuardInfo(mLiveGuardInfo);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(Constants.LIVE_UID, mLiveUid);
|
||||
bundle.putBoolean(Constants.ANCHOR, mIsAnchor);
|
||||
bundle.putBoolean("showBuyView", !showBuyView);
|
||||
fragment.setArguments(bundle);
|
||||
fragment.show(getSupportFragmentManager(), "LiveGuardDialogFragment");
|
||||
// LiveNewGuardDialogFragment fragment = new LiveNewGuardDialogFragment();
|
||||
// fragment.setList(list);
|
||||
// fragment.setLiveGuardInfo(mLiveGuardInfo);
|
||||
// Bundle bundle = new Bundle();
|
||||
// bundle.putString(Constants.LIVE_UID, mLiveUid);
|
||||
// bundle.putBoolean(Constants.ANCHOR, mIsAnchor);
|
||||
// bundle.putBoolean("showBuyView", !showBuyView);
|
||||
// fragment.setArguments(bundle);
|
||||
// fragment.show(getSupportFragmentManager(), "LiveGuardDialogFragment");
|
||||
new LiveGuardDialog(mContext, false, mLiveUid, mStream).showDialog();
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -1405,18 +1417,28 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
if (TextUtils.isEmpty(mLiveUid) || TextUtils.isEmpty(mStream) || mLiveGuardInfo == null) {
|
||||
return;
|
||||
}
|
||||
LiveNewGuardBuyDialogFragment fragment = new LiveNewGuardBuyDialogFragment();
|
||||
fragment.setLiveGuardInfo(mLiveGuardInfo);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(Constants.COIN_NAME, mCoinName);
|
||||
bundle.putString(Constants.LIVE_UID, mLiveUid);
|
||||
bundle.putString(Constants.LIVE_ANCHER_NAME, mAncherName);
|
||||
bundle.putString(Constants.STREAM, mStream);
|
||||
bundle.putString(Constants.LIVE_ANCHER_ICON, mAncherIcon);
|
||||
bundle.putString(Constants.USER_ICON, CommonAppConfig.getInstance().getUserBean().getAvatar());
|
||||
bundle.putString("by", by);
|
||||
fragment.setArguments(bundle);
|
||||
fragment.show(getSupportFragmentManager(), "LiveGuardBuyDialogFragment");
|
||||
LiveHttpUtil.getGuardList(mLiveUid, 1, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
List<GuardUserModel> list = JSON.parseArray(Arrays.toString(info), GuardUserModel.class);
|
||||
Log.e("getGuardList", list.toString());
|
||||
if (list.isEmpty()) {
|
||||
// openNewBuyGuardWindow(true);
|
||||
new LiveGuardDialog(mContext, true, mLiveUid, mStream).showDialog();
|
||||
} else {
|
||||
// LiveNewGuardDialogFragment fragment = new LiveNewGuardDialogFragment();
|
||||
// fragment.setList(list);
|
||||
// fragment.setLiveGuardInfo(mLiveGuardInfo);
|
||||
// Bundle bundle = new Bundle();
|
||||
// bundle.putString(Constants.LIVE_UID, mLiveUid);
|
||||
// bundle.putBoolean(Constants.ANCHOR, mIsAnchor);
|
||||
// bundle.putBoolean("showBuyView", !showBuyView);
|
||||
// fragment.setArguments(bundle);
|
||||
// fragment.show(getSupportFragmentManager(), "LiveGuardDialogFragment");
|
||||
new LiveGuardDialog(mContext, false, mLiveUid, mStream).showDialog();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -45,6 +45,7 @@ import com.yunbao.common.bean.AnchorRecommendItemModel;
|
||||
import com.yunbao.common.bean.AnchorRecommendModel;
|
||||
import com.yunbao.common.bean.CrashSaveBean;
|
||||
import com.yunbao.common.bean.CustomSidebarChildModel;
|
||||
import com.yunbao.common.bean.GuardMaturityDateRemindModel;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.bean.LinkMicUserBean;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
@@ -52,6 +53,7 @@ import com.yunbao.common.bean.LiveGiftBean;
|
||||
import com.yunbao.common.bean.LiveRoomVoteModel;
|
||||
import com.yunbao.common.bean.LiveUserGiftBean;
|
||||
import com.yunbao.common.bean.LiveUserMailBoxModel;
|
||||
import com.yunbao.common.bean.SendMoneyLongModel;
|
||||
import com.yunbao.common.bean.SlideInfoModel;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.dialog.EffectsSettingsDialog;
|
||||
@@ -60,6 +62,7 @@ import com.yunbao.common.dialog.LiveChargeDialogFragment;
|
||||
import com.yunbao.common.dialog.SlideSettingsDialog;
|
||||
import com.yunbao.common.dialog.SudGameListPopup;
|
||||
import com.yunbao.common.dialog.YoursystemisolderDialog;
|
||||
import com.yunbao.common.event.AllServerNotifyFFGGGDJANEvent;
|
||||
import com.yunbao.common.event.CustomDrawerPopupEvent;
|
||||
import com.yunbao.common.event.FollowEvent;
|
||||
import com.yunbao.common.event.GiftWallIlluminateEvent;
|
||||
@@ -71,6 +74,7 @@ import com.yunbao.common.event.LiveRoomChangeEvent;
|
||||
import com.yunbao.common.event.LiveSudGamePopupShowOrHideEvent;
|
||||
import com.yunbao.common.event.NewRoleCustomDrawerPopupEvent;
|
||||
import com.yunbao.common.event.QuickGiftingEvent;
|
||||
import com.yunbao.common.event.SendMoneyLongEndEvent;
|
||||
import com.yunbao.common.event.ShowHideEvent;
|
||||
import com.yunbao.common.event.SlideEvent;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
@@ -108,6 +112,8 @@ import com.yunbao.live.adapter.VerticalPagerAdapter;
|
||||
import com.yunbao.live.bean.ImUserBean;
|
||||
import com.yunbao.live.bean.LiveChatBean;
|
||||
import com.yunbao.live.bean.LiveGuardInfo;
|
||||
import com.yunbao.live.bean.NewAllServerNotifyGuardEvent;
|
||||
import com.yunbao.live.dialog.DragonExpirePopup;
|
||||
import com.yunbao.live.dialog.LiveFansFragment;
|
||||
import com.yunbao.live.dialog.LiveGameDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveGiftPopup;
|
||||
@@ -958,6 +964,8 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
} else if (TextUtils.equals(event.getRightsInterests(), getString(com.yunbao.common.R.string.guard_guard))) {
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.GUARD));
|
||||
|
||||
manager.onGuardRed();
|
||||
//跳转粉丝团
|
||||
} else if (TextUtils.equals(event.getRightsInterests(), getString(com.yunbao.common.R.string.fan_club))) {
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
@@ -1485,6 +1493,11 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
manager.showXydComplete(event.getXydCompleteModel(), event.getLiveReceiveGiftBean());
|
||||
}
|
||||
break;
|
||||
case GuardSpecialEffect:
|
||||
if (manager != null) {
|
||||
manager.guardSpecialEffect(event.getLiveReceiveGiftBean());
|
||||
}
|
||||
break;
|
||||
case VOTE_CREATE:
|
||||
case VOTE_UPDATE:
|
||||
LiveRoomVoteModel voteModel = new LiveRoomVoteModel();
|
||||
@@ -1849,6 +1862,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
} else if (TextUtils.equals(event.getRightsInterests(), getString(com.yunbao.common.R.string.guard_guard))) {
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.GUARD));
|
||||
manager.onGuardRed();
|
||||
//跳转粉丝团
|
||||
} else if (TextUtils.equals(event.getRightsInterests(), getString(com.yunbao.common.R.string.fan_club))) {
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
@@ -1897,7 +1911,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
if (isShow) {
|
||||
manager.mLiveAudienceViewHolder.mRedPointPrivilege.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
if (IMLoginManager.get(mContext).getRedPoint()) {
|
||||
if (IMLoginManager.get(mContext).getRedPoint() || IMLoginManager.get(mContext).getGuardRedPoint()) {
|
||||
manager.mLiveAudienceViewHolder.mRedPointPrivilege.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
manager.mLiveAudienceViewHolder.mRedPointPrivilege.setVisibility(View.GONE);
|
||||
@@ -1918,6 +1932,55 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onGuardMaturityDateRemind(GuardMaturityDateRemindModel maturityDateRemindModel) {
|
||||
Log.e("DateRemindModel", maturityDateRemindModel.toString());
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
new XPopup.Builder(mContext)
|
||||
.asCustom(new DragonExpirePopup(mContext, mLiveUid, maturityDateRemindModel, mStream))
|
||||
.show();
|
||||
}
|
||||
}, 3000);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onSendMoneyLongModel(SendMoneyLongModel sendMoneyLongModel) {
|
||||
Log.e("DateRemindModel", sendMoneyLongModel.toString());
|
||||
if (manager != null) {
|
||||
manager.onSendMoneyLongModel(sendMoneyLongModel);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onNewAllServerNotifyGuardEvent(NewAllServerNotifyGuardEvent event) {
|
||||
if (manager != null) {
|
||||
manager.buyGuardNew(event);
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onAllServerNotifyFFGGGDJANEvent(AllServerNotifyFFGGGDJANEvent event) {
|
||||
if (manager != null) {
|
||||
manager.showAllServerNotifyFFGGGD(event);
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onSendMoneyLongEndEvent(SendMoneyLongEndEvent sendMoneyLongModel) {
|
||||
Log.e("DateRemindModel", sendMoneyLongModel.toString());
|
||||
if (manager != null) {
|
||||
manager.onSendMoneyLongEndEvent(sendMoneyLongModel);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查消息,有未读就要显示红点
|
||||
*/
|
||||
|
||||
@@ -48,12 +48,15 @@ import com.yunbao.common.bean.LiveAiRobotBean;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.common.bean.LiveUserGiftBean;
|
||||
import com.yunbao.common.bean.MicUserBean;
|
||||
import com.yunbao.common.bean.SendMoneyLongModel;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.dialog.NotCancelableDialog;
|
||||
import com.yunbao.common.event.AllServerNotifyFFGGGDJANEvent;
|
||||
import com.yunbao.common.event.GiftWallIlluminateEvent;
|
||||
import com.yunbao.common.event.LiveSudGamePopupShowOrHideEvent;
|
||||
import com.yunbao.common.event.LoginInvalidEvent;
|
||||
import com.yunbao.common.event.SendBlindGiftEvent;
|
||||
import com.yunbao.common.event.SendMoneyLongEndEvent;
|
||||
import com.yunbao.common.event.ShowHideEvent;
|
||||
import com.yunbao.common.http.CommonHttpConsts;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
@@ -1709,9 +1712,27 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
liveInputDialogFragment.setArguments(liveInputBundle);
|
||||
liveInputDialogFragment.show(getSupportFragmentManager(), "LiveInputDialogFragment");
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onSendMoneyLongModel(SendMoneyLongModel sendMoneyLongModel) {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
mLiveRoomViewHolder.onSendMoneyLongModel(sendMoneyLongModel);
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onSendMoneyLongEndEvent(SendMoneyLongEndEvent sendMoneyLongModel) {
|
||||
Log.e("DateRemindModel", sendMoneyLongModel.toString());
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
mLiveRoomViewHolder.onSendMoneyLongEndEvent(sendMoneyLongModel);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void GiftWallIlluminateEvent(GiftWallIlluminateEvent event) {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
@@ -1903,4 +1924,10 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
|
||||
|
||||
}
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onAllServerNotifyFFGGGDJANEvent(AllServerNotifyFFGGGDJANEvent event) {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
mLiveRoomViewHolder.showAllServerNotifyFFGGGD(event,false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -298,7 +298,7 @@ public class ZhuangBanActivity extends AbsActivity {
|
||||
|
||||
public static void forward(Context context, String url, boolean addArgs, int isLive) {
|
||||
if (addArgs) {
|
||||
url += "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken()+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
|
||||
url += "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
|
||||
}
|
||||
Intent intent = new Intent(context, ZhuangBanActivity.class);
|
||||
Log.i("tag", url);
|
||||
@@ -310,6 +310,16 @@ public class ZhuangBanActivity extends AbsActivity {
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
public static void forwardqeqweqq(Context context, String url, int isLive) {
|
||||
|
||||
Intent intent = new Intent(context, ZhuangBanActivity.class);
|
||||
Log.i("tag", url);
|
||||
intent.putExtra(Constants.URL, url);
|
||||
intent.putExtra("title", "");
|
||||
intent.putExtra("isLive", isLive);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
public static void forward(Context context, String url, int isLive) {
|
||||
forward(context, url, true, isLive);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.yunbao.live.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.live.R;
|
||||
|
||||
public class LiveBuyGuardTopListAdapter extends RecyclerView.Adapter<LiveBuyGuardTopListAdapter.ViewHolder>{
|
||||
private Context mContext;
|
||||
|
||||
public LiveBuyGuardTopListAdapter(Context mContext) {
|
||||
this.mContext = mContext;
|
||||
}
|
||||
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
return new ViewHolder(LayoutInflater.from(mContext).inflate(R.layout.view_vp_live_buy_guard,parent,false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||
holder.bind(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
public class ViewHolder extends RecyclerView.ViewHolder{
|
||||
ImageView imageView;
|
||||
public ViewHolder(android.view.View itemView) {
|
||||
super(itemView);
|
||||
imageView=itemView.findViewById(R.id.bg);
|
||||
Log.i("测试","额");
|
||||
itemView.setFocusable(true);
|
||||
itemView.setFocusableInTouchMode(true);
|
||||
itemView.getViewTreeObserver().addOnGlobalFocusChangeListener(new ViewTreeObserver.OnGlobalFocusChangeListener(){
|
||||
|
||||
@Override
|
||||
public void onGlobalFocusChanged(View view, View view1) {
|
||||
Log.i("测试","焦点变换:"+view+"|"+getAbsoluteAdapterPosition());
|
||||
}
|
||||
});
|
||||
/* itemView.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
||||
@Override
|
||||
public void onFocusChange(View view, boolean b) {
|
||||
Log.i("测试","焦点变换:"+b+"|"+getAbsoluteAdapterPosition());
|
||||
}
|
||||
});*/
|
||||
}
|
||||
|
||||
public void bind(int position) {
|
||||
RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) itemView.getLayoutParams();
|
||||
int def=15;
|
||||
int margin=15;
|
||||
int marginDef=5;
|
||||
if(position==0){
|
||||
params.leftMargin=DpUtil.dp2px(margin);
|
||||
params.rightMargin=DpUtil.dp2px(marginDef);
|
||||
}else if(position==getItemCount()-1){
|
||||
params.rightMargin=DpUtil.dp2px(margin);
|
||||
params.leftMargin=DpUtil.dp2px(marginDef);
|
||||
}else{
|
||||
params.leftMargin=DpUtil.dp2px(def);
|
||||
params.rightMargin=DpUtil.dp2px(def);
|
||||
}
|
||||
itemView.setLayoutParams(params);
|
||||
itemView.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
||||
@Override
|
||||
public void onFocusChange(View view, boolean b) {
|
||||
System.out.println("~~~~~~~焦点 "+b);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.yunbao.live.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.adapter.RefreshAdapter;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.bean.GuardUserModel;
|
||||
import com.yunbao.live.views.NewGuardViewHolder;
|
||||
|
||||
public class NewGuardAdapter extends RefreshAdapter<GuardUserModel> {
|
||||
public NewGuardAdapter(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
return new NewGuardViewHolder(mInflater.inflate(R.layout.view_new_guard_item, parent, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
NewGuardViewHolder newGuardViewHolder = (NewGuardViewHolder) holder;
|
||||
newGuardViewHolder.setData(mList.get(position), position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return mList.size();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.yunbao.live.bean;
|
||||
|
||||
import com.stx.xhb.androidx.entity.BaseBannerInfo;
|
||||
|
||||
public class BuyGuardBannerModel implements BaseBannerInfo {
|
||||
private int guardImage;
|
||||
private String name;
|
||||
|
||||
private String guardianMedal;
|
||||
private int guardOpen;
|
||||
private int[] gradientColors;
|
||||
private String userAvatar;
|
||||
private String liveAvatar;
|
||||
private boolean isOpen;
|
||||
|
||||
public boolean isOpen() {
|
||||
return isOpen;
|
||||
}
|
||||
|
||||
public BuyGuardBannerModel setOpen(boolean open) {
|
||||
isOpen = open;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserAvatar() {
|
||||
return userAvatar;
|
||||
}
|
||||
|
||||
public BuyGuardBannerModel setUserAvatar(String userAvatar) {
|
||||
this.userAvatar = userAvatar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLiveAvatar() {
|
||||
return liveAvatar;
|
||||
}
|
||||
|
||||
public BuyGuardBannerModel setLiveAvatar(String liveAvatar) {
|
||||
this.liveAvatar = liveAvatar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int[] getGradientColors() {
|
||||
return gradientColors;
|
||||
}
|
||||
|
||||
public BuyGuardBannerModel setGradientColors(int[] gradientColors) {
|
||||
this.gradientColors = gradientColors;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getGuardOpen() {
|
||||
return guardOpen;
|
||||
}
|
||||
|
||||
public BuyGuardBannerModel setGuardOpen(int guardOpen) {
|
||||
this.guardOpen = guardOpen;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGuardianMedal() {
|
||||
return guardianMedal;
|
||||
}
|
||||
|
||||
public BuyGuardBannerModel setGuardImage(int guardImage) {
|
||||
this.guardImage = guardImage;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BuyGuardBannerModel setGuardianMedal(String guardianMedal) {
|
||||
this.guardianMedal = guardianMedal;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public BuyGuardBannerModel setName(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getGuardImage() {
|
||||
return guardImage;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Object getXBannerUrl() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getXBannerTitle() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -31,6 +31,7 @@ public class CoinModel extends BaseModel {
|
||||
//包裹红点
|
||||
@SerializedName("users_pack_red_dot")
|
||||
private String usersPackRedDot;
|
||||
private long goldMoney;
|
||||
|
||||
public String getCoin() {
|
||||
long coinMoney = Long.parseLong(coin);
|
||||
@@ -56,7 +57,7 @@ public class CoinModel extends BaseModel {
|
||||
}
|
||||
|
||||
public String getGold() {
|
||||
long goldMoney = Long.parseLong(gold);
|
||||
goldMoney = Long.parseLong(gold);
|
||||
if (999999999 < goldMoney && goldMoney <= 999999999999L) {
|
||||
gold = gold.substring(0, gold.length() - 3);
|
||||
gold = gold + "k";
|
||||
@@ -68,6 +69,15 @@ public class CoinModel extends BaseModel {
|
||||
return gold;
|
||||
}
|
||||
|
||||
public long getGoldMoney() {
|
||||
return goldMoney;
|
||||
}
|
||||
|
||||
public CoinModel setGoldMoney(long goldMoney) {
|
||||
this.goldMoney = goldMoney;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CoinModel setGold(String gold) {
|
||||
this.gold = gold;
|
||||
return this;
|
||||
|
||||
210
live/src/main/java/com/yunbao/live/bean/GuardUserModel.java
Normal file
@@ -0,0 +1,210 @@
|
||||
package com.yunbao.live.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
public class GuardUserModel extends BaseModel {
|
||||
/**
|
||||
* {
|
||||
* "id": 98888,
|
||||
* "user_nicename": "周末暴打小朋友",
|
||||
* "avatar": "https://downs.yaoulive.com/mannine.png",
|
||||
* "sex": 1,
|
||||
* "type": 1,
|
||||
* "level": "33",
|
||||
* "dress_img": "https://downs.yaoulive.com/dress/effect/huangdi-touxiang.svga",
|
||||
* "contribute": "40680",
|
||||
* "level_thumb": "https://downs.yaoulive.com/level/user_lv30_bg.png",
|
||||
* "guard_type": 1,
|
||||
* "guard_exp": 0,
|
||||
* "guard_level": 1,
|
||||
* "guard_name": "星之守護",
|
||||
* "guard_img": "https://ceshi.yaoulive.com/data/upload/20240304/guard_xing_open.png"
|
||||
* }
|
||||
*/
|
||||
@SerializedName("id")
|
||||
private int id;
|
||||
@SerializedName("user_nicename")
|
||||
private String userNicename;
|
||||
@SerializedName("avatar")
|
||||
private String avatar;
|
||||
@SerializedName("sex")
|
||||
private int sex;
|
||||
@SerializedName("type")
|
||||
private int type;
|
||||
@SerializedName("level")
|
||||
private String level;
|
||||
@SerializedName("dress_img")
|
||||
private String dressImg;
|
||||
@SerializedName("contribute")
|
||||
private String contribute;
|
||||
@SerializedName("level_thumb")
|
||||
private String levelThumb;
|
||||
@SerializedName("guard_type")
|
||||
private int guardType;
|
||||
@SerializedName("guard_exp")
|
||||
private String guardExp;
|
||||
@SerializedName("guard_level")
|
||||
private int guardLevel;
|
||||
@SerializedName("guard_name")
|
||||
private String guardName;
|
||||
@SerializedName("guard_img")
|
||||
private String guardImg;
|
||||
@SerializedName("guard_level_card")
|
||||
private String guardLevelCard;
|
||||
|
||||
public String getGuardLevelCard() {
|
||||
return guardLevelCard;
|
||||
}
|
||||
|
||||
public GuardUserModel setGuardLevelCard(String guardLevelCard) {
|
||||
this.guardLevelCard = guardLevelCard;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public GuardUserModel setId(int id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserNicename() {
|
||||
return userNicename;
|
||||
}
|
||||
|
||||
public GuardUserModel setUserNicename(String userNicename) {
|
||||
this.userNicename = userNicename;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public GuardUserModel setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public GuardUserModel setSex(int sex) {
|
||||
this.sex = sex;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public GuardUserModel setType(int type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public GuardUserModel setLevel(String level) {
|
||||
this.level = level;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDressImg() {
|
||||
return dressImg;
|
||||
}
|
||||
|
||||
public GuardUserModel setDressImg(String dressImg) {
|
||||
this.dressImg = dressImg;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getContribute() {
|
||||
return contribute;
|
||||
}
|
||||
|
||||
public GuardUserModel setContribute(String contribute) {
|
||||
this.contribute = contribute;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLevelThumb() {
|
||||
return levelThumb;
|
||||
}
|
||||
|
||||
public GuardUserModel setLevelThumb(String levelThumb) {
|
||||
this.levelThumb = levelThumb;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getGuardType() {
|
||||
return guardType;
|
||||
}
|
||||
|
||||
public GuardUserModel setGuardType(int guardType) {
|
||||
this.guardType = guardType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGuardExp() {
|
||||
return guardExp;
|
||||
}
|
||||
|
||||
public GuardUserModel setGuardExp(String guardExp) {
|
||||
this.guardExp = guardExp;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getGuardLevel() {
|
||||
return guardLevel;
|
||||
}
|
||||
|
||||
public GuardUserModel setGuardLevel(int guardLevel) {
|
||||
this.guardLevel = guardLevel;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGuardName() {
|
||||
return guardName;
|
||||
}
|
||||
|
||||
public GuardUserModel setGuardName(String guardName) {
|
||||
this.guardName = guardName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGuardImg() {
|
||||
return guardImg;
|
||||
}
|
||||
|
||||
public GuardUserModel setGuardImg(String guardImg) {
|
||||
this.guardImg = guardImg;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "GuardUserModel{" +
|
||||
"id=" + id +
|
||||
", userNicename='" + userNicename + '\'' +
|
||||
", avatar='" + avatar + '\'' +
|
||||
", sex=" + sex +
|
||||
", type=" + type +
|
||||
", level='" + level + '\'' +
|
||||
", dressImg='" + dressImg + '\'' +
|
||||
", contribute='" + contribute + '\'' +
|
||||
", levelThumb='" + levelThumb + '\'' +
|
||||
", guardType=" + guardType +
|
||||
", guardExp=" + guardExp +
|
||||
", guardLevel=" + guardLevel +
|
||||
", guardName='" + guardName + '\'' +
|
||||
", guardImg='" + guardImg + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import android.text.TextUtils;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
import com.yunbao.common.event.AllServerNotifyEvent;
|
||||
import com.yunbao.common.event.AllServerNotifyFFGGGDJANEvent;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2017/8/22.
|
||||
@@ -62,6 +63,66 @@ public class LiveReceiveGiftBean extends BaseModel {
|
||||
private String namingUserAvatar;
|
||||
private String namingStatus;
|
||||
private String namingCoin;
|
||||
private String medal_name;
|
||||
private String msg;
|
||||
private String msg_en;
|
||||
private String guard_type;
|
||||
private AllServerNotifyFFGGGDJANEvent notifyFFGGGDJANEvent;
|
||||
private boolean showB;
|
||||
|
||||
public boolean isShowB() {
|
||||
return showB;
|
||||
}
|
||||
|
||||
public LiveReceiveGiftBean setShowB(boolean showB) {
|
||||
this.showB = showB;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AllServerNotifyFFGGGDJANEvent getNotifyFFGGGDJANEvent() {
|
||||
return notifyFFGGGDJANEvent;
|
||||
}
|
||||
|
||||
public LiveReceiveGiftBean setNotifyFFGGGDJANEvent(AllServerNotifyFFGGGDJANEvent notifyFFGGGDJANEvent) {
|
||||
this.notifyFFGGGDJANEvent = notifyFFGGGDJANEvent;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public LiveReceiveGiftBean setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMsg_en() {
|
||||
return msg_en;
|
||||
}
|
||||
|
||||
public LiveReceiveGiftBean setMsg_en(String msg_en) {
|
||||
this.msg_en = msg_en;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGuard_type() {
|
||||
return guard_type;
|
||||
}
|
||||
|
||||
public LiveReceiveGiftBean setGuard_type(String guard_type) {
|
||||
this.guard_type = guard_type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMedal_name() {
|
||||
return medal_name;
|
||||
}
|
||||
|
||||
public LiveReceiveGiftBean setMedal_name(String medal_name) {
|
||||
this.medal_name = medal_name;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNamingLiveuid() {
|
||||
return namingLiveuid;
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
package com.yunbao.live.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
public class NewAllServerNotifyGuardEvent extends BaseModel {
|
||||
/**
|
||||
* {
|
||||
* "_method_": "AllServerNotify",
|
||||
* "action": "90",
|
||||
* "guard_type": "1", // 守护类型
|
||||
* "uid": "98888", // 用户ID
|
||||
* "uname": "周末暴打小朋友", // 用户昵称
|
||||
* "avatar": "https://downs.yaoulive.com/mannine.png", // 用户头像链接
|
||||
* "liveuid": "98889", // 主播ID
|
||||
* "msg_cn": "周末暴打小朋友在接化发直播間開通【星之守護】",
|
||||
* "msg_en": "周末暴打小朋友opened 【星之守護】 in 接化发 live broadcast room"
|
||||
* }
|
||||
*/
|
||||
|
||||
@SerializedName("_method_")
|
||||
private String method;
|
||||
@SerializedName("action")
|
||||
private String action;
|
||||
@SerializedName("guard_type")
|
||||
private String guardType;
|
||||
@SerializedName("uid")
|
||||
private String uid;
|
||||
@SerializedName("uname")
|
||||
private String uname;
|
||||
@SerializedName("avatar")
|
||||
private String avatar;
|
||||
@SerializedName("liveuid")
|
||||
private String liveuid;
|
||||
@SerializedName("msg_cn")
|
||||
private String msgCn;
|
||||
@SerializedName("msg_en")
|
||||
private String msgEn;
|
||||
@SerializedName("is_onlookers")
|
||||
private String isOnlookers ;
|
||||
|
||||
public String getIsOnlookers() {
|
||||
return isOnlookers;
|
||||
}
|
||||
|
||||
public NewAllServerNotifyGuardEvent setIsOnlookers(String isOnlookers) {
|
||||
this.isOnlookers = isOnlookers;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMethod() {
|
||||
return method;
|
||||
}
|
||||
|
||||
public NewAllServerNotifyGuardEvent setMethod(String method) {
|
||||
this.method = method;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAction() {
|
||||
return action;
|
||||
}
|
||||
|
||||
public NewAllServerNotifyGuardEvent setAction(String action) {
|
||||
this.action = action;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGuardType() {
|
||||
return guardType;
|
||||
}
|
||||
|
||||
public NewAllServerNotifyGuardEvent setGuardType(String guardType) {
|
||||
this.guardType = guardType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public NewAllServerNotifyGuardEvent setUid(String uid) {
|
||||
this.uid = uid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUname() {
|
||||
return uname;
|
||||
}
|
||||
|
||||
public NewAllServerNotifyGuardEvent setUname(String uname) {
|
||||
this.uname = uname;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public NewAllServerNotifyGuardEvent setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLiveuid() {
|
||||
return liveuid;
|
||||
}
|
||||
|
||||
public NewAllServerNotifyGuardEvent setLiveuid(String liveuid) {
|
||||
this.liveuid = liveuid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMsgCn() {
|
||||
return msgCn;
|
||||
}
|
||||
|
||||
public NewAllServerNotifyGuardEvent setMsgCn(String msgCn) {
|
||||
this.msgCn = msgCn;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMsgEn() {
|
||||
return msgEn;
|
||||
}
|
||||
|
||||
public NewAllServerNotifyGuardEvent setMsgEn(String msgEn) {
|
||||
this.msgEn = msgEn;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.yunbao.live.custom;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.animation.ScaleAnimation;
|
||||
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
public class LiveBuyGuardLinearLayoutManager extends LinearLayoutManager {
|
||||
String TAG = "测试";
|
||||
|
||||
public LiveBuyGuardLinearLayoutManager(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public LiveBuyGuardLinearLayoutManager(Context context, int orientation, boolean reverseLayout) {
|
||||
super(context, orientation, reverseLayout);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int scrollHorizontallyBy(int dx, RecyclerView.Recycler recycler, RecyclerView.State state) {
|
||||
int scroll = super.scrollHorizontallyBy(dx, recycler, state);
|
||||
Log.i(TAG, "scrollHorizontallyBy: dx "+dx+"|"+state.hasTargetScrollPosition()+"|"+state.isPreLayout()+"|"+scroll);
|
||||
View now = findViewByPosition(findFirstCompletelyVisibleItemPosition());
|
||||
View old = findViewByPosition(findFirstCompletelyVisibleItemPosition() - 1);
|
||||
View next = findViewByPosition(findFirstCompletelyVisibleItemPosition() + 1);
|
||||
if (now != null) {
|
||||
toView(now, 1);
|
||||
}
|
||||
if (old != null) {
|
||||
toView(old, 0.6f);
|
||||
}
|
||||
if (next != null) {
|
||||
toView(next, 0.6f);
|
||||
}
|
||||
|
||||
//toView(now,1);
|
||||
Log.i(TAG, "scrollHorizontallyBy: " + scroll);
|
||||
|
||||
return scroll;
|
||||
}
|
||||
|
||||
//https://www.jianshu.com/p/b6c42e0f6422
|
||||
private void toView(View view, float scale) {
|
||||
if (view == null) return;
|
||||
if(view.getAnimation()!=null&&view.getAnimation().hasStarted()) return;
|
||||
ScaleAnimation scaleAnimation = new ScaleAnimation(view.getScaleX(),scale,view.getScaleY(), scale);
|
||||
//scaleAnimation.setDuration(100);
|
||||
//view.startAnimation(scaleAnimation);
|
||||
view.setScaleX(scale);
|
||||
view.setScaleY(scale);
|
||||
}
|
||||
}
|
||||
137
live/src/main/java/com/yunbao/live/dialog/DragonExpirePopup.java
Normal file
@@ -0,0 +1,137 @@
|
||||
package com.yunbao.live.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
|
||||
import com.lxj.xpopup.core.CenterPopupView;
|
||||
import com.makeramen.roundedimageview.RoundedImageView;
|
||||
import com.yunbao.common.bean.GuardGetGuardUserInfoModel;
|
||||
import com.yunbao.common.bean.GuardMaturityDateRemindModel;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.live.R;
|
||||
|
||||
public class DragonExpirePopup extends CenterPopupView {
|
||||
FragmentActivity activity;
|
||||
String mLiveUid;
|
||||
String mStream;
|
||||
RoundedImageView liveAvatar;
|
||||
RoundedImageView userAvatar;
|
||||
|
||||
TextView guardTitleTop;
|
||||
TextView dueInGuard;
|
||||
TextView userName;
|
||||
TextView guardianPrivilege;
|
||||
TextView dueIn;
|
||||
TextView dueInGuard2;
|
||||
GuardMaturityDateRemindModel maturityDateRemindModel;
|
||||
GuardGetGuardUserInfoModel getGuardUserInfoModel = null;
|
||||
|
||||
public DragonExpirePopup(@NonNull Context context, String liveUid, GuardMaturityDateRemindModel maturityDateRemindModel, String stream) {
|
||||
super(context);
|
||||
activity = (FragmentActivity) context;
|
||||
mLiveUid = liveUid;
|
||||
this.maturityDateRemindModel = maturityDateRemindModel;
|
||||
mStream = stream;
|
||||
}
|
||||
|
||||
// 返回自定义弹窗的布局
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.dragon_expire_popup;
|
||||
}
|
||||
|
||||
// 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
liveAvatar = findViewById(R.id.live_avatar);
|
||||
userAvatar = findViewById(R.id.user_avatar);
|
||||
guardTitleTop = findViewById(R.id.guard_title_top);
|
||||
dueInGuard = findViewById(R.id.due_in_guard);
|
||||
userName = findViewById(R.id.user_name);
|
||||
guardianPrivilege = findViewById(R.id.guardian_privilege);
|
||||
dueInGuard2 = findViewById(R.id.due_in_guard2);
|
||||
dueIn = findViewById(R.id.due_in);
|
||||
|
||||
|
||||
ImgLoader.display(getContext(), maturityDateRemindModel.getUserAvatar(), userAvatar);
|
||||
ImgLoader.display(getContext(), maturityDateRemindModel.getLiveAvatar(), liveAvatar);
|
||||
|
||||
LiveNetManager.get(getContext()).getGuardUserInfo(mLiveUid, new HttpCallback<GuardGetGuardUserInfoModel>() {
|
||||
@Override
|
||||
public void onSuccess(GuardGetGuardUserInfoModel data) {
|
||||
getGuardUserInfoModel = data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
String guardName = WordUtil.isNewZh() ? "星之守護" : "Star Guardian";
|
||||
switch (maturityDateRemindModel.getGuardType()) {
|
||||
case "1":
|
||||
guardName = WordUtil.isNewZh() ? "星之守護" : "Star Guardian";
|
||||
break;
|
||||
case "2":
|
||||
guardName = WordUtil.isNewZh() ? "王之守護" : "King Guardian";
|
||||
break;
|
||||
default:
|
||||
guardName = WordUtil.isNewZh() ? "神之守護" : "God Guardian";
|
||||
break;
|
||||
}
|
||||
StringBuffer guardTitleTopBuffer = new StringBuffer();
|
||||
if (WordUtil.isNewZh()) {
|
||||
guardTitleTopBuffer.append("您的")
|
||||
.append(guardName);
|
||||
} else {
|
||||
guardTitleTopBuffer.append("Your")
|
||||
.append(guardName);
|
||||
}
|
||||
if (maturityDateRemindModel.getIsOverdue() == 0) {
|
||||
guardianPrivilege.setText(WordUtil.getNewString(R.string.continuative_guardian_privilege));
|
||||
dueIn.setText(WordUtil.isNewZh() ? "還有" : "Due in ");
|
||||
dueInGuard2.setText(WordUtil.isNewZh() ? "天到期" : " days ");
|
||||
} else {
|
||||
guardianPrivilege.setText(WordUtil.getNewString(R.string.continuative_guardian_privilege2));
|
||||
dueIn.setText(WordUtil.isNewZh() ? "已到期" : "Expired ");
|
||||
dueInGuard2.setText(WordUtil.isNewZh() ? "天" : " days ");
|
||||
}
|
||||
dueInGuard.setText(String.valueOf(maturityDateRemindModel.getDays()));
|
||||
guardTitleTop.setText(guardTitleTopBuffer.toString());
|
||||
StringBuffer userNameBuffer = new StringBuffer();
|
||||
userNameBuffer.append(maturityDateRemindModel.getLiveNicename())
|
||||
.append("&")
|
||||
.append(maturityDateRemindModel.getUserNicename());
|
||||
userName.setText(userNameBuffer.toString());
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.dragon_close), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.travel_renewal), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
dismiss();
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
new LiveBuyGuardDialog(activity, mLiveUid, mStream, getGuardUserInfoModel).showDialog();
|
||||
}
|
||||
},1000);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
package com.yunbao.live.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.flyjingfish.gradienttextviewlib.GradientTextView;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.yunbao.common.adapter.DragonSendMoneyListAdapter;
|
||||
import com.yunbao.common.bean.sendMoneyLongListModel;
|
||||
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
||||
import com.yunbao.common.dialog.DragonRulePopup;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.DragonSendMoneyListViewHolder;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.live.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class DragonSendMoneyListPopup extends AbsDialogPopupWindow {
|
||||
FragmentActivity activity;
|
||||
String mLiveUid;
|
||||
DragonSendMoneyListAdapter dragonSendMoneyListAdapter;
|
||||
RecyclerView send_money_list;
|
||||
boolean isAnchor;
|
||||
GradientTextView title;
|
||||
boolean isAttention;
|
||||
|
||||
public DragonSendMoneyListPopup(@NonNull Context context, String liveUid, boolean isAnchor, boolean isAttention) {
|
||||
super(context);
|
||||
activity = (FragmentActivity) context;
|
||||
mLiveUid = liveUid;
|
||||
this.isAnchor = isAnchor;
|
||||
this.isAttention = isAttention;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildDialog(XPopup.Builder builder) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int bindLayoutId() {
|
||||
return R.layout.dialog_dragon_send_money_list;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
send_money_list = findViewById(R.id.send_money_list);
|
||||
title = findViewById(R.id.title);
|
||||
|
||||
send_money_list.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
|
||||
dragonSendMoneyListAdapter = new DragonSendMoneyListAdapter(send_money_list);
|
||||
|
||||
send_money_list.setAdapter(dragonSendMoneyListAdapter);
|
||||
dragonSendMoneyListAdapter.setAnchor(isAnchor);
|
||||
dragonSendMoneyListAdapter.setAttention(isAttention);
|
||||
dragonSendMoneyListAdapter.setCallBack(new DragonSendMoneyListViewHolder.DragonSendMoneyListClicksCallBack() {
|
||||
@Override
|
||||
public void onParticipate(sendMoneyLongListModel moneyLongListModel) {
|
||||
if (isAttention) {
|
||||
LiveNetManager.get(mContext)
|
||||
.participateMoneyLong(mLiveUid, moneyLongListModel.getSendMoneyLongKey(), new HttpCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
ToastUtil.show(data);
|
||||
LiveNetManager.get(mContext)
|
||||
.sendMoneyLongList(mLiveUid, new HttpCallback<List<sendMoneyLongListModel>>() {
|
||||
@Override
|
||||
public void onSuccess(List<sendMoneyLongListModel> data) {
|
||||
dragonSendMoneyListAdapter.setMoneyLongListModels(data);
|
||||
send_money_list.getRecycledViewPool().setMaxRecycledViews(0, data.size());
|
||||
title.removeCallbacks(refreshRunnable);
|
||||
title.postDelayed(refreshRunnable, 1000);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
ToastUtil.show(WordUtil.isNewZh() ? "關注主播後可參與活動" : "Follow the anchor can participate in the activity");
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
LiveNetManager.get(mContext)
|
||||
.sendMoneyLongList(mLiveUid, new HttpCallback<List<sendMoneyLongListModel>>() {
|
||||
@Override
|
||||
public void onSuccess(List<sendMoneyLongListModel> data) {
|
||||
dragonSendMoneyListAdapter.setMoneyLongListModels(data);
|
||||
send_money_list.getRecycledViewPool().setMaxRecycledViews(0, data.size());
|
||||
title.removeCallbacks(refreshRunnable);
|
||||
title.postDelayed(refreshRunnable, 1000);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.dragon_rule), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
new XPopup.Builder(getContext())
|
||||
.asCustom(new DragonRulePopup(getContext(),true))
|
||||
.show();
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.money_back), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
Runnable refreshRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
List<sendMoneyLongListModel> moneyLongListModels = dragonSendMoneyListAdapter.getMoneyLongListModels();
|
||||
List<sendMoneyLongListModel> models = new ArrayList<>();
|
||||
for (sendMoneyLongListModel listModel : moneyLongListModels) {
|
||||
if (TextUtils.equals("0", listModel.getParticipate())) {
|
||||
models.add(listModel);
|
||||
} else {
|
||||
String countdown = listModel.getCountdown();
|
||||
long countdownNumber = Long.parseLong(countdown);
|
||||
countdownNumber = countdownNumber - 1;
|
||||
if (countdownNumber > 0) {
|
||||
listModel.setCountdown(String.valueOf(countdownNumber));
|
||||
models.add(listModel);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
dragonSendMoneyListAdapter.setMoneyLongListModels(models);
|
||||
title.postDelayed(refreshRunnable, 1000);
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
package com.yunbao.live.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
|
||||
import com.blankj.utilcode.util.GsonUtils;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.lxj.xpopup.core.CenterPopupView;
|
||||
import com.yunbao.common.dialog.DragonRulePopup;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.bean.CoinModel;
|
||||
|
||||
public class DragonSendsMoneyPopup extends CenterPopupView {
|
||||
TextView my_gold_coin;
|
||||
long goldMoney;
|
||||
EditText dragon_money;
|
||||
String mLiveUid;
|
||||
FragmentActivity activity;
|
||||
|
||||
public DragonSendsMoneyPopup(@NonNull Context context, String liveUid) {
|
||||
super(context);
|
||||
activity = (FragmentActivity) context;
|
||||
mLiveUid = liveUid;
|
||||
}
|
||||
|
||||
// 返回自定义弹窗的布局
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.dragon_sends_money_popup;
|
||||
}
|
||||
|
||||
// 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
my_gold_coin = findViewById(R.id.my_gold_coin);
|
||||
dragon_money = findViewById(R.id.dragon_money);
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.dragon_close), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.dragon_rule), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
new XPopup.Builder(getContext())
|
||||
.asCustom(new DragonRulePopup(getContext(),false))
|
||||
.show();
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.open_an_activity), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
String dragonMoney = dragon_money.getText().toString().trim();
|
||||
if (!TextUtils.isEmpty(dragonMoney)) {
|
||||
long money = Long.parseLong(dragonMoney);
|
||||
if (goldMoney >= money) {
|
||||
if (money >= 1000) {
|
||||
LiveNetManager.get(getContext())
|
||||
.sendMoneyLong(mLiveUid, String.valueOf(money), new com.yunbao.common.http.base.HttpCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
dismiss();
|
||||
ToastUtil.show(WordUtil.isNewZh() ? "開啓成功" : "Open successfully");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
ToastUtil.show(WordUtil.isNewZh() ? "金豆數量不低於1000" : "The number of golden beans is not less than 1000");
|
||||
}
|
||||
|
||||
} else {
|
||||
ToastUtil.show(WordUtil.isNewZh() ? "輸入數量不能大於自己的金豆總數量" : "The input quantity cannot be greater than the total number of gold beans");
|
||||
}
|
||||
|
||||
} else {
|
||||
ToastUtil.show(WordUtil.isNewZh() ? "輸入數量不能爲空" : "The input quantity cannot be empty");
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
getCoin();
|
||||
|
||||
}
|
||||
|
||||
private void getCoin() {
|
||||
LiveHttpUtil.getCoin(new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
if (!TextUtils.isEmpty(info[0])) {
|
||||
CoinModel coinModel = GsonUtils.fromJson(info[0], CoinModel.class);
|
||||
|
||||
my_gold_coin.setText(coinModel.getGold());
|
||||
goldMoney = coinModel.getGoldMoney();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
public interface DragonSendsMoneyCallBack {
|
||||
void onSendMoneyLong();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,617 @@
|
||||
package com.yunbao.live.dialog;
|
||||
|
||||
import static com.yunbao.common.utils.RouteUtil.PATH_COIN;
|
||||
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Paint;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.animation.LinearInterpolator;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.flyjingfish.gradienttextviewlib.GradientTextView;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.lxj.xpopup.enums.PopupPosition;
|
||||
import com.makeramen.roundedimageview.RoundedImageView;
|
||||
import com.stx.xhb.androidx.XBanner;
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.adapter.LiveBuyGuardPrivilegeAdapter;
|
||||
import com.yunbao.common.bean.CheckUpgradesModel;
|
||||
import com.yunbao.common.bean.GuardDataTipModel;
|
||||
import com.yunbao.common.bean.GuardGetGuardOpenInfoModel;
|
||||
import com.yunbao.common.bean.GuardGetGuardUserInfoModel;
|
||||
import com.yunbao.common.bean.GuardPriceModel;
|
||||
import com.yunbao.common.bean.GuardUserInfoModel;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
||||
import com.yunbao.common.dialog.GuardBuyTipsDialog;
|
||||
import com.yunbao.common.dialog.GuardUpgradePopup;
|
||||
import com.yunbao.common.dialog.LiveBuyGuardSelectPopup;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.DeviceUtils;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||
import com.yunbao.live.bean.BuyGuardBannerModel;
|
||||
import com.yunbao.live.fragments.LiveBuyGuardVPFragment;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class LiveBuyGuardDialog extends AbsDialogPopupWindow {
|
||||
FragmentActivity activity;
|
||||
|
||||
List<Fragment> fragments = new ArrayList<>();
|
||||
XBanner buyGuardBanner;
|
||||
List<BuyGuardBannerModel> buyGuardBannerModels = new ArrayList<>();
|
||||
|
||||
FrameLayout bottomPanel;
|
||||
ImageView btnGuard;
|
||||
TextView openTheGuard;
|
||||
TextView originalPrice;
|
||||
long animDuration = 500;
|
||||
ImageView guardArrow;
|
||||
TextView guardMonth;
|
||||
String mLiveUid;
|
||||
String mStream;
|
||||
List<GuardDataTipModel> guardDataTipModels;
|
||||
List<GuardPriceModel> price = new ArrayList<>();
|
||||
TextView discountPrice, discount;
|
||||
GuardPriceModel guardPriceModel;
|
||||
RecyclerView guardPrivilege;
|
||||
LiveBuyGuardPrivilegeAdapter buyGuardPrivilegeAdapter;
|
||||
List<String> guardPrivilegeStrings = new ArrayList<>();
|
||||
GuardDataTipModel dataTipModel;
|
||||
GuardGetGuardUserInfoModel mGuardUserInfoModel;
|
||||
GuardUserInfoModel userInfo;
|
||||
|
||||
public LiveBuyGuardDialog(@NonNull Context context, String liveUid, String stream, GuardGetGuardUserInfoModel guardUserInfoModel) {
|
||||
super(context);
|
||||
activity = (FragmentActivity) context;
|
||||
mLiveUid = liveUid;
|
||||
mStream = stream;
|
||||
mGuardUserInfoModel = guardUserInfoModel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildDialog(XPopup.Builder builder) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int bindLayoutId() {
|
||||
return R.layout.dialog_live_buy_guard;
|
||||
}
|
||||
|
||||
//底部栏
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
buyGuardBanner = findViewById(R.id.buy_guard_banner);
|
||||
bottomPanel = findViewById(R.id.bottom_panel);
|
||||
btnGuard = findViewById(R.id.btn_guard);
|
||||
openTheGuard = findViewById(R.id.open_the_guard);
|
||||
originalPrice = findViewById(R.id.original_price);
|
||||
guardArrow = findViewById(R.id.guard_arrow);
|
||||
guardMonth = findViewById(R.id.guard_month);
|
||||
discountPrice = findViewById(R.id.discount_price);
|
||||
discount = findViewById(R.id.discount);
|
||||
guardPrivilege = findViewById(R.id.guard_privilege);
|
||||
|
||||
originalPrice.setPaintFlags(Paint.STRIKE_THRU_TEXT_FLAG);
|
||||
guardPrivilege.setLayoutManager(new GridLayoutManager(getContext(), 4));
|
||||
buyGuardPrivilegeAdapter = new LiveBuyGuardPrivilegeAdapter(guardPrivilegeStrings);
|
||||
guardPrivilege.setAdapter(buyGuardPrivilegeAdapter);
|
||||
int[] gradientColorsStart = {Color.parseColor("#68B4F9"), Color.parseColor("#DCE3F9")};
|
||||
int[] gradientColorsKing = {Color.parseColor("#F5DBD5"), Color.parseColor("#FFF8F1")};
|
||||
int[] gradientColorsGod = {Color.parseColor("#FFC179"), Color.parseColor("#FFF2D7")};
|
||||
int[] openColorsGod = {Color.parseColor("#FFFFFF"), Color.parseColor("#FFFFFF")};
|
||||
LiveNetManager.get(mContext).getGuardOpenInfo(mLiveUid, new HttpCallback<GuardGetGuardOpenInfoModel>() {
|
||||
@Override
|
||||
public void onSuccess(GuardGetGuardOpenInfoModel data) {
|
||||
guardDataTipModels = data.getGuardData();
|
||||
userInfo = data.getUserInfo();
|
||||
// guardDataTipModels.get(0).setOpen(true);
|
||||
for (GuardDataTipModel guardDataTipModel : guardDataTipModels) {
|
||||
BuyGuardBannerModel guardBannerModel = new BuyGuardBannerModel();
|
||||
guardBannerModel.setGuardianMedal(guardDataTipModel.isOpen() ? guardDataTipModel.getOpenImg() : guardDataTipModel.getCloseImg())
|
||||
.setName(guardDataTipModel.getGuardName())
|
||||
.setLiveAvatar(data.getUserInfo().getLiveAvatar())
|
||||
.setUserAvatar(data.getUserInfo().getUserAvatar())
|
||||
.setOpen(guardDataTipModel.isOpen());
|
||||
if (guardDataTipModel.getGuardType() == 1) {
|
||||
guardBannerModel.setGradientColors(gradientColorsStart)
|
||||
.setGuardOpen(R.mipmap.icon_bg_star_guard_open)
|
||||
.setGuardImage(WordUtil.isNewZh() ? R.mipmap.bg_star_guard : R.mipmap.bg_star_guard_en);
|
||||
} else if (guardDataTipModel.getGuardType() == 2) {
|
||||
guardBannerModel.setGuardOpen(R.mipmap.icon_bg_king_guard_open)
|
||||
.setGradientColors(gradientColorsKing)
|
||||
.setGuardImage(WordUtil.isNewZh() ? R.mipmap.bg_king_guard : R.mipmap.bg_king_guard_en);
|
||||
} else {
|
||||
guardBannerModel.setGuardOpen(R.mipmap.icon_god_guard_open)
|
||||
.setGradientColors(gradientColorsGod)
|
||||
.setGuardImage(WordUtil.isNewZh() ? R.mipmap.bg_god_guard : R.mipmap.bg_god_guard_en);
|
||||
}
|
||||
buyGuardBannerModels.add(guardBannerModel);
|
||||
}
|
||||
buyGuardBanner.setBannerData(R.layout.banner_item_buy_guard, buyGuardBannerModels);
|
||||
buyGuardBanner.setIsClipChildrenMode(true);
|
||||
guardPrivilegeStrings = data.getGuardData().get(0).getGuardPrivilege();
|
||||
buyGuardBanner.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (mGuardUserInfoModel != null) {
|
||||
if (mGuardUserInfoModel.getGuardType() != 0 && TextUtils.equals(mGuardUserInfoModel.getIsOpen(), "1")) {
|
||||
buyGuardBanner.setBannerCurrentItem(mGuardUserInfoModel.getGuardType() - 1);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}, 500);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
|
||||
buyGuardBanner.loadImage(new XBanner.XBannerAdapter() {
|
||||
@Override
|
||||
public void loadBanner(XBanner banner, Object model, View view, int position) {
|
||||
|
||||
BuyGuardBannerModel guardBannerModel = ((BuyGuardBannerModel) model);
|
||||
ImageView bg = view.findViewById(R.id.bg);
|
||||
ImageView guardianMedal = view.findViewById(R.id.guardian_medal);
|
||||
ImageView guardOpen = view.findViewById(R.id.guard_open);
|
||||
GradientTextView godGuard = view.findViewById(R.id.god_guard);
|
||||
RoundedImageView userAvatar = view.findViewById(R.id.user_avatar);
|
||||
RoundedImageView liveAvatar = view.findViewById(R.id.live_avatar);
|
||||
|
||||
godGuard.setGradientColors(guardBannerModel.isOpen() ? openColorsGod : guardBannerModel.getGradientColors());
|
||||
godGuard.setText(guardBannerModel.isOpen() ? WordUtil.getNewString(R.string.have_opened) : WordUtil.getNewString(R.string.not_yet_open));
|
||||
ImgLoader.display(getContext(), guardBannerModel.getGuardImage(), bg);
|
||||
ImgLoader.display(getContext(), guardBannerModel.getGuardianMedal(), guardianMedal);
|
||||
ImgLoader.display(getContext(), guardBannerModel.getGuardOpen(), guardOpen);
|
||||
ImgLoader.display(getContext(), guardBannerModel.getUserAvatar(), userAvatar);
|
||||
ImgLoader.display(getContext(), guardBannerModel.getLiveAvatar(), liveAvatar);
|
||||
ViewClicksAntiShake.clicksAntiShake(view.findViewById(R.id.tas_guardian_group), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
new LiveGuardDialog(mContext, false, mLiveUid, mStream).showDialog();
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
buyGuardBanner.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
||||
@Override
|
||||
public void onPageScrolled(int position, float v, int i1) {
|
||||
BuyGuardBannerModel guardBannerModel = buyGuardBannerModels.get(position);
|
||||
Log.e("LiveBuyGuardDialog", "onPageScrolled name = " + guardBannerModel.getName() + " position=" + position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageSelected(int position) {
|
||||
BuyGuardBannerModel guardBannerModel = buyGuardBannerModels.get(position);
|
||||
dataTipModel = guardDataTipModels.get(position);
|
||||
price = dataTipModel.getPrice();
|
||||
Log.e("LiveBuyGuardDialog", "onPageSelected BuyGuardBannerModel name = " + guardBannerModel.getName() + " position=" + position);
|
||||
if (position == 0) {
|
||||
MobclickAgent.onEvent(mContext, "star_guardian_people", "星之守护页面观看次数及人数");
|
||||
bottomPanel.setBackgroundResource(R.drawable.bg_star_guard_bottom_panel);
|
||||
ImgLoader.display(getContext(), R.mipmap.btn_star_guard, btnGuard);
|
||||
openTheGuard.setText(dataTipModel.isOpen() ? WordUtil.isNewZh() ? "續費星之守護" : "Renew Star Guardian"
|
||||
: WordUtil.getNewString(R.string.open_the_start_guard));
|
||||
|
||||
} else if (position == 1) {
|
||||
MobclickAgent.onEvent(mContext, "king_guardian_people", "王之守护页面观看次数及人数");
|
||||
bottomPanel.setBackgroundResource(R.drawable.bg_king_guard_bottom_panel);
|
||||
ImgLoader.display(getContext(), R.mipmap.btn_king_guard, btnGuard);
|
||||
openTheGuard.setText(dataTipModel.isOpen() ? WordUtil.isNewZh() ? "續費王之守護" : "Renew King Guardian"
|
||||
: WordUtil.getNewString(R.string.open_the_kings_guard));
|
||||
} else if (position == 2) {
|
||||
MobclickAgent.onEvent(mContext, "god_guardian_people", "神之守护页面观看次数及人数");
|
||||
bottomPanel.setBackgroundResource(R.drawable.bg_god_guard_bottom_panel);
|
||||
ImgLoader.display(getContext(), R.mipmap.btn_god_guard, btnGuard);
|
||||
openTheGuard.setText(dataTipModel.isOpen() ? WordUtil.isNewZh() ? "續費神之守護" : "Renew God Guardian"
|
||||
: WordUtil.getNewString(R.string.open_the_god_guard));
|
||||
}
|
||||
guardPriceModel = price.get(0);
|
||||
if (TextUtils.isEmpty(guardPriceModel.getDiscountPrice())) {
|
||||
discountPrice.setText(String.valueOf(guardPriceModel.getOriginalPrice()));
|
||||
originalPrice.setVisibility(GONE);
|
||||
discount.setVisibility(GONE);
|
||||
} else {
|
||||
originalPrice.setVisibility(VISIBLE);
|
||||
discount.setVisibility(VISIBLE);
|
||||
discountPrice.setText(String.valueOf(guardPriceModel.getDiscountPrice()));
|
||||
discount.setText(String.valueOf(guardPriceModel.getDiscount()));
|
||||
originalPrice.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
// SpannableString spannableString = new SpannableString(String.valueOf(guardPriceModel.getOriginalPrice()));
|
||||
// StrikethroughSpan strikethroughSpan = new StrikethroughSpan();
|
||||
// spannableString.setSpan(strikethroughSpan, 0, spannableString.length(), Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||
originalPrice.getPaint().setFlags(Paint.STRIKE_THRU_TEXT_FLAG | Paint.ANTI_ALIAS_FLAG);
|
||||
originalPrice.setText(String.valueOf(guardPriceModel.getOriginalPrice()));
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
guardMonth.setText(guardPriceModel.getOpeningTime());
|
||||
guardPrivilegeStrings = dataTipModel.getGuardPrivilege();
|
||||
if (buyGuardPrivilegeAdapter != null) {
|
||||
buyGuardPrivilegeAdapter.setGuardPrivilege(guardPrivilegeStrings);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageScrollStateChanged(int position) {
|
||||
BuyGuardBannerModel guardBannerModel = buyGuardBannerModels.get(position);
|
||||
Log.e("LiveBuyGuardDialog", "onPageScrollStateChanged name = " + guardBannerModel.getName() + " position=" + position);
|
||||
}
|
||||
});
|
||||
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.guard_month_linear), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
ObjectAnimator animator = ObjectAnimator.ofFloat(guardArrow, "rotation", 0f, -90f);
|
||||
animator.setDuration(500);
|
||||
animator.setInterpolator(new LinearInterpolator());
|
||||
animator.start();
|
||||
XPopup.Builder builder = new XPopup.Builder(getContext()).atView(findViewById(R.id.guard_month_linear));
|
||||
builder.hasShadowBg(false)
|
||||
.isDestroyOnDismiss(true)
|
||||
.isLightStatusBar(false)
|
||||
.popupPosition(PopupPosition.Top)
|
||||
.asCustom(new LiveBuyGuardSelectPopup(getContext(), price, guardPriceModel)
|
||||
.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||
@Override
|
||||
public void onDismiss(DialogInterface dialog) {
|
||||
closeAnimSudGameListEvent(guardArrow);
|
||||
}
|
||||
}).setBuyGuardSelectListener(new LiveBuyGuardSelectPopup.LiveBuyGuardSelectListener() {
|
||||
@Override
|
||||
public void onLiveBuyGuardSelectListener(GuardPriceModel model) {
|
||||
guardPriceModel = model;
|
||||
if (TextUtils.isEmpty(guardPriceModel.getDiscountPrice())) {
|
||||
discountPrice.setText(String.valueOf(guardPriceModel.getOriginalPrice()));
|
||||
originalPrice.setVisibility(GONE);
|
||||
discount.setVisibility(GONE);
|
||||
} else {
|
||||
originalPrice.setVisibility(VISIBLE);
|
||||
discount.setVisibility(VISIBLE);
|
||||
discountPrice.setText(String.valueOf(guardPriceModel.getDiscountPrice()));
|
||||
discount.setText(String.valueOf(guardPriceModel.getDiscount()));
|
||||
originalPrice.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
// SpannableString spannableString = new SpannableString(String.valueOf(guardPriceModel.getOriginalPrice()));
|
||||
// StrikethroughSpan strikethroughSpan = new StrikethroughSpan();
|
||||
// spannableString.setSpan(strikethroughSpan, 0, spannableString.length(), Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||
// originalPrice.setText(spannableString);
|
||||
originalPrice.getPaint().setFlags(Paint.STRIKE_THRU_TEXT_FLAG | Paint.ANTI_ALIAS_FLAG);
|
||||
originalPrice.setText(String.valueOf(guardPriceModel.getOriginalPrice()));
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
guardMonth.setText(guardPriceModel.getOpeningTime());
|
||||
}
|
||||
})
|
||||
)
|
||||
.show();
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(openTheGuard, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
if (TextUtils.equals(userInfo.getIsOpen(), "1")) {
|
||||
GuardBuyTipsDialog
|
||||
.showBuyOrRenewDialog(mContext,
|
||||
discountPrice.getText().toString(),
|
||||
dataTipModel.getGuardName(), dataTipModel.isOpen(),
|
||||
mGuardUserInfoModel, dataTipModel.getGuardType(), new DialogUitl.SimpleCallback2() {
|
||||
@Override
|
||||
public void onCancelClick() {
|
||||
dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
|
||||
LiveNetManager.get(activity)
|
||||
.openGuard(mLiveUid,
|
||||
String.valueOf(dataTipModel.getGuardType()),
|
||||
String.valueOf(guardPriceModel.getPriceKey()), mStream, new HttpCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
if (TextUtils.equals(data, "22")) {
|
||||
new DialogUitl.Builder(mContext)
|
||||
.setView(R.layout.dialog_live_unfollow)
|
||||
.setConfirmString(mContext.getString(R.string.charge))
|
||||
.setContent(mContext.getString(R.string.insufficient_balance))
|
||||
.setClickCallback(new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
LiveBuyGuardDialog.this.dismiss();
|
||||
ARouter.getInstance().build(PATH_COIN).withInt("p", 0).navigation();
|
||||
}
|
||||
}).build().show();
|
||||
} else {
|
||||
IMLoginManager.get(mContext).setGuardType(dataTipModel.getGuardType());
|
||||
ToastUtil.show(data);
|
||||
dismiss();
|
||||
if (dataTipModel.getGuardType() == 3) {
|
||||
new XPopup.Builder(mContext)
|
||||
.dismissOnTouchOutside(false) // 点击外部是否关闭弹窗,默认为true
|
||||
.asCustom(new DragonSendsMoneyPopup(mContext, mLiveUid))
|
||||
.show();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (userInfo.getGuardType() > dataTipModel.getGuardType()) {
|
||||
String name = "星之守護";
|
||||
switch (userInfo.getGuardType()) {
|
||||
case 1:
|
||||
name = WordUtil.isNewZh() ? "星之守護" : "star guardian";
|
||||
break;
|
||||
case 2:
|
||||
name = WordUtil.isNewZh() ? "王之守護" : "king guardian";
|
||||
break;
|
||||
case 3:
|
||||
name = WordUtil.isNewZh() ? "神之守護" : "god guardian";
|
||||
break;
|
||||
|
||||
}
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
if (WordUtil.isNewZh()) {
|
||||
buffer.append("您的【")
|
||||
.append(name).append("】已過期\n").append("開通相同或更高等級守護將會保留您的守護等級").append("開通低等級守護將重新計算您的守護等級");
|
||||
} else {
|
||||
buffer.append("Your [")
|
||||
.append(name).append("] has expired").append("active the same or higher level of guardian will retain your guardian level").append("active lower level guardian will recalculate your guardian level");
|
||||
}
|
||||
GuardBuyTipsDialog
|
||||
.showBuyOrRenewDialog(mContext,
|
||||
null,
|
||||
buffer.toString(), false,
|
||||
null, -200, new DialogUitl.SimpleCallback2() {
|
||||
@Override
|
||||
public void onCancelClick() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
GuardBuyTipsDialog
|
||||
.showBuyOrRenewDialog(mContext,
|
||||
discountPrice.getText().toString(),
|
||||
dataTipModel.getGuardName(), dataTipModel.isOpen(),
|
||||
mGuardUserInfoModel, dataTipModel.getGuardType(), new DialogUitl.SimpleCallback2() {
|
||||
@Override
|
||||
public void onCancelClick() {
|
||||
dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
|
||||
LiveNetManager.get(activity)
|
||||
.openGuard(mLiveUid,
|
||||
String.valueOf(dataTipModel.getGuardType()),
|
||||
String.valueOf(guardPriceModel.getPriceKey()), mStream, new HttpCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
if (TextUtils.equals(data, "22")) {
|
||||
new DialogUitl.Builder(mContext)
|
||||
.setView(R.layout.dialog_live_unfollow)
|
||||
.setConfirmString(mContext.getString(R.string.charge))
|
||||
.setContent(mContext.getString(R.string.insufficient_balance))
|
||||
.setClickCallback(new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
LiveBuyGuardDialog.this.dismiss();
|
||||
ARouter.getInstance().build(PATH_COIN).withInt("p", 0).navigation();
|
||||
}
|
||||
}).build().show();
|
||||
} else {
|
||||
IMLoginManager.get(mContext).setGuardType(dataTipModel.getGuardType());
|
||||
ToastUtil.show(data);
|
||||
dismiss();
|
||||
if (dataTipModel.getGuardType() == 3) {
|
||||
new XPopup.Builder(mContext)
|
||||
.dismissOnTouchOutside(false) // 点击外部是否关闭弹窗,默认为true
|
||||
.asCustom(new DragonSendsMoneyPopup(mContext, mLiveUid))
|
||||
.show();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}else {
|
||||
GuardBuyTipsDialog
|
||||
.showBuyOrRenewDialog(mContext,
|
||||
discountPrice.getText().toString(),
|
||||
dataTipModel.getGuardName(), dataTipModel.isOpen(),
|
||||
mGuardUserInfoModel, dataTipModel.getGuardType(), new DialogUitl.SimpleCallback2() {
|
||||
@Override
|
||||
public void onCancelClick() {
|
||||
dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
|
||||
LiveNetManager.get(activity)
|
||||
.openGuard(mLiveUid,
|
||||
String.valueOf(dataTipModel.getGuardType()),
|
||||
String.valueOf(guardPriceModel.getPriceKey()), mStream, new HttpCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
if (TextUtils.equals(data, "22")) {
|
||||
new DialogUitl.Builder(mContext)
|
||||
.setView(R.layout.dialog_live_unfollow)
|
||||
.setConfirmString(mContext.getString(R.string.charge))
|
||||
.setContent(mContext.getString(R.string.insufficient_balance))
|
||||
.setClickCallback(new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
LiveBuyGuardDialog.this.dismiss();
|
||||
ARouter.getInstance().build(PATH_COIN).withInt("p", 0).navigation();
|
||||
}
|
||||
}).build().show();
|
||||
} else {
|
||||
IMLoginManager.get(mContext).setGuardType(dataTipModel.getGuardType());
|
||||
ToastUtil.show(data);
|
||||
dismiss();
|
||||
if (dataTipModel.getGuardType() == 3) {
|
||||
new XPopup.Builder(mContext)
|
||||
.dismissOnTouchOutside(false) // 点击外部是否关闭弹窗,默认为true
|
||||
.asCustom(new DragonSendsMoneyPopup(mContext, mLiveUid))
|
||||
.show();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
switch (dataTipModel.getGuardType()) {
|
||||
case 1:
|
||||
MobclickAgent.onEvent(mContext, "star_guardian_renew_btn", "星之守护开通/续费按钮点击次数及人数");
|
||||
break;
|
||||
case 2:
|
||||
MobclickAgent.onEvent(mContext, "king_guardian_renew_btn", "王之守护开通/续费按钮点击次数及人数");
|
||||
break;
|
||||
case 3:
|
||||
MobclickAgent.onEvent(mContext, "god_guardian_renew_btn", "神之守护开通/续费按钮点击次数及人数");
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
// new XPopup.Builder(mContext)
|
||||
// .asCustom(new DragonSendsMoneyPopup(mContext))
|
||||
// .show();
|
||||
}
|
||||
});
|
||||
LiveNetManager.get(getContext())
|
||||
.checkUpgrades(mLiveUid, new com.yunbao.common.http.base.HttpCallback<CheckUpgradesModel>() {
|
||||
@Override
|
||||
public void onSuccess(CheckUpgradesModel data) {
|
||||
if (!data.getRewards().isEmpty())
|
||||
new XPopup.Builder(mContext)
|
||||
.asCustom(new GuardUpgradePopup(mContext, mLiveUid, data, new GuardUpgradePopup.GuardUpgradeCallBack() {
|
||||
@Override
|
||||
public void onGuardLevel() {
|
||||
LiveBuyGuardDialog.this.dismiss();
|
||||
}
|
||||
}))
|
||||
.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.guard_rule), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
StringBuffer htmlUrl = new StringBuffer();
|
||||
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
||||
htmlUrl.append(CommonAppConfig.HOST)
|
||||
.append("/h5/Guard/rules.html")
|
||||
.append("?token=")
|
||||
.append(userInfo.getToken())
|
||||
.append("&uid=")
|
||||
.append(userInfo.getId())
|
||||
.append("&anchorUid=")
|
||||
.append(mLiveUid)
|
||||
.append("&isZh=")
|
||||
.append(((WordUtil.isNewZh()) ? "1" : "0"));
|
||||
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("url", htmlUrl.toString());
|
||||
bundle.putInt("height", DeviceUtils.getScreenHeight(getActivity()) / 5 * 3);
|
||||
LiveHDDialogFragment fragment = new LiveHDDialogFragment();
|
||||
fragment.setArguments(bundle);
|
||||
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void closeAnimSudGameListEvent(View view) {
|
||||
ObjectAnimator animator = ObjectAnimator.ofFloat(view, "rotation", -90f, 0f);
|
||||
animator.setDuration(animDuration);
|
||||
animator.setInterpolator(new LinearInterpolator());
|
||||
animator.start();
|
||||
}
|
||||
|
||||
private void initViewPage() {
|
||||
fragments.add(LiveBuyGuardVPFragment.newInstance(0));
|
||||
fragments.add(LiveBuyGuardVPFragment.newInstance(1));
|
||||
}
|
||||
}
|
||||
@@ -825,51 +825,54 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
||||
giftSendLayout.setVisibility(View.VISIBLE);
|
||||
mBtnSendGroup.removeCallbacks(newLianSongRunnable);
|
||||
getCoin();
|
||||
LiveNetManager.get(mContext)
|
||||
.getGiftNamingInfo(liveGiftModel.getId() + "", new com.yunbao.common.http.base.HttpCallback<GiftNamingInfoModel>() {
|
||||
@Override
|
||||
public void onSuccess(GiftNamingInfoModel data) {
|
||||
if (TextUtils.equals(data.getNamingStatus(), "1")) {
|
||||
liveGiftModel = JSONObject.parseObject(GsonUtils.toJson(data), LiveGiftBean.class);
|
||||
if (!TextUtils.isEmpty(liveGiftModel.getNamingLiveuid()) &&
|
||||
!TextUtils.isEmpty(liveGiftModel.getNamingUid()) &&
|
||||
!TextUtils.equals(liveGiftModel.getNamingLiveuid(), "0") &&
|
||||
!TextUtils.equals(liveGiftModel.getNamingUid(), "0")) {
|
||||
namingLayout.setVisibility(View.VISIBLE);
|
||||
ImgLoader.display(mContext, liveGiftModel.getNamingLiveAvatar(), namingAvatar);
|
||||
StringBuffer namingNameText = new StringBuffer();
|
||||
if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||
namingNameText.append("获取冠名:")
|
||||
.append(liveGiftModel.getNamingUserCoin())
|
||||
.append(" ");
|
||||
if (liveGiftModel!=null){
|
||||
LiveNetManager.get(mContext)
|
||||
.getGiftNamingInfo(liveGiftModel.getId() + "", new com.yunbao.common.http.base.HttpCallback<GiftNamingInfoModel>() {
|
||||
@Override
|
||||
public void onSuccess(GiftNamingInfoModel data) {
|
||||
if (TextUtils.equals(data.getNamingStatus(), "1")) {
|
||||
liveGiftModel = JSONObject.parseObject(GsonUtils.toJson(data), LiveGiftBean.class);
|
||||
if (!TextUtils.isEmpty(liveGiftModel.getNamingLiveuid()) &&
|
||||
!TextUtils.isEmpty(liveGiftModel.getNamingUid()) &&
|
||||
!TextUtils.equals(liveGiftModel.getNamingLiveuid(), "0") &&
|
||||
!TextUtils.equals(liveGiftModel.getNamingUid(), "0")) {
|
||||
namingLayout.setVisibility(View.VISIBLE);
|
||||
ImgLoader.display(mContext, liveGiftModel.getNamingLiveAvatar(), namingAvatar);
|
||||
StringBuffer namingNameText = new StringBuffer();
|
||||
if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||
namingNameText.append("获取冠名:")
|
||||
.append(liveGiftModel.getNamingUserCoin())
|
||||
.append(" ");
|
||||
|
||||
} else {
|
||||
namingNameText.append("Get title: ")
|
||||
.append(liveGiftModel.getNamingUserCoin())
|
||||
.append(" ");
|
||||
}
|
||||
namingNameText.append(mContext.getText(com.yunbao.live.R.string.title_anchor))
|
||||
.append(liveGiftModel.getNamingLiveName())
|
||||
.append(" ")
|
||||
.append(mContext.getText(com.yunbao.live.R.string.the_title_financier))
|
||||
.append(" ")
|
||||
.append(liveGiftModel.getNamingUserName());
|
||||
namingName.setText(namingNameText.toString());
|
||||
} else {
|
||||
namingNameText.append("Get title: ")
|
||||
.append(liveGiftModel.getNamingUserCoin())
|
||||
.append(" ");
|
||||
namingLayout.setVisibility(View.GONE);
|
||||
|
||||
}
|
||||
namingNameText.append(mContext.getText(com.yunbao.live.R.string.title_anchor))
|
||||
.append(liveGiftModel.getNamingLiveName())
|
||||
.append(" ")
|
||||
.append(mContext.getText(com.yunbao.live.R.string.the_title_financier))
|
||||
.append(" ")
|
||||
.append(liveGiftModel.getNamingUserName());
|
||||
namingName.setText(namingNameText.toString());
|
||||
} else {
|
||||
namingLayout.setVisibility(View.GONE);
|
||||
|
||||
}
|
||||
} else {
|
||||
namingLayout.setVisibility(View.GONE);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
378
live/src/main/java/com/yunbao/live/dialog/LiveGuardDialog.java
Normal file
@@ -0,0 +1,378 @@
|
||||
package com.yunbao.live.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.makeramen.roundedimageview.RoundedImageView;
|
||||
import com.opensource.svgaplayer.SVGAImageView;
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.adapter.RefreshAdapter;
|
||||
import com.yunbao.common.bean.CheckUpgradesModel;
|
||||
import com.yunbao.common.bean.GuardGetGuardUserInfoModel;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.custom.CommonRefreshView;
|
||||
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
||||
import com.yunbao.common.dialog.GuardUpgradePopup;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.CommonIconUtil;
|
||||
import com.yunbao.common.utils.DeviceUtils;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.TimeUtils;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||
import com.yunbao.live.adapter.NewGuardAdapter;
|
||||
import com.yunbao.live.bean.GuardUserModel;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class LiveGuardDialog extends AbsDialogPopupWindow {
|
||||
FragmentActivity activity;
|
||||
boolean isEmpty = true;
|
||||
|
||||
FrameLayout guardianTask;
|
||||
FrameLayout myGraudGrade, guardingTheAnchor;
|
||||
|
||||
NewGuardAdapter newGuardAdapter;
|
||||
|
||||
CommonRefreshView mRefreshView;
|
||||
String mLiveUid;
|
||||
String mStream;
|
||||
List<GuardUserModel> guardUserModels = new ArrayList<>();
|
||||
|
||||
TextView userNickname, weekContribution, guardLevel;
|
||||
ImageView userSex, tagKing;
|
||||
RoundedImageView guardIcon;
|
||||
SVGAImageView giftSvga;
|
||||
TextView btnGuardOpen;
|
||||
TextView guard_hint;
|
||||
TextView guard_time;
|
||||
View guardian_task_view;
|
||||
GuardGetGuardUserInfoModel getGuardUserInfoModel = null;
|
||||
|
||||
public LiveGuardDialog(@NonNull Context context, boolean isEmpty, String liveUid, String stream) {
|
||||
super(context);
|
||||
activity = (FragmentActivity) context;
|
||||
this.isEmpty = isEmpty;
|
||||
mLiveUid = liveUid;
|
||||
mStream = stream;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildDialog(XPopup.Builder builder) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int bindLayoutId() {
|
||||
return R.layout.dialog_live_guard;
|
||||
}
|
||||
|
||||
//底部栏
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
guardianTask = findViewById(R.id.guardian_task);
|
||||
myGraudGrade = findViewById(R.id.my_graud_grade);
|
||||
guardingTheAnchor = findViewById(R.id.guarding_the_anchor);
|
||||
guard_time = findViewById(R.id.guard_time);
|
||||
guard_hint = findViewById(R.id.guard_hint);
|
||||
guardian_task_view = findViewById(R.id.guardian_task_view);
|
||||
|
||||
mRefreshView = findViewById(R.id.refreshView);
|
||||
mRefreshView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
|
||||
newGuardAdapter = new NewGuardAdapter(mContext);
|
||||
mRefreshView.setRecyclerViewAdapter(newGuardAdapter);
|
||||
mRefreshView.setEmptyLayoutId(R.layout.view_no_data_admin_room2);
|
||||
userNickname = findViewById(R.id.user_nickname);
|
||||
weekContribution = findViewById(R.id.week_contribution);
|
||||
guardLevel = findViewById(R.id.guard_level);
|
||||
userSex = findViewById(R.id.sex);
|
||||
tagKing = findViewById(R.id.tag_king);
|
||||
guardIcon = findViewById(R.id.guard_imageView);
|
||||
giftSvga = findViewById(R.id.gift_svga);
|
||||
btnGuardOpen = findViewById(R.id.btn_guard_open);
|
||||
IMLoginManager.get(mContext).setGuardRedPoint();
|
||||
if (WordUtil.isNewZh()) {
|
||||
ViewGroup.LayoutParams layoutParams = guardian_task_view.getLayoutParams();
|
||||
layoutParams.width = DpUtil.dp2px(50);
|
||||
guardian_task_view.setLayoutParams(layoutParams);
|
||||
} else {
|
||||
ViewGroup.LayoutParams layoutParams = guardian_task_view.getLayoutParams();
|
||||
layoutParams.width = DpUtil.dp2px(78);
|
||||
guardian_task_view.setLayoutParams(layoutParams);
|
||||
|
||||
}
|
||||
mRefreshView.setDataHelper(new CommonRefreshView.DataHelper<GuardUserModel>() {
|
||||
@Override
|
||||
public RefreshAdapter<GuardUserModel> getAdapter() {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadData(int p, HttpCallback callback) {
|
||||
LiveHttpUtil.getGuardList(mLiveUid, p, callback);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GuardUserModel> processData(String[] info) {
|
||||
List<GuardUserModel> guardUserModelList = JSON.parseArray(Arrays.toString(info), GuardUserModel.class);
|
||||
if (guardUserModels.isEmpty() && !guardUserModelList.isEmpty()) {
|
||||
guardUserModels = guardUserModelList;
|
||||
setAdapterData();
|
||||
}
|
||||
return guardUserModelList;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefreshSuccess(List<GuardUserModel> list, int listCount) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefreshFailure() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadMoreSuccess(List<GuardUserModel> loadItemList, int loadItemCount) {
|
||||
if (loadItemList.size() > 0)
|
||||
newGuardAdapter.insertList(loadItemList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadMoreFailure() {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
mRefreshView.initData();
|
||||
if (isEmpty) {
|
||||
|
||||
guardingTheAnchor.setVisibility(VISIBLE);
|
||||
} else {
|
||||
|
||||
|
||||
guardingTheAnchor.setVisibility(GONE);
|
||||
}
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.btn_guard_open), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
MobclickAgent.onEvent(mContext, "guardian_renew_btn", "守护席开通守护/续费守护按钮点击次数及人数");
|
||||
dismiss();
|
||||
new LiveBuyGuardDialog(mContext, mLiveUid, mStream, getGuardUserInfoModel).showDialog();
|
||||
}
|
||||
});
|
||||
//神龙送财
|
||||
userNickname.setVisibility(GONE);
|
||||
weekContribution.setVisibility(GONE);
|
||||
userSex.setVisibility(GONE);
|
||||
tagKing.setVisibility(GONE);
|
||||
guardLevel.setVisibility(GONE);
|
||||
guardIcon.setVisibility(GONE);
|
||||
giftSvga.setImageResource(R.mipmap.guardian_img_wings);
|
||||
LiveNetManager.get(mContext).getGuardUserInfo(mLiveUid, new com.yunbao.common.http.base.HttpCallback<GuardGetGuardUserInfoModel>() {
|
||||
@Override
|
||||
public void onSuccess(GuardGetGuardUserInfoModel data) {
|
||||
getGuardUserInfoModel = data;
|
||||
if (TextUtils.equals(data.getIsOpen(), "0")) {
|
||||
guardianTask.setVisibility(GONE);
|
||||
myGraudGrade.setVisibility(GONE);
|
||||
btnGuardOpen.setText(WordUtil.isNewZh() ? "開通守護" : "Open Guard");
|
||||
guard_hint.setText(WordUtil.isNewZh() ? "快為您喜歡的主播開通守護吧!" : "Turn on the guard for your favorite anchor!");
|
||||
} else {
|
||||
if (data.getGuardType() == 0) {
|
||||
guardianTask.setVisibility(GONE);
|
||||
myGraudGrade.setVisibility(GONE);
|
||||
btnGuardOpen.setText(WordUtil.isNewZh() ? "開通守護" : "Open Guard");
|
||||
guard_hint.setText(WordUtil.isNewZh() ? "快為您喜歡的主播開通守護吧!" : "Turn on the guard for your favorite anchor!");
|
||||
} else {
|
||||
guardianTask.setVisibility(VISIBLE);
|
||||
myGraudGrade.setVisibility(VISIBLE);
|
||||
btnGuardOpen.setText(WordUtil.isNewZh() ? "續費守護" : "Renewal");
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append(WordUtil.isNewZh() ? "您是當前主播的" : "You are the ");
|
||||
switch (data.getGuardType()) {
|
||||
case 1:
|
||||
stringBuffer.append(WordUtil.isNewZh() ? "【星之守護】" : "star guardian")
|
||||
.append(WordUtil.isNewZh() ? " " :" of the current streamer");
|
||||
guard_hint.setText(stringBuffer.toString());
|
||||
break;
|
||||
case 2:
|
||||
stringBuffer.append(WordUtil.isNewZh() ? "【王之守護】" : "king guardian")
|
||||
.append(WordUtil.isNewZh() ? " " :" of the current streamer");
|
||||
guard_hint.setText(stringBuffer.toString());
|
||||
break;
|
||||
case 3:
|
||||
stringBuffer.append(WordUtil.isNewZh() ? "【神之守護】" : "god guardian")
|
||||
.append(WordUtil.isNewZh() ? " " :" of the current streamer");
|
||||
guard_hint.setText(stringBuffer.toString());
|
||||
break;
|
||||
default:
|
||||
guard_hint.setText(WordUtil.isNewZh() ? "快為您喜歡的主播開通守護吧!" : "Turn on the guard for your favorite anchor!");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (data.getEndtime() == 0) {
|
||||
guard_time.setVisibility(GONE);
|
||||
} else {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
if (WordUtil.isNewZh()) {
|
||||
stringBuffer.append("守護日期截止到 ").append(TimeUtils.getDateToString(data.getEndtime() * 1000, "yyyy-MM-dd"));
|
||||
} else {
|
||||
stringBuffer.append("Guardianship date is up to ").append(TimeUtils.getDateToString(data.getEndtime() * 1000, "yyyy-MM-dd"));
|
||||
}
|
||||
|
||||
guard_time.setText(stringBuffer.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(error);
|
||||
guardianTask.setVisibility(GONE);
|
||||
myGraudGrade.setVisibility(GONE);
|
||||
btnGuardOpen.setText(WordUtil.isNewZh() ? "開通守護" : "Open Guard");
|
||||
}
|
||||
});
|
||||
LiveNetManager.get(getContext())
|
||||
.checkUpgrades(mLiveUid, new com.yunbao.common.http.base.HttpCallback<CheckUpgradesModel>() {
|
||||
@Override
|
||||
public void onSuccess(CheckUpgradesModel data) {
|
||||
if (!data.getRewards().isEmpty())
|
||||
new XPopup.Builder(mContext)
|
||||
.asCustom(new GuardUpgradePopup(mContext, mLiveUid, data, new GuardUpgradePopup.GuardUpgradeCallBack() {
|
||||
@Override
|
||||
public void onGuardLevel() {
|
||||
LiveGuardDialog.this.dismiss();
|
||||
}
|
||||
}))
|
||||
.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(guardianTask, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
MobclickAgent.onEvent(mContext, "my_guard_task_num", "守护任务页面访问次数和人数");
|
||||
StringBuffer htmlUrl = new StringBuffer();
|
||||
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
||||
htmlUrl.append(CommonAppConfig.HOST)
|
||||
.append("/h5/Guard/mission.html?")
|
||||
.append("&token=")
|
||||
.append(userInfo.getToken())
|
||||
.append("&uid=")
|
||||
.append(userInfo.getId())
|
||||
.append("&&anchorUid=")
|
||||
.append(mLiveUid)
|
||||
.append("&isZh=")
|
||||
.append(((WordUtil.isNewZh()) ? "1" : "0"));
|
||||
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("url", htmlUrl.toString());
|
||||
bundle.putInt("height", DeviceUtils.getScreenHeight(getActivity()) / 5 * 3);
|
||||
LiveHDDialogFragment fragment = new LiveHDDialogFragment();
|
||||
fragment.setArguments(bundle);
|
||||
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(myGraudGrade, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
MobclickAgent.onEvent(mContext, "my_guard_level_num", "我的等级页面访问次数和人数");
|
||||
dismiss();
|
||||
StringBuffer htmlUrl = new StringBuffer();
|
||||
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
||||
htmlUrl.append(CommonAppConfig.HOST)
|
||||
.append("/h5/Guard/level.html?")
|
||||
.append("&token=")
|
||||
.append(userInfo.getToken())
|
||||
.append("&uid=")
|
||||
.append(userInfo.getId())
|
||||
.append("&&anchorUid=")
|
||||
.append(mLiveUid)
|
||||
.append("&isZh=")
|
||||
.append(((WordUtil.isNewZh()) ? "1" : "0"));
|
||||
RouteUtil.forwardZhuangBanActivity(htmlUrl.toString());
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void setAdapterData() {
|
||||
if (guardUserModels.isEmpty()) return;
|
||||
GuardUserModel guardUserModel = guardUserModels.get(0);
|
||||
|
||||
userNickname.setVisibility(VISIBLE);
|
||||
weekContribution.setVisibility(VISIBLE);
|
||||
userSex.setVisibility(VISIBLE);
|
||||
tagKing.setVisibility(VISIBLE);
|
||||
guardLevel.setVisibility(VISIBLE);
|
||||
guardIcon.setVisibility(View.VISIBLE);
|
||||
userNickname.setText(guardUserModel.getUserNicename());
|
||||
weekContribution.setText(WordUtil.getNewString(R.string.this_week_contribution) + " " + guardUserModel.getContribute());
|
||||
userSex.setImageResource(CommonIconUtil.getSexIcon(guardUserModel.getSex()));
|
||||
|
||||
guardLevel.setText(String.valueOf(guardUserModel.getGuardLevel()));
|
||||
ImgLoader.display(mContext, guardUserModel.getAvatar(), guardIcon);
|
||||
giftSvga.setImageResource(R.mipmap.guardian_img_wings_p);
|
||||
if (TextUtils.equals(guardUserModel.getGuardLevelCard(), "0")) {
|
||||
switch (guardUserModel.getGuardType()) {
|
||||
case 1:
|
||||
ImgLoader.display(mContext, R.mipmap.tag_start_hui, tagKing);
|
||||
break;
|
||||
case 2:
|
||||
ImgLoader.display(mContext, R.mipmap.tag_king_hui, tagKing);
|
||||
break;
|
||||
case 3:
|
||||
ImgLoader.display(mContext, R.mipmap.tag_god_hui, tagKing);
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
switch (guardUserModel.getGuardType()) {
|
||||
case 1:
|
||||
ImgLoader.display(mContext, R.mipmap.tag_start, tagKing);
|
||||
break;
|
||||
case 2:
|
||||
ImgLoader.display(mContext, R.mipmap.tag_king, tagKing);
|
||||
break;
|
||||
case 3:
|
||||
ImgLoader.display(mContext, R.mipmap.tag_god, tagKing);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -368,6 +368,7 @@ public class LiveHDDialogFragment extends AbsDialogFragment {
|
||||
//守護
|
||||
} else if (TextUtils.equals(event.getMethod(), "BuyProtection")) {
|
||||
((LiveActivity) mContext).openNewBuyGuardWindow(event.getData());
|
||||
dismiss();
|
||||
} else if (TextUtils.equals(event.getMethod(), "BuyVIP")) {
|
||||
UserBean u = CommonAppConfig.getInstance().getUserBean();
|
||||
String url = CommonAppConfig.HOST + "/h5/Noble/index.html?nickname="
|
||||
|
||||
@@ -0,0 +1,239 @@
|
||||
package com.yunbao.live.dialog;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.opensource.svgaplayer.SVGAImageView;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.adapter.RefreshAdapter;
|
||||
import com.yunbao.common.custom.CommonRefreshView;
|
||||
import com.yunbao.common.dialog.AbsDialogFragment;
|
||||
import com.yunbao.common.dialog.GuardBuyTipsDialog;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
import com.yunbao.common.utils.CommonIconUtil;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.ToastUtils;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveActivity;
|
||||
import com.yunbao.live.adapter.GuardAdapter;
|
||||
import com.yunbao.live.bean.GuardUserBean;
|
||||
import com.yunbao.live.bean.LiveGuardInfo;
|
||||
import com.yunbao.live.utils.LiveTextRender;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 新版守护列表
|
||||
* 2024/02/22
|
||||
*/
|
||||
public class LiveNewGuardDialogFragment extends AbsDialogFragment implements View.OnClickListener {
|
||||
private ImageView guardIcon, userSex, userLevel;
|
||||
private ConstraintLayout mRootLayout;
|
||||
private CommonRefreshView mRefreshView;
|
||||
private TextView mBtnBuy, userName, userGuard, tip1, tip2;
|
||||
private SVGAImageView giftSvga;
|
||||
private LinearLayout userLayout;
|
||||
|
||||
private GuardAdapter mGuardAdapter;
|
||||
private LiveGuardInfo mLiveGuardInfo;
|
||||
private String mLiveUid;
|
||||
private boolean mIsAnchor;//是否是主播
|
||||
private boolean showBuyView;
|
||||
private List<GuardUserBean> list = new ArrayList<>();
|
||||
private RelativeLayout relativeLayout;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.dialog_new_guard;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getDialogStyle() {
|
||||
return R.style.dialog2;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canCancel() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public void setLiveGuardInfo(LiveGuardInfo info) {
|
||||
mLiveGuardInfo = info;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setWindowAttributes(Window window) {
|
||||
window.setWindowAnimations(R.style.bottomToTopAnim);
|
||||
WindowManager.LayoutParams params = window.getAttributes();
|
||||
params.width = WindowManager.LayoutParams.MATCH_PARENT;
|
||||
params.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
params.gravity = Gravity.BOTTOM;
|
||||
window.setAttributes(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
Bundle bundle = getArguments();
|
||||
if (bundle == null) {
|
||||
return;
|
||||
}
|
||||
mIsAnchor = bundle.getBoolean(Constants.ANCHOR, false);
|
||||
mLiveUid = bundle.getString(Constants.LIVE_UID);
|
||||
showBuyView = bundle.getBoolean("showBuyView", true);
|
||||
guardIcon = mRootView.findViewById(R.id.guard_imageView);
|
||||
mRootLayout = mRootView.findViewById(R.id.guard_constraintLayout);
|
||||
mBtnBuy = mRootView.findViewById(R.id.guard_btn_buy);
|
||||
giftSvga = mRootView.findViewById(R.id.gift_svga);
|
||||
mRefreshView = mRootView.findViewById(R.id.refreshView);
|
||||
userName = mRootView.findViewById(R.id.list_guard_list_user_name);
|
||||
userGuard = mRootView.findViewById(R.id.list_guard_list_user_guard);
|
||||
userLevel = mRootView.findViewById(R.id.list_guard_list_user_level);
|
||||
userSex = mRootView.findViewById(R.id.list_guard_list_user_sex);
|
||||
userLayout = mRootView.findViewById(R.id.guard_linearLayout);
|
||||
tip1 = mRootView.findViewById(R.id.guard_tip1);
|
||||
tip2 = mRootView.findViewById(R.id.guard_tip2);
|
||||
relativeLayout = mRootView.findViewById(R.id.guard_relativeLayout);
|
||||
mBtnBuy.setOnClickListener(this);
|
||||
mBtnBuy.setEnabled(true);
|
||||
mBtnBuy.setText(R.string.guard_buy_2);
|
||||
initView();
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
mRefreshView.setEmptyLayoutId(mIsAnchor ? R.layout.view_no_data_guard_anc : R.layout.view_no_data_guard_aud);
|
||||
mRefreshView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
|
||||
mGuardAdapter = new GuardAdapter(mContext, true, false);
|
||||
mGuardAdapter.setList(list);
|
||||
setAdapterData();
|
||||
mRefreshView.setDataHelper(new CommonRefreshView.DataHelper<GuardUserBean>() {
|
||||
@Override
|
||||
public RefreshAdapter<GuardUserBean> getAdapter() {
|
||||
if (mGuardAdapter == null) {
|
||||
mGuardAdapter = new GuardAdapter(mContext, true, false);
|
||||
}
|
||||
return mGuardAdapter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadData(int p, HttpCallback callback) {
|
||||
LiveHttpUtil.getGuardList(mLiveUid, p, callback);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GuardUserBean> processData(String[] info) {
|
||||
List<GuardUserBean> list = JSON.parseArray(Arrays.toString(info), GuardUserBean.class);
|
||||
if (!list.isEmpty()) {
|
||||
LiveNewGuardDialogFragment.this.list = list;
|
||||
setAdapterData();
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefreshSuccess(List<GuardUserBean> list, int listCount) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefreshFailure() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadMoreSuccess(List<GuardUserBean> loadItemList, int loadItemCount) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadMoreFailure() {
|
||||
|
||||
}
|
||||
});
|
||||
mRefreshView.setRecyclerViewAdapter(mGuardAdapter);
|
||||
mGuardAdapter.notifyDataSetChanged();
|
||||
if (!showBuyView) {
|
||||
relativeLayout.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
dismiss();
|
||||
((LiveActivity) mContext).openNewBuyGuardWindow(list.isEmpty());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int show(@NonNull FragmentTransaction transaction, @Nullable String tag) {
|
||||
int show = super.show(transaction, tag);
|
||||
initView();
|
||||
return show;
|
||||
}
|
||||
|
||||
private void setAdapterData() {
|
||||
if (list.isEmpty()) {
|
||||
userLayout.setVisibility(View.INVISIBLE);
|
||||
} else {
|
||||
GuardUserBean bean = list.get(0);
|
||||
giftSvga.setImageResource(R.mipmap.guardian_img_wings_p);
|
||||
ImgLoader.display(mContext, bean.getAvatar(), guardIcon);
|
||||
guardIcon.setVisibility(View.VISIBLE);
|
||||
userName.setText(bean.getUserNiceName());
|
||||
String guardString = mContext.getString(R.string.guard_week_con);
|
||||
userGuard.setText(guardString + " " + bean.getContribute());
|
||||
userSex.setImageResource(CommonIconUtil.getSexIcon(bean.getSex()));
|
||||
|
||||
new LiveTextRender().getLevelImage(mContext, bean.getLevel(), new ImgLoader.DrawableCallback() {
|
||||
@Override
|
||||
public void onLoadSuccess(Drawable drawable) {
|
||||
ImgLoader.display2(mContext, drawable, userLevel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFailed() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
if (mLiveGuardInfo != null) {
|
||||
int guardType = mLiveGuardInfo.getMyGuardType();
|
||||
if (guardType == Constants.GUARD_TYPE_NONE) {
|
||||
tip1.setText(R.string.guard_tip_0);
|
||||
} else if (guardType == Constants.GUARD_TYPE_DAY) {
|
||||
tip1.setText(mContext.getString(R.string.guard_tip_day) + mLiveGuardInfo.getMyGuardEndTime());
|
||||
mBtnBuy.setText(R.string.guard_buy_3);
|
||||
} else if (guardType == Constants.GUARD_TYPE_MONTH) {
|
||||
tip1.setText(mContext.getString(R.string.guard_tip_1) + mLiveGuardInfo.getMyGuardEndTime());
|
||||
mBtnBuy.setText(R.string.guard_buy_3);
|
||||
} else if (guardType == Constants.GUARD_TYPE_YEAR) {
|
||||
tip1.setText(mContext.getString(R.string.guard_tip_2) + mLiveGuardInfo.getMyGuardEndTime());
|
||||
mBtnBuy.setText(R.string.guard_buy_3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setList(List<GuardUserBean> list) {
|
||||
this.list = list;
|
||||
}
|
||||
}
|
||||
@@ -488,7 +488,8 @@ public class LiveAudienceEvent extends BaseModel {
|
||||
GIFT_WALL(73, "礼物墙"),
|
||||
UPDATE_FANS_TASK_STATUS(74, "更新粉丝任务状态"),
|
||||
SUD_GAME_CREATE_ROOM(75, "主播创建sud游戏"),
|
||||
PK_RANK_START(76, "PK排位赛开始");
|
||||
PK_RANK_START(76, "PK排位赛开始"),
|
||||
GuardSpecialEffect(77, "PK排位赛开始");
|
||||
|
||||
private int type;
|
||||
private String name;
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.yunbao.live.fragments;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.live.R;
|
||||
|
||||
public class LiveBuyGuardVPFragment extends Fragment {
|
||||
private int type;
|
||||
public static LiveBuyGuardVPFragment newInstance(int type) {
|
||||
return new LiveBuyGuardVPFragment(type);
|
||||
}
|
||||
|
||||
public LiveBuyGuardVPFragment(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
return inflater.inflate(R.layout.view_vp_live_buy_guard,container,false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
}
|
||||
}
|
||||
@@ -4,14 +4,20 @@ import android.animation.Animator;
|
||||
import android.animation.AnimatorListenerAdapter;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.animation.ValueAnimator;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.os.CountDownTimer;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.text.Html;
|
||||
import android.text.Spannable;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.text.Spanned;
|
||||
import android.text.TextUtils;
|
||||
import android.text.style.ForegroundColorSpan;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@@ -33,19 +39,25 @@ import com.opensource.svgaplayer.SVGAImageView;
|
||||
import com.opensource.svgaplayer.SVGAParser;
|
||||
import com.opensource.svgaplayer.SVGAVideoEntity;
|
||||
import com.opensource.svgaplayer.utils.SVGARect;
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.HtmlConfig;
|
||||
import com.yunbao.common.activity.WebViewActivity;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.common.event.AllServerNotifyEvent;
|
||||
import com.yunbao.common.event.AllServerNotifyFFGGGDJANEvent;
|
||||
import com.yunbao.common.event.LiveRoomChangeEvent;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.CommonHttpConsts;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DeviceUtils;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.GiftCacheUtil;
|
||||
import com.yunbao.common.utils.HtmlTagHandler;
|
||||
@@ -54,14 +66,17 @@ import com.yunbao.common.utils.LiveRoomCheckLivePresenter;
|
||||
import com.yunbao.common.utils.MicStatusManager;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||
import com.yunbao.live.activity.ZhuangBanActivity;
|
||||
import com.yunbao.live.bean.LiveGiftPrizePoolWinBean;
|
||||
import com.yunbao.live.bean.LiveLuckGiftWinBean;
|
||||
import com.yunbao.live.bean.LiveReceiveGiftBean;
|
||||
import com.yunbao.live.bean.NewAllServerNotifyGuardEvent;
|
||||
import com.yunbao.live.custom.FrameImageView;
|
||||
import com.yunbao.live.dialog.LiveHDDialogFragment;
|
||||
import com.yunbao.live.event.LiveAudienceEvent;
|
||||
import com.yunbao.common.event.LiveRoomChangeEvent;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
import com.yunbao.live.utils.AllMsgTextRender;
|
||||
import com.yunbao.live.utils.LiveIconUtil;
|
||||
import com.yunbao.live.views.LiveGiftLuckTopViewHolder;
|
||||
@@ -123,7 +138,11 @@ public class LiveGiftAnimPresenter {
|
||||
private ObjectAnimator mGifGiftTipShowAnimatorAllServer;
|
||||
private ObjectAnimator mGifGiftTipHideAnimatorAllServer;
|
||||
private ObjectAnimator mGifGiftTipShowAnimatorBuyGuard;
|
||||
private ObjectAnimator mGifGiftTipShowAnimatorBuyGuardNew;
|
||||
private ObjectAnimator mGifGiftTipShowAnimatorfull_service_notice_new;
|
||||
private ObjectAnimator mGifGiftTipHideAnimatorBuyGuard;
|
||||
private ObjectAnimator mGifGiftTipHideAnimatorBuyGuardNew;
|
||||
private ObjectAnimator mGifGiftTipHideAnimatorfull_service_notice_new;
|
||||
|
||||
private ObjectAnimator mGifGiftTipShowAnimatorBuyZuoji;
|
||||
private ObjectAnimator mGifGiftTipHideAnimatorBuyZuoji;
|
||||
@@ -160,7 +179,10 @@ public class LiveGiftAnimPresenter {
|
||||
private static final int WHAT_BUY_LIANG_NAME_2 = -12;
|
||||
private static final int WHAT_BUY_VIP_1 = -13;
|
||||
private static final int WHAT_BUY_VIP_2 = -14;
|
||||
|
||||
private static final int WHAT_BUY_GUARD_NEW_1 = -15;
|
||||
private static final int WHAT_BUY_GUARD_NEW_2 = -16;
|
||||
private static final int full_service_notice_new_1 = -17;
|
||||
private static final int full_service_notice_new_2 = -18;
|
||||
private boolean mShowGif;
|
||||
private boolean mShowBuyGuard;
|
||||
private boolean mShowAllServer;
|
||||
@@ -227,6 +249,7 @@ public class LiveGiftAnimPresenter {
|
||||
superNotice = v.findViewById(R.id.super_notice);
|
||||
bgAllServer = v.findViewById(R.id.bg_all_server);
|
||||
mIvLookBuyGuard = v.findViewById(R.id.iv_look_buy_guard);
|
||||
mIvLookBuyGuardNew = v.findViewById(R.id.iv_look_buy_guard_new);
|
||||
|
||||
svgaImageViewCallback();
|
||||
|
||||
@@ -235,7 +258,10 @@ public class LiveGiftAnimPresenter {
|
||||
mGifGiftTip = (TextView) v.findViewById(R.id.gif_gift_tip);
|
||||
mGifGiftTipAllServer = (TextView) v.findViewById(R.id.gif_gift_tip_all_server);
|
||||
mGifGiftTipGroupBuyGuard = v.findViewById(R.id.gif_gift_tip_group_buy_guard);
|
||||
mGifGiftTipGroupBuyGuardNew = v.findViewById(R.id.gif_gift_tip_group_buy_guard_new);
|
||||
guardAllServerNotifyBg = v.findViewById(R.id.guard_all_server_notify_bg);
|
||||
mGifGiftTipBuyGuard = (TextView) v.findViewById(R.id.gif_gift_tip_buy_guard);
|
||||
mGifGiftTipBuyGuardNew = (TextView) v.findViewById(R.id.gif_gift_tip_buy_guard_new);
|
||||
mGifGiftTipGroupBuyZuoji = v.findViewById(R.id.gif_gift_tip_group_buy_zuoji);
|
||||
mGifGiftTipBuyZuoji = (TextView) v.findViewById(R.id.gif_gift_tip_buy_zuoji);
|
||||
|
||||
@@ -247,21 +273,28 @@ public class LiveGiftAnimPresenter {
|
||||
ivGuardType = v.findViewById(R.id.ivGuardType);
|
||||
|
||||
mFrameImageView = (FrameImageView) v.findViewById(R.id.all_frame_img);
|
||||
full_service_notice_new = v.findViewById(R.id.full_service_notice_new);
|
||||
full_service_notice_new_bg = v.findViewById(R.id.full_service_notice_new_bg);
|
||||
full_service_notice_new_text = v.findViewById(R.id.full_service_notice_new_text);
|
||||
iv_look_full_service_notice_new = v.findViewById(R.id.iv_look_full_service_notice_new);
|
||||
iv_look_full_service_notice_new3 = v.findViewById(R.id.iv_look_full_service_notice_new3);
|
||||
iv_look_full_service_notice_new2 = v.findViewById(R.id.iv_look_full_service_notice_new2);
|
||||
|
||||
mIvLookClick();
|
||||
mIvLookBuyGuardClick();
|
||||
mIvLookBuyZuojiClick();
|
||||
mIvLookBuyLiangNameClick();
|
||||
mIvLookBuyVipClick();
|
||||
|
||||
onmIvLookBuyGuardNew();
|
||||
oniv_look_full_service_notice_new();
|
||||
setGitTipAnimator1();
|
||||
setGitTipAnimatorAllServer();
|
||||
setGitTipAnimatorBuyGuard();
|
||||
setGitTipAnimatorBuyZuoji();
|
||||
setGitTipAnimatorBuyLiangName();
|
||||
setGitTipAnimatorBuyVip();
|
||||
|
||||
|
||||
setGitTipAnimatorBuyGuardNew();
|
||||
setGitTipAnimatormGifGiftTipShowAnimatorfull_service_notice_new();
|
||||
mSendString = "送了";
|
||||
mLiveGiftViewHolders = new LiveGiftViewHolder[2];
|
||||
mLiveGiftViewHolders[0] = new LiveGiftViewHolder(context, (ViewGroup) v.findViewById(R.id.gift_group_2));
|
||||
@@ -374,7 +407,7 @@ public class LiveGiftAnimPresenter {
|
||||
mGifGiftTipGroupBuyZuoji.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
WebViewActivity.forward(mContext, HtmlConfig.SHOP + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"),true);
|
||||
WebViewActivity.forward(mContext, HtmlConfig.SHOP + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"), true);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -383,7 +416,7 @@ public class LiveGiftAnimPresenter {
|
||||
mGifGiftTipGroupBuyLiangName.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
WebViewActivity.forward(mContext, HtmlConfig.SHOP + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"),true);
|
||||
WebViewActivity.forward(mContext, HtmlConfig.SHOP + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"), true);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -404,7 +437,7 @@ public class LiveGiftAnimPresenter {
|
||||
String uid = mTempGifGiftBean.getUid();
|
||||
String userId = CommonAppConfig.getInstance().getUid();
|
||||
if (userId.equals(uid)) {
|
||||
ToastUtil.show(WordUtil.isNewZh()?"已在当前直播间":"Already in the current studio");
|
||||
ToastUtil.show(WordUtil.isNewZh() ? "已在当前直播间" : "Already in the current studio");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -507,6 +540,71 @@ public class LiveGiftAnimPresenter {
|
||||
});
|
||||
}
|
||||
|
||||
private void setGitTipAnimatorBuyGuardNew() {
|
||||
mDp500 = DpUtil.dp2px(500);
|
||||
mGifGiftTipShowAnimatorBuyGuardNew = ObjectAnimator.ofFloat(mGifGiftTipGroupBuyGuardNew, "translationX", mDp500, 0);
|
||||
mGifGiftTipShowAnimatorBuyGuardNew.setDuration(2000);
|
||||
mGifGiftTipShowAnimatorBuyGuardNew.setInterpolator(new LinearInterpolator());
|
||||
mGifGiftTipShowAnimatorBuyGuardNew.addListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
if (mHandler != null) {
|
||||
mHandler.sendEmptyMessageDelayed(WHAT_BUY_GUARD_NEW_1, 5000);
|
||||
}
|
||||
}
|
||||
});
|
||||
mDp10 = DpUtil.dp2px(10);
|
||||
mGifGiftTipHideAnimatorBuyGuardNew = ObjectAnimator.ofFloat(mGifGiftTipGroupBuyGuardNew, "translationX", 0);
|
||||
mGifGiftTipHideAnimatorBuyGuardNew.setDuration(3000);
|
||||
mGifGiftTipHideAnimatorBuyGuardNew.setInterpolator(new AccelerateDecelerateInterpolator());
|
||||
mGifGiftTipHideAnimatorBuyGuardNew.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
|
||||
@Override
|
||||
public void onAnimationUpdate(ValueAnimator animation) {
|
||||
mGifGiftTipGroupBuyGuardNew.setAlpha(1 - animation.getAnimatedFraction());
|
||||
}
|
||||
});
|
||||
mGifGiftTipHideAnimatorBuyGuardNew.addListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
if (mHandler != null) {
|
||||
mHandler.sendEmptyMessageDelayed(WHAT_BUY_GUARD_NEW_2, 100);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void setGitTipAnimatormGifGiftTipShowAnimatorfull_service_notice_new() {
|
||||
mDp500 = DpUtil.dp2px(500);
|
||||
mGifGiftTipShowAnimatorfull_service_notice_new = ObjectAnimator.ofFloat(full_service_notice_new, "translationX", mDp500, 0);
|
||||
mGifGiftTipShowAnimatorfull_service_notice_new.setDuration(2000);
|
||||
mGifGiftTipShowAnimatorfull_service_notice_new.setInterpolator(new LinearInterpolator());
|
||||
mGifGiftTipShowAnimatorfull_service_notice_new.addListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
if (mHandler != null) {
|
||||
mHandler.sendEmptyMessageDelayed(full_service_notice_new_1, 5000);
|
||||
}
|
||||
}
|
||||
});
|
||||
mDp10 = DpUtil.dp2px(10);
|
||||
mGifGiftTipHideAnimatorfull_service_notice_new = ObjectAnimator.ofFloat(full_service_notice_new, "translationX", 0);
|
||||
mGifGiftTipHideAnimatorfull_service_notice_new.setDuration(3000);
|
||||
mGifGiftTipHideAnimatorfull_service_notice_new.setInterpolator(new AccelerateDecelerateInterpolator());
|
||||
mGifGiftTipHideAnimatorfull_service_notice_new.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
|
||||
@Override
|
||||
public void onAnimationUpdate(ValueAnimator animation) {
|
||||
full_service_notice_new.setAlpha(1 - animation.getAnimatedFraction());
|
||||
}
|
||||
});
|
||||
mGifGiftTipHideAnimatorfull_service_notice_new.addListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
if (mHandler != null) {
|
||||
mHandler.sendEmptyMessageDelayed(full_service_notice_new_2, 100);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void setGitTipAnimatorBuyZuoji() {
|
||||
mDp500 = DpUtil.dp2px(500);
|
||||
@@ -721,6 +819,12 @@ public class LiveGiftAnimPresenter {
|
||||
} else if (msg.what == WHAT_BUY_GUARD_1) {
|
||||
mGifGiftTipHideAnimatorBuyGuard.setFloatValues(0, -mDp10 - mGifGiftTipGroupBuyGuard.getWidth());
|
||||
mGifGiftTipHideAnimatorBuyGuard.start();
|
||||
} else if (msg.what == WHAT_BUY_GUARD_NEW_1) {
|
||||
mGifGiftTipHideAnimatorBuyGuardNew.setFloatValues(0, -mDp10 - mGifGiftTipGroupBuyGuardNew.getWidth());
|
||||
mGifGiftTipHideAnimatorBuyGuardNew.start();
|
||||
} else if (msg.what == full_service_notice_new_1) {
|
||||
mGifGiftTipHideAnimatorfull_service_notice_new.setFloatValues(0, -mDp10 - full_service_notice_new.getWidth());
|
||||
mGifGiftTipHideAnimatorfull_service_notice_new.start();
|
||||
} else if (msg.what == WHAT_BUY_GUARD_2) {
|
||||
mShowAllServer = false;
|
||||
heightOffsetArr[index4Guard] = 0;
|
||||
@@ -728,6 +832,20 @@ public class LiveGiftAnimPresenter {
|
||||
if (bean != null) {
|
||||
chooseInto(bean);
|
||||
}
|
||||
} else if (msg.what == WHAT_BUY_GUARD_NEW_2) {
|
||||
mShowAllServer = false;
|
||||
heightOffsetArr[index4Guard] = 0;
|
||||
LiveReceiveGiftBean bean = mGifAll.poll();
|
||||
if (bean != null) {
|
||||
chooseInto(bean);
|
||||
}
|
||||
} else if (msg.what == full_service_notice_new_2) {
|
||||
mShowAllServer = false;
|
||||
heightOffsetArr[index4Guard] = 0;
|
||||
LiveReceiveGiftBean bean = mGifAll.poll();
|
||||
if (bean != null) {
|
||||
chooseInto(bean);
|
||||
}
|
||||
} else if (msg.what == WHAT_BUY_ZUOJI_1) {
|
||||
mGifGiftTipHideAnimatorBuyZuoji.setFloatValues(0, -mDp10 - mGifGiftTipGroupBuyZuoji.getWidth());
|
||||
mGifGiftTipHideAnimatorBuyZuoji.start();
|
||||
@@ -785,6 +903,10 @@ public class LiveGiftAnimPresenter {
|
||||
showBuyVipGiftAnim(bean);
|
||||
} else if (action == 71) {
|
||||
showSystAnim(bean);
|
||||
} else if (action == 90) {
|
||||
showBuyGuardGiftAnimNew(notifyGuardEvent);
|
||||
} else if (action == 91) {
|
||||
showAllServerNotifyFFGGGD(bean.getNotifyFFGGGDJANEvent(), bean.isShowB());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -970,6 +1092,219 @@ public class LiveGiftAnimPresenter {
|
||||
}
|
||||
}
|
||||
|
||||
View full_service_notice_new;
|
||||
ImageView full_service_notice_new_bg;
|
||||
TextView full_service_notice_new_text;
|
||||
TextView iv_look_full_service_notice_new;
|
||||
AllServerNotifyFFGGGDJANEvent notifyFFGGGDJANEvent;
|
||||
View iv_look_full_service_notice_new3;
|
||||
ImageView iv_look_full_service_notice_new2;
|
||||
|
||||
public void showAllServerNotifyFFGGGD(AllServerNotifyFFGGGDJANEvent event, boolean showB) {
|
||||
if (TextUtils.isEmpty(event.getBackgroundImage())) return;
|
||||
|
||||
|
||||
mRoomNum = event.getLiveuid();
|
||||
if (mShowAllServer) {
|
||||
if (mGifAll != null) {
|
||||
LiveReceiveGiftBean bean = new LiveReceiveGiftBean();
|
||||
bean.setSendtype(91);
|
||||
bean.setNotifyFFGGGDJANEvent(event);
|
||||
bean.setShowB(showB);
|
||||
mGifAll.offer(bean);
|
||||
}
|
||||
} else {
|
||||
notifyFFGGGDJANEvent = event;
|
||||
mShowAllServer = true;
|
||||
index4Guard = getFirstIndexOfValue(heightOffsetArr, 0);
|
||||
if (index4Guard >= 0) {
|
||||
heightOffsetArr[index4Guard] = 1;
|
||||
int y;
|
||||
y = index4Guard * 60;
|
||||
FrameLayout.LayoutParams params = (FrameLayout.LayoutParams) full_service_notice_new.getLayoutParams();
|
||||
params.topMargin = DpUtil.dp2px(y);
|
||||
full_service_notice_new.setLayoutParams(params);
|
||||
}
|
||||
full_service_notice_new.setAlpha(1f);
|
||||
full_service_notice_new.setVisibility(View.VISIBLE);
|
||||
ImgLoader.display(mContext, event.getBackgroundImage(), full_service_notice_new_bg);
|
||||
SpannableStringBuilder builder = new SpannableStringBuilder();
|
||||
String msgN = WordUtil.isNewZh() ? event.getMsgCn() : event.getMsgEn();
|
||||
builder.append(msgN);
|
||||
for (AllServerNotifyFFGGGDJANEvent.StyleDTO dto : event.getStyle()) {
|
||||
String textMsg = WordUtil.isNewZh() ? dto.getStrCn() : dto.getStrEn();
|
||||
int unameIndexOf = msgN.indexOf(textMsg);
|
||||
int unameSize = textMsg.length();
|
||||
builder.setSpan(new ForegroundColorSpan(Color.parseColor(dto.getColour())), unameIndexOf, unameIndexOf + unameSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
}
|
||||
if (!showB){
|
||||
iv_look_full_service_notice_new3.setVisibility(View.GONE);
|
||||
}else {
|
||||
if (TextUtils.equals(event.getJumpType(),"0")){
|
||||
iv_look_full_service_notice_new3.setVisibility(View.GONE);
|
||||
}else {
|
||||
iv_look_full_service_notice_new3.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
if (!TextUtils.isEmpty(event.getButtonImage())) {
|
||||
|
||||
ImgLoader.display(mContext, event.getButtonImage(), iv_look_full_service_notice_new2);
|
||||
SpannableStringBuilder stringBuilder = new SpannableStringBuilder();
|
||||
String buttonString = WordUtil.isNewZh() ? event.getButtonMsgCn() : event.getButtonMsgEn();
|
||||
stringBuilder.append(buttonString);
|
||||
try {
|
||||
for (AllServerNotifyFFGGGDJANEvent.ButtonStyleDTO dto : event.getButtonStyle()) {
|
||||
String textMsg = WordUtil.isNewZh() ? dto.getStrCn() : dto.getStrEn();
|
||||
int unameIndexOf = buttonString.indexOf(textMsg);
|
||||
int unameSize = textMsg.length();
|
||||
stringBuilder.setSpan(new ForegroundColorSpan(Color.parseColor(dto.getColour())), unameIndexOf, unameIndexOf + unameSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
iv_look_full_service_notice_new.setText(buttonString);
|
||||
}
|
||||
iv_look_full_service_notice_new.setText(stringBuilder);
|
||||
}
|
||||
full_service_notice_new_text.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (full_service_notice_new_text != null) {
|
||||
full_service_notice_new_text.setSelected(true);
|
||||
full_service_notice_new_text.setEllipsize(TextUtils.TruncateAt.MARQUEE);
|
||||
full_service_notice_new_text.requestFocus();
|
||||
full_service_notice_new_text.setText(builder);
|
||||
}
|
||||
|
||||
}
|
||||
}, 500);
|
||||
mGifGiftTipShowAnimatorfull_service_notice_new.start();
|
||||
}
|
||||
}
|
||||
|
||||
View mGifGiftTipGroupBuyGuardNew;
|
||||
LinearLayout guardAllServerNotifyBg;
|
||||
TextView mGifGiftTipBuyGuardNew;
|
||||
TextView mIvLookBuyGuardNew;
|
||||
NewAllServerNotifyGuardEvent notifyGuardEvent;
|
||||
|
||||
public void showBuyGuardGiftAnimNew(NewAllServerNotifyGuardEvent event) {
|
||||
notifyGuardEvent = event;
|
||||
mRoomNum = event.getLiveuid();
|
||||
if (mShowAllServer) {
|
||||
if (mGifAll != null) {
|
||||
LiveReceiveGiftBean bean = new LiveReceiveGiftBean();
|
||||
bean.setSendtype(90);
|
||||
mGifAll.offer(bean);
|
||||
}
|
||||
} else {
|
||||
mShowAllServer = true;
|
||||
index4Guard = getFirstIndexOfValue(heightOffsetArr, 0);
|
||||
if (index4Guard >= 0) {
|
||||
heightOffsetArr[index4Guard] = 1;
|
||||
int y;
|
||||
y = index4Guard * 60;
|
||||
FrameLayout.LayoutParams params = (FrameLayout.LayoutParams) mGifGiftTipGroupBuyGuardNew.getLayoutParams();
|
||||
params.topMargin = DpUtil.dp2px(y);
|
||||
mGifGiftTipGroupBuyGuardNew.setLayoutParams(params);
|
||||
}
|
||||
mGifGiftTipGroupBuyGuardNew.setAlpha(1f);
|
||||
mGifGiftTipGroupBuyGuardNew.setVisibility(View.VISIBLE);
|
||||
switch (event.getGuardType()) {
|
||||
case "1":
|
||||
guardAllServerNotifyBg.setBackgroundResource(WordUtil.isNewZh() ?
|
||||
R.mipmap.background_all_server_notify_star_zh :
|
||||
R.mipmap.background_all_server_notify_star_en);
|
||||
mGifGiftTipBuyGuardNew.setTextColor(Color.parseColor("#072A93"));
|
||||
mIvLookBuyGuardNew.setBackgroundResource(R.mipmap.btn_star_guard_onlookers);
|
||||
break;
|
||||
case "2":
|
||||
guardAllServerNotifyBg.setBackgroundResource(WordUtil.isNewZh() ?
|
||||
R.mipmap.background_all_server_notify_king_zh :
|
||||
R.mipmap.background_all_server_notify_king_en);
|
||||
mGifGiftTipBuyGuardNew.setTextColor(Color.parseColor("#BF0B0A"));
|
||||
mIvLookBuyGuardNew.setBackgroundResource(R.mipmap.btn_king_guard_onlookers);
|
||||
break;
|
||||
case "3":
|
||||
guardAllServerNotifyBg.setBackgroundResource(WordUtil.isNewZh() ?
|
||||
R.mipmap.background_all_server_notify_god_zh :
|
||||
R.mipmap.background_all_server_notify_sgod_en);
|
||||
mGifGiftTipBuyGuardNew.setTextColor(Color.parseColor("#41057E"));
|
||||
mIvLookBuyGuardNew.setBackgroundResource(R.mipmap.btn_god_guard_onlookers);
|
||||
break;
|
||||
|
||||
}
|
||||
if (!TextUtils.isEmpty(event.getIsOnlookers()) && TextUtils.equals("0", event.getIsOnlookers())) {
|
||||
mIvLookBuyGuardNew.setVisibility(View.GONE);
|
||||
} else {
|
||||
mIvLookBuyGuardNew.setVisibility(View.VISIBLE);
|
||||
mIvLookBuyGuardNew.setText(WordUtil.isNewZh() ? "圍觀" : "Views");
|
||||
}
|
||||
mGifGiftTipShowAnimatorBuyGuardNew.start();
|
||||
|
||||
|
||||
mGifGiftTipBuyGuardNew.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (mGifGiftTipBuyGuardNew != null) {
|
||||
mGifGiftTipBuyGuardNew.setSelected(true);
|
||||
mGifGiftTipBuyGuardNew.setEllipsize(TextUtils.TruncateAt.MARQUEE);
|
||||
mGifGiftTipBuyGuardNew.requestFocus();
|
||||
mGifGiftTipBuyGuardNew.setText(WordUtil.isNewZh() ? event.getMsgCn() : event.getMsgEn());
|
||||
}
|
||||
}
|
||||
}, 500);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void onmIvLookBuyGuardNew() {
|
||||
ViewClicksAntiShake.clicksAntiShake(mIvLookBuyGuardNew, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
mIvLookBuyGuardNew.setVisibility(View.GONE);
|
||||
changeLiveRoom();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void oniv_look_full_service_notice_new() {
|
||||
ViewClicksAntiShake.clicksAntiShake(iv_look_full_service_notice_new, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
MobclickAgent.onEvent(mContext, "new_full_server", "全服的埋点");
|
||||
String jumpType = notifyFFGGGDJANEvent.getJumpType();
|
||||
if (TextUtils.equals(jumpType, "1")) {
|
||||
changeLiveRoom();
|
||||
} else if (TextUtils.equals(jumpType, "2")) {
|
||||
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
||||
if (!TextUtils.isEmpty(notifyFFGGGDJANEvent.getLink())) {
|
||||
StringBuffer htmlUrl = new StringBuffer();
|
||||
htmlUrl.append(notifyFFGGGDJANEvent.getLink())
|
||||
.append(notifyFFGGGDJANEvent.getLink().contains("?") ? "&uid=" : "?uid=")
|
||||
.append(userInfo.getId())
|
||||
.append("&token=")
|
||||
.append(userInfo.getToken())
|
||||
.append("&isZh=")
|
||||
.append(((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
if (!TextUtils.isEmpty(notifyFFGGGDJANEvent.getH5Type())) {
|
||||
if (TextUtils.equals(notifyFFGGGDJANEvent.getH5Type(), "1")) {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("url", htmlUrl.toString());
|
||||
bundle.putInt("height", DeviceUtils.getScreenHeight((Activity) mContext) / 5 * 3);
|
||||
LiveHDDialogFragment fragment = new LiveHDDialogFragment();
|
||||
fragment.setArguments(bundle);
|
||||
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
|
||||
} else if (TextUtils.equals(notifyFFGGGDJANEvent.getH5Type(), "2")) {
|
||||
ZhuangBanActivity.forwardqeqweqq(mContext, htmlUrl.toString(), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//购买守护 全服通知
|
||||
public void showBuyGuardGiftAnim(LiveReceiveGiftBean bean) {
|
||||
@@ -1510,12 +1845,24 @@ public class LiveGiftAnimPresenter {
|
||||
if (mGifGiftTipShowAnimatorBuyGuard != null) {
|
||||
mGifGiftTipShowAnimatorBuyGuard.cancel();
|
||||
}
|
||||
if (mGifGiftTipShowAnimatorBuyGuardNew != null) {
|
||||
mGifGiftTipShowAnimatorBuyGuardNew.cancel();
|
||||
}
|
||||
if (mGifGiftTipHideAnimatorAllServer != null) {
|
||||
mGifGiftTipHideAnimatorAllServer.cancel();
|
||||
}
|
||||
if (mGifGiftTipHideAnimatorBuyGuard != null) {
|
||||
mGifGiftTipHideAnimatorBuyGuard.cancel();
|
||||
}
|
||||
if (mGifGiftTipHideAnimatorBuyGuardNew != null) {
|
||||
mGifGiftTipHideAnimatorBuyGuardNew.cancel();
|
||||
}
|
||||
if (mGifGiftTipHideAnimatorfull_service_notice_new != null) {
|
||||
mGifGiftTipHideAnimatorfull_service_notice_new.cancel();
|
||||
}
|
||||
if (mGifGiftTipShowAnimatorfull_service_notice_new != null) {
|
||||
mGifGiftTipShowAnimatorfull_service_notice_new.cancel();
|
||||
}
|
||||
|
||||
if (mGifGiftTipShowAnimatorBuyZuoji != null) {
|
||||
mGifGiftTipShowAnimatorBuyZuoji.cancel();
|
||||
|
||||
@@ -102,7 +102,7 @@ public class SocketRyChatUtil {
|
||||
.param("uid", u.getId())
|
||||
.param("liangname", u.getGoodName())
|
||||
.param("vip_type", u.getVip().getType())
|
||||
.param("guard_type", guardType)
|
||||
.param("guard_type", IMLoginManager.get(CommonAppContext.sInstance.getApplicationContext()).getGuardType())
|
||||
.param("medal_name", u.getMedalName())
|
||||
.param("medal_level", model.getMedalLevel())
|
||||
.param("good_num", u.getGoodnum())
|
||||
@@ -132,7 +132,7 @@ public class SocketRyChatUtil {
|
||||
SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + "");
|
||||
}
|
||||
LiveNetManager.get(CommonAppContext.sInstance)
|
||||
.addChatCount(LiveActivity.mStream,new com.yunbao.common.http.base.HttpCallback<HttpCallbackModel>() {
|
||||
.addChatCount(LiveActivity.mStream, new com.yunbao.common.http.base.HttpCallback<HttpCallbackModel>() {
|
||||
@Override
|
||||
public void onSuccess(HttpCallbackModel data) {
|
||||
|
||||
@@ -151,7 +151,7 @@ public class SocketRyChatUtil {
|
||||
if (errorCode.code == 23408) {
|
||||
ToastUtil.show(WordUtil.isNewZh() ? "您已被禁言" : "You have been banned");
|
||||
} else {
|
||||
ToastUtil.show(errorCode.code + ":" + errorCode.msg);
|
||||
ToastUtil.show(WordUtil.isNewZh() ? "抱歉!出錯了!" + errorCode.code : "I'm sorry! An error occurred:" + errorCode.code);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -180,7 +180,7 @@ public class SocketRyChatUtil {
|
||||
.param("bubble", u.getDress().getBubble())
|
||||
.param("medal", u.getDress().getMedal())
|
||||
.param("medal_new", u.getDress().getMedal_new())
|
||||
.param("guard_type", guardType)
|
||||
.param("guard_type", IMLoginManager.get(CommonAppContext.sInstance.getApplicationContext()).getGuardType())
|
||||
.param("medal_name", u.getMedalName())
|
||||
.param("medal_level", u.getMedalLevel())
|
||||
.param("good_num", u.getGoodnum())
|
||||
@@ -492,7 +492,7 @@ public class SocketRyChatUtil {
|
||||
if (u == null) {
|
||||
return;
|
||||
}
|
||||
String s = action == 1 ? "被設為管理員(Set as Administrator)": "被取消管理員(Cancelled administrator)";
|
||||
String s = action == 1 ? "被設為管理員(Set as Administrator)" : "被取消管理員(Cancelled administrator)";
|
||||
final SocketSendBean msg = new SocketSendBean()
|
||||
.param("_method_", Constants.SOCKET_SET_ADMIN)
|
||||
.param("action", action)
|
||||
@@ -716,7 +716,7 @@ public class SocketRyChatUtil {
|
||||
.param("uhead", u.getAvatar())
|
||||
.param("votestotal", votes)
|
||||
.param("guard_nums", guardNum)
|
||||
.param("guard_type", guardType);
|
||||
.param("guard_type", IMLoginManager.get(CommonAppContext.sInstance.getApplicationContext()).getGuardType());
|
||||
msg.create();
|
||||
|
||||
}
|
||||
@@ -742,7 +742,7 @@ public class SocketRyChatUtil {
|
||||
.param("bubble", u.getDress().getBubble())
|
||||
.param("medal", u.getDress().getMedal())
|
||||
.param("medal_new", u.getDress().getMedal_new())
|
||||
.param("guard_type", guardType);
|
||||
.param("guard_type", IMLoginManager.get(CommonAppContext.sInstance.getApplicationContext()).getGuardType());
|
||||
msg.create();
|
||||
|
||||
}
|
||||
|
||||
@@ -24,22 +24,26 @@ import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.bean.AiAutomaticSpeechModel;
|
||||
import com.yunbao.common.bean.FansModel;
|
||||
import com.yunbao.common.bean.GuardMaturityDateRemindModel;
|
||||
import com.yunbao.common.bean.LinkMicUserBean;
|
||||
import com.yunbao.common.bean.LiveUserGiftBean;
|
||||
import com.yunbao.common.bean.MsgModel;
|
||||
import com.yunbao.common.bean.PkRankBean;
|
||||
import com.yunbao.common.bean.RedPacketInfoModel;
|
||||
import com.yunbao.common.bean.RedPacketModel;
|
||||
import com.yunbao.common.bean.SendMoneyLongModel;
|
||||
import com.yunbao.common.bean.SocketModel;
|
||||
import com.yunbao.common.bean.SudGameDateModel;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.bean.WishModel;
|
||||
import com.yunbao.common.bean.XydCompleteModel;
|
||||
import com.yunbao.common.event.AllServerNotifyEvent;
|
||||
import com.yunbao.common.event.AllServerNotifyFFGGGDJANEvent;
|
||||
import com.yunbao.common.event.CustomFullServiceNotifyEvent;
|
||||
import com.yunbao.common.event.GiftWallIlluminateEvent;
|
||||
import com.yunbao.common.event.QuickGiftingEvent;
|
||||
import com.yunbao.common.event.SendBlindGiftEvent;
|
||||
import com.yunbao.common.event.SendMoneyLongEndEvent;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.HttpClient;
|
||||
import com.yunbao.common.manager.IMRTCManager;
|
||||
@@ -63,6 +67,7 @@ import com.yunbao.live.bean.LiveGiftPrizePoolWinBean;
|
||||
import com.yunbao.live.bean.LiveLuckGiftWinBean;
|
||||
import com.yunbao.live.bean.LivePKUserListBean;
|
||||
import com.yunbao.live.bean.LiveReceiveGiftBean;
|
||||
import com.yunbao.live.bean.NewAllServerNotifyGuardEvent;
|
||||
import com.yunbao.live.bean.SendQuickGiftModel;
|
||||
import com.yunbao.live.event.LiveAnchorEvent;
|
||||
import com.yunbao.live.event.LiveAudienceEvent;
|
||||
@@ -387,7 +392,7 @@ public class SocketRyClient {
|
||||
} else if (action2 == 61) {//赠送礼物
|
||||
sendGiftByNotify(map);
|
||||
} else if (action2 == 62) {//购买守护
|
||||
buyGuardByNotify(map);
|
||||
// buyGuardByNotify(map);
|
||||
// }else if (action2 == 63){
|
||||
} else if (action2 == 63) {//购买vip
|
||||
buyVipByNotify(map);
|
||||
@@ -436,6 +441,13 @@ public class SocketRyClient {
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.BLIND_BOX)
|
||||
.setAllServerNotifyEvent(allServerNotifyEvent));
|
||||
} else if (action2 == 90) {
|
||||
NewAllServerNotifyGuardEvent notifyGuardEvent = GsonUtils.fromJson(map.toString(), NewAllServerNotifyGuardEvent.class);
|
||||
Bus.get().post(notifyGuardEvent);
|
||||
buyGuardInSameRoom(map);
|
||||
}else if (action2==91){
|
||||
AllServerNotifyFFGGGDJANEvent notifyFFGGGDJANEvent = GsonUtils.fromJson(map.toString(), AllServerNotifyFFGGGDJANEvent.class);
|
||||
Bus.get().post(notifyFFGGGDJANEvent);
|
||||
}
|
||||
break;
|
||||
case Constants.SOCKET_SEND_BARRAGE://发弹幕
|
||||
@@ -680,6 +692,7 @@ public class SocketRyClient {
|
||||
.setCustomFullServiceNotifyEvent(customFullServiceNotifyEvent));
|
||||
break;
|
||||
case Constants.XYD_COMPLETE:
|
||||
|
||||
// xydComplete(map);
|
||||
XydCompleteModel xydCompleteModel = GsonUtils.fromJson(map.toString(), XydCompleteModel.class);
|
||||
EventBus.getDefault().post(new LiveAudienceEvent()
|
||||
@@ -687,6 +700,13 @@ public class SocketRyClient {
|
||||
.setXydCompleteModel(xydCompleteModel)
|
||||
.setLiveReceiveGiftBean(JSON.parseObject(map.toString(), LiveReceiveGiftBean.class)));
|
||||
break;
|
||||
case "GuardSpecialEffect":
|
||||
LiveReceiveGiftBean giftBean = JSON.parseObject(map.toString(), LiveReceiveGiftBean.class);
|
||||
giftBean.setMedal_name(map.getString("medal_name"));
|
||||
EventBus.getDefault().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.GuardSpecialEffect)
|
||||
.setLiveReceiveGiftBean(giftBean));
|
||||
break;
|
||||
case Constants.WISH_LIST_PROGRESS:
|
||||
StringBuffer conString = new StringBuffer();
|
||||
conString.append(WordUtil.isNewZh() ? map.getString("msg") : map.getString("msg_en"));
|
||||
@@ -782,28 +802,41 @@ public class SocketRyClient {
|
||||
item.getString("pkuid_win_continuity");
|
||||
pkRankBean = new PkRankBean();
|
||||
pkRankBean.setBlueVal(item.getString("pkuid_win_continuity"));
|
||||
pkRankBean.setRedVal( item.getString("uid_win_continuity"));
|
||||
pkRankBean.setRedVal(item.getString("uid_win_continuity"));
|
||||
pkRankBean.setPkTopImgUrl(item.getString("pktt_img"));
|
||||
|
||||
EventBus.getDefault().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.PK_RANK_START)
|
||||
.setObject(pkRankBean));
|
||||
break;
|
||||
case "guardMaturityDateRemind":
|
||||
GuardMaturityDateRemindModel maturityDateRemindModel = GsonUtils.fromJson(map.toString(), GuardMaturityDateRemindModel.class);
|
||||
Bus.get().post(maturityDateRemindModel);
|
||||
break;
|
||||
case "SendMoneyLong":
|
||||
SendMoneyLongModel sendMoneyLongModel = GsonUtils.fromJson(map.toString(), SendMoneyLongModel.class);
|
||||
Bus.get().post(sendMoneyLongModel);
|
||||
break;
|
||||
case "SendMoneyLongEnd":
|
||||
Bus.get().post(new SendMoneyLongEndEvent());
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void buyGuardInSameRoom(JSONObject map) {
|
||||
String guardName = WordUtil.isNewZh() ? "周守護" : "Week Guardian";
|
||||
if (TextUtils.isEmpty(map.getString("ancherName")) || TextUtils.isEmpty(map.getString("uname")))
|
||||
return;
|
||||
String guardName = WordUtil.isNewZh() ? "星之守護" : "Star Guardian";
|
||||
switch (map.getIntValue("guard_type")) {
|
||||
case 1:
|
||||
guardName = WordUtil.isNewZh() ? "周守護" : "Week Guardian";
|
||||
guardName = WordUtil.isNewZh() ? "星之守護" : "Star Guardian";
|
||||
break;
|
||||
case 2:
|
||||
guardName = WordUtil.isNewZh() ? "月守護" : "Month Guardian";
|
||||
guardName = WordUtil.isNewZh() ? "王之守護" : "King Guardian";
|
||||
break;
|
||||
case 3:
|
||||
guardName = WordUtil.isNewZh() ? "年守護" : "Year Guardian";
|
||||
guardName = WordUtil.isNewZh() ? "神之守護" : "God Guardian";
|
||||
break;
|
||||
}
|
||||
String content = WordUtil.isNewZh() ? "%s在%s的直播間開通了%s" : "%s has been opened in %s live broadcast room %s";
|
||||
@@ -819,7 +852,7 @@ public class SocketRyClient {
|
||||
|
||||
private void buyGuardByNotify(JSONObject map) {
|
||||
if (mLiveUid.equals(map.getString("liveuid"))) {
|
||||
buyGuardInSameRoom(map);
|
||||
// buyGuardInSameRoom(map);
|
||||
//同一直播间,玩家自己开通,也能看到全服通知
|
||||
String userId = CommonAppConfig.getInstance().getUid();
|
||||
String uid = map.getString("uid");
|
||||
|
||||
@@ -32,9 +32,9 @@ import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.request.target.CustomTarget;
|
||||
import com.bumptech.glide.request.transition.Transition;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.bean.AiAutomaticSpeechModel;
|
||||
import com.yunbao.common.bean.MsgModel;
|
||||
import com.yunbao.common.bean.NewGuardLevelModel;
|
||||
import com.yunbao.common.bean.NewLevelModel;
|
||||
import com.yunbao.common.custom.VerticalImageSpan;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
@@ -262,95 +262,170 @@ public class LiveTextRender {
|
||||
|
||||
}
|
||||
|
||||
public interface CreatePrefixCallback {
|
||||
void onPrefixCallback(SpannableStringBuilder builder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成前缀
|
||||
*/
|
||||
private SpannableStringBuilder createPrefix(Drawable levelDrawable, LiveChatBean bean) {
|
||||
SpannableStringBuilder builder = new SpannableStringBuilder();
|
||||
int index = 0;
|
||||
private void createPrefix(Drawable levelDrawable, LiveChatBean bean, CreatePrefixCallback createPrefixCallback) {
|
||||
|
||||
if (levelDrawable != null) {
|
||||
builder.append(" ");
|
||||
levelDrawable.setBounds(0, 0, DpUtil.dp2px(17), DpUtil.dp2px(17));
|
||||
builder.setSpan(new VerticalImageSpan(levelDrawable), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
|
||||
if (gzDrawablesMap.containsKey(bean)) {//贵族
|
||||
builder.append(" ");
|
||||
gzDrawablesMap.get(bean).setBounds(0, 0, DpUtil.dp2px(35), DpUtil.dp2px(20));
|
||||
builder.setSpan(new VerticalImageSpan(gzDrawablesMap.get(bean)), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
// if (bean.getGuardType() != Constants.GUARD_TYPE_NONE) {//守护图标
|
||||
// Drawable drawable;
|
||||
// if (bean.getGuardType() == Constants.GUARD_TYPE_MONTH) {
|
||||
// drawable = ContextCompat.getDrawable(CommonAppContext.sInstance, R.mipmap.icon_guard_type_1);
|
||||
// } else if (bean.getGuardType() == Constants.GUARD_TYPE_YEAR) {
|
||||
// drawable = ContextCompat.getDrawable(CommonAppContext.sInstance, R.mipmap.icon_guard_type_2);
|
||||
// } else {
|
||||
// drawable = ContextCompat.getDrawable(CommonAppContext.sInstance, R.mipmap.icon_guard_type_0);
|
||||
// }
|
||||
getGuardImage(CommonAppContext.sInstance, bean.getGuardType(), new ImgLoader.DrawableCallback() {
|
||||
@Override
|
||||
public void onLoadSuccess(Drawable drawable) {
|
||||
SpannableStringBuilder builder = new SpannableStringBuilder();
|
||||
int index = 0;
|
||||
|
||||
if (ryxzDrawablesMap.containsKey(bean)) {//荣誉勋章
|
||||
builder.append(" ");
|
||||
ryxzDrawablesMap.get(bean).setBounds(0, 0, DpUtil.dp2px(18), DpUtil.dp2px(18));
|
||||
builder.setSpan(new VerticalImageSpan(ryxzDrawablesMap.get(bean)), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
if (levelDrawable != null) {
|
||||
builder.append(" ");
|
||||
levelDrawable.setBounds(0, 0, DpUtil.dp2px(17), DpUtil.dp2px(17));
|
||||
builder.setSpan(new VerticalImageSpan(levelDrawable), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
|
||||
if (nhDrawablesMap.containsKey(bean)) {//靓号
|
||||
builder.append(" ");
|
||||
nhDrawablesMap.get(bean).setBounds(0, 0, DpUtil.dp2px(17), DpUtil.dp2px(17));
|
||||
builder.setSpan(new VerticalImageSpan(nhDrawablesMap.get(bean)), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
if (gzDrawablesMap.containsKey(bean)) {//贵族
|
||||
builder.append(" ");
|
||||
gzDrawablesMap.get(bean).setBounds(0, 0, DpUtil.dp2px(35), DpUtil.dp2px(20));
|
||||
builder.setSpan(new VerticalImageSpan(gzDrawablesMap.get(bean)), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
|
||||
if (bean.getGuardType() != Constants.GUARD_TYPE_NONE) {//守护图标
|
||||
Drawable drawable;
|
||||
if (bean.getGuardType() == Constants.GUARD_TYPE_MONTH) {
|
||||
drawable = ContextCompat.getDrawable(CommonAppContext.sInstance, R.mipmap.icon_guard_type_1);
|
||||
} else if (bean.getGuardType() == Constants.GUARD_TYPE_YEAR) {
|
||||
drawable = ContextCompat.getDrawable(CommonAppContext.sInstance, R.mipmap.icon_guard_type_2);
|
||||
} else {
|
||||
drawable = ContextCompat.getDrawable(CommonAppContext.sInstance, R.mipmap.icon_guard_type_0);
|
||||
if (ryxzDrawablesMap.containsKey(bean)) {//荣誉勋章
|
||||
builder.append(" ");
|
||||
ryxzDrawablesMap.get(bean).setBounds(0, 0, DpUtil.dp2px(18), DpUtil.dp2px(18));
|
||||
builder.setSpan(new VerticalImageSpan(ryxzDrawablesMap.get(bean)), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
|
||||
if (nhDrawablesMap.containsKey(bean)) {//靓号
|
||||
builder.append(" ");
|
||||
nhDrawablesMap.get(bean).setBounds(0, 0, DpUtil.dp2px(17), DpUtil.dp2px(17));
|
||||
builder.setSpan(new VerticalImageSpan(nhDrawablesMap.get(bean)), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
if (drawable != null) {
|
||||
builder.append(" ");
|
||||
drawable.setBounds(0, 0, DpUtil.dp2px(34), DpUtil.dp2px(17));
|
||||
builder.setSpan(new VerticalImageSpan(drawable), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
//在这里添加粉丝徽章的图片
|
||||
if (!TextUtils.isEmpty(bean.getMedalNmae()) && !TextUtils.isEmpty(bean.getMedalLevelImageUrl())
|
||||
&& !bean.getMedalNmae().equals("null") && !bean.getMedalNmae().equals("(null)") && !bean.getMedalNmae().equals("<null>")) {//粉丝徽章图标
|
||||
Drawable drawable2 = getMedalImage(bean);
|
||||
if (drawable2 != null) {
|
||||
builder.append(" ");
|
||||
drawable2.setBounds(0, 0, DpUtil.dp2px(44), DpUtil.dp2px(17));
|
||||
builder.setSpan(new VerticalImageSpan(drawable2), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (bean.isManager()) {//直播间管理员图标
|
||||
Drawable drawable3 = ContextCompat.getDrawable(CommonAppContext.sInstance, R.mipmap.icon_live_chat_m);
|
||||
if (drawable3 != null) {
|
||||
builder.append(" ");
|
||||
drawable3.setBounds(0, 0, DpUtil.dp2px(17), DpUtil.dp2px(14));
|
||||
builder.setSpan(new VerticalImageSpan(drawable3), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
}
|
||||
|
||||
if (!TextUtils.isEmpty(bean.getLiangName())) {//靓号图标
|
||||
Drawable drawable4 = ContextCompat.getDrawable(CommonAppContext.sInstance, R.mipmap.icon_live_chat_liang);
|
||||
if (drawable4 != null) {
|
||||
builder.append(" ");
|
||||
drawable4.setBounds(0, 0, DpUtil.dp2px(17), DpUtil.dp2px(14));
|
||||
builder.setSpan(new VerticalImageSpan(drawable4), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
// new add
|
||||
index = builder.length();
|
||||
}
|
||||
}
|
||||
createPrefixCallback.onPrefixCallback(builder);
|
||||
}
|
||||
|
||||
if (drawable != null) {
|
||||
builder.append(" ");
|
||||
drawable.setBounds(0, 0, DpUtil.dp2px(18), DpUtil.dp2px(16));
|
||||
builder.setSpan(new VerticalImageSpan(drawable), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
@Override
|
||||
public void onLoadFailed() {
|
||||
SpannableStringBuilder builder = new SpannableStringBuilder();
|
||||
int index = 0;
|
||||
|
||||
if (levelDrawable != null) {
|
||||
builder.append(" ");
|
||||
levelDrawable.setBounds(0, 0, DpUtil.dp2px(17), DpUtil.dp2px(17));
|
||||
builder.setSpan(new VerticalImageSpan(levelDrawable), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
|
||||
if (gzDrawablesMap.containsKey(bean)) {//贵族
|
||||
builder.append(" ");
|
||||
gzDrawablesMap.get(bean).setBounds(0, 0, DpUtil.dp2px(35), DpUtil.dp2px(20));
|
||||
builder.setSpan(new VerticalImageSpan(gzDrawablesMap.get(bean)), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
|
||||
if (ryxzDrawablesMap.containsKey(bean)) {//荣誉勋章
|
||||
builder.append(" ");
|
||||
ryxzDrawablesMap.get(bean).setBounds(0, 0, DpUtil.dp2px(18), DpUtil.dp2px(18));
|
||||
builder.setSpan(new VerticalImageSpan(ryxzDrawablesMap.get(bean)), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
|
||||
if (nhDrawablesMap.containsKey(bean)) {//靓号
|
||||
builder.append(" ");
|
||||
nhDrawablesMap.get(bean).setBounds(0, 0, DpUtil.dp2px(17), DpUtil.dp2px(17));
|
||||
builder.setSpan(new VerticalImageSpan(nhDrawablesMap.get(bean)), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
//在这里添加粉丝徽章的图片
|
||||
if (!TextUtils.isEmpty(bean.getMedalNmae()) && !TextUtils.isEmpty(bean.getMedalLevelImageUrl())
|
||||
&& !bean.getMedalNmae().equals("null") && !bean.getMedalNmae().equals("(null)") && !bean.getMedalNmae().equals("<null>")) {//粉丝徽章图标
|
||||
Drawable drawable = getMedalImage(bean);
|
||||
if (drawable != null) {
|
||||
builder.append(" ");
|
||||
drawable.setBounds(0, 0, DpUtil.dp2px(44), DpUtil.dp2px(17));
|
||||
builder.setSpan(new VerticalImageSpan(drawable), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (bean.isManager()) {//直播间管理员图标
|
||||
Drawable drawable = ContextCompat.getDrawable(CommonAppContext.sInstance, R.mipmap.icon_live_chat_m);
|
||||
if (drawable != null) {
|
||||
builder.append(" ");
|
||||
drawable.setBounds(0, 0, DpUtil.dp2px(17), DpUtil.dp2px(14));
|
||||
builder.setSpan(new VerticalImageSpan(drawable), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
}
|
||||
|
||||
if (!TextUtils.isEmpty(bean.getLiangName())) {//靓号图标
|
||||
Drawable drawable = ContextCompat.getDrawable(CommonAppContext.sInstance, R.mipmap.icon_live_chat_liang);
|
||||
if (drawable != null) {
|
||||
builder.append(" ");
|
||||
drawable.setBounds(0, 0, DpUtil.dp2px(17), DpUtil.dp2px(14));
|
||||
builder.setSpan(new VerticalImageSpan(drawable), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
// new add
|
||||
index = builder.length();
|
||||
}
|
||||
}
|
||||
createPrefixCallback.onPrefixCallback(builder);
|
||||
}
|
||||
}
|
||||
|
||||
//在这里添加粉丝徽章的图片
|
||||
if (!TextUtils.isEmpty(bean.getMedalNmae()) && !TextUtils.isEmpty(bean.getMedalLevelImageUrl())
|
||||
&& !bean.getMedalNmae().equals("null") && !bean.getMedalNmae().equals("(null)") && !bean.getMedalNmae().equals("<null>")) {//粉丝徽章图标
|
||||
Drawable drawable = getMedalImage(bean);
|
||||
if (drawable != null) {
|
||||
builder.append(" ");
|
||||
drawable.setBounds(0, 0, DpUtil.dp2px(44), DpUtil.dp2px(17));
|
||||
builder.setSpan(new VerticalImageSpan(drawable), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
if (bean.isManager()) {//直播间管理员图标
|
||||
Drawable drawable = ContextCompat.getDrawable(CommonAppContext.sInstance, R.mipmap.icon_live_chat_m);
|
||||
if (drawable != null) {
|
||||
builder.append(" ");
|
||||
drawable.setBounds(0, 0, DpUtil.dp2px(17), DpUtil.dp2px(14));
|
||||
builder.setSpan(new VerticalImageSpan(drawable), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
}
|
||||
|
||||
if (!TextUtils.isEmpty(bean.getLiangName())) {//靓号图标
|
||||
Drawable drawable = ContextCompat.getDrawable(CommonAppContext.sInstance, R.mipmap.icon_live_chat_liang);
|
||||
if (drawable != null) {
|
||||
builder.append(" ");
|
||||
drawable.setBounds(0, 0, DpUtil.dp2px(17), DpUtil.dp2px(14));
|
||||
builder.setSpan(new VerticalImageSpan(drawable), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
// new add
|
||||
index = builder.length();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
private Drawable getMedalImage(final LiveChatBean bean) {
|
||||
@@ -439,6 +514,36 @@ public class LiveTextRender {
|
||||
});
|
||||
}
|
||||
|
||||
public void getGuardImage(Context mContext, int guardType, ImgLoader.DrawableCallback callback) {
|
||||
if (guardType==0){
|
||||
callback.onLoadFailed();
|
||||
}else {
|
||||
if (mContext instanceof Activity) {
|
||||
if (((Activity) mContext).isDestroyed()) {
|
||||
mContext = CommonAppContext.getTopActivity();
|
||||
}
|
||||
}
|
||||
List<NewGuardLevelModel> models = new NewLevelManager(mContext).getGuardLevel();
|
||||
String imgUrl = WordUtil.isNewZh() ? "https://downs.yaoulive.com/%E6%98%9F%E4%B9%8B%E5%AE%88%E6%8A%A4%E9%93%AD%E7%89%8C.png" : "https://downs.yaoulive.com/%E6%98%9F%E5%AE%88%E9%8A%98%E7%89%8C-2.png";
|
||||
for (NewGuardLevelModel newGuardLevelModel : models) {
|
||||
if (newGuardLevelModel.getGuardType() == guardType) {
|
||||
imgUrl = WordUtil.isNewZh() ? newGuardLevelModel.getCn() : newGuardLevelModel.getEn();
|
||||
}
|
||||
}
|
||||
ImgLoader.displayDrawable(mContext, imgUrl, new ImgLoader.DrawableCallback() {
|
||||
@Override
|
||||
public void onLoadSuccess(Drawable drawable) {
|
||||
callback.onLoadSuccess(drawable);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFailed() {
|
||||
callback.onLoadFailed();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 等级设置
|
||||
@@ -576,42 +681,53 @@ public class LiveTextRender {
|
||||
getLiveLevelImage(context, bean.getLevel(), false, new ImgLoader.DrawableCallback() {
|
||||
@Override
|
||||
public void onLoadSuccess(Drawable drawable) {
|
||||
SpannableStringBuilder builder = createPrefix(drawable, bean);
|
||||
int color = Color.parseColor("#68F1F4");
|
||||
if (bean.isAnchor()) {
|
||||
color = Color.parseColor("#FBEABF");
|
||||
} else {
|
||||
color = Color.parseColor("#68F1F4");
|
||||
}
|
||||
switch (bean.getType()) {
|
||||
case LiveChatBean.GIFT:
|
||||
builder = renderGift(color, builder, bean);
|
||||
break;
|
||||
default:
|
||||
builder = renderChat(color, builder, bean);
|
||||
break;
|
||||
}
|
||||
textView.setText(builder);
|
||||
|
||||
createPrefix(drawable, bean, new CreatePrefixCallback() {
|
||||
@Override
|
||||
public void onPrefixCallback(SpannableStringBuilder builder) {
|
||||
int color = Color.parseColor("#68F1F4");
|
||||
if (bean.isAnchor()) {
|
||||
color = Color.parseColor("#FBEABF");
|
||||
} else {
|
||||
color = Color.parseColor("#68F1F4");
|
||||
}
|
||||
switch (bean.getType()) {
|
||||
case LiveChatBean.GIFT:
|
||||
builder = renderGift(color, builder, bean);
|
||||
break;
|
||||
default:
|
||||
builder = renderChat(color, builder, bean);
|
||||
break;
|
||||
}
|
||||
textView.setText(builder);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFailed() {
|
||||
SpannableStringBuilder builder = createPrefix(null, bean);
|
||||
int color = 0;
|
||||
if (bean.isAnchor()) {
|
||||
color = 0xffffdd00;
|
||||
} else {
|
||||
color = Color.parseColor("#68F1F4");
|
||||
}
|
||||
switch (bean.getType()) {
|
||||
case LiveChatBean.GIFT:
|
||||
builder = renderGift(color, builder, bean);
|
||||
break;
|
||||
default:
|
||||
builder = renderChat(color, builder, bean);
|
||||
break;
|
||||
}
|
||||
textView.setText(builder);
|
||||
createPrefix(null, bean, new CreatePrefixCallback() {
|
||||
@Override
|
||||
public void onPrefixCallback(SpannableStringBuilder builder) {
|
||||
int color = 0;
|
||||
if (bean.isAnchor()) {
|
||||
color = 0xffffdd00;
|
||||
} else {
|
||||
color = Color.parseColor("#68F1F4");
|
||||
}
|
||||
switch (bean.getType()) {
|
||||
case LiveChatBean.GIFT:
|
||||
builder = renderGift(color, builder, bean);
|
||||
break;
|
||||
default:
|
||||
builder = renderChat(color, builder, bean);
|
||||
break;
|
||||
}
|
||||
textView.setText(builder);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
@@ -771,23 +887,33 @@ public class LiveTextRender {
|
||||
@Override
|
||||
public void onLoadSuccess(Drawable drawable) {
|
||||
if (textView != null) {
|
||||
SpannableStringBuilder builder = createPrefix(drawable, bean);
|
||||
int start = builder.length();
|
||||
String name = bean.getUserNiceName() + " ";
|
||||
builder.append(name);
|
||||
builder.append(bean.getContent());
|
||||
textView.setText(builder);
|
||||
createPrefix(drawable, bean, new CreatePrefixCallback() {
|
||||
@Override
|
||||
public void onPrefixCallback(SpannableStringBuilder builder) {
|
||||
int start = builder.length();
|
||||
String name = bean.getUserNiceName() + " ";
|
||||
builder.append(name);
|
||||
builder.append(bean.getContent());
|
||||
textView.setText(builder);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFailed() {
|
||||
if (textView != null) {
|
||||
SpannableStringBuilder builder = createPrefix(null, bean);
|
||||
int start = builder.length();
|
||||
String name = bean.getUserNiceName() + " ";
|
||||
builder.append(name);
|
||||
textView.setText(builder);
|
||||
createPrefix(null, bean, new CreatePrefixCallback() {
|
||||
@Override
|
||||
public void onPrefixCallback(SpannableStringBuilder builder) {
|
||||
int start = builder.length();
|
||||
String name = bean.getUserNiceName() + " ";
|
||||
builder.append(name);
|
||||
textView.setText(builder);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -185,6 +185,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
||||
.setActivity(false)
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.BOTTOM_COLLECTION));
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
//玩
|
||||
@@ -368,6 +369,25 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
||||
}
|
||||
}
|
||||
});
|
||||
if (IMLoginManager.get(mContext).getGuardRedPoint()) {
|
||||
findViewById(R.id.total_image_red_point).setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
findViewById(R.id.total_image_red_point).setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
public void onGuardRed() {
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (IMLoginManager.get(mContext).getGuardRedPoint()) {
|
||||
findViewById(R.id.total_image_red_point).setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
findViewById(R.id.total_image_red_point).setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
},1000);
|
||||
|
||||
}
|
||||
|
||||
public void setGiftRemainingQuantity(String giftRemainingQuantity) {
|
||||
|
||||
@@ -5,6 +5,9 @@ import static com.yunbao.live.event.LiveAudienceEvent.LiveAudienceType.WISH_LIST
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkInfo;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
@@ -886,16 +889,43 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
||||
* 点击开始直播按钮
|
||||
*/
|
||||
private void startLiveInit() {
|
||||
boolean startPreview = ((LiveRyAnchorActivity) mContext).isStartPreview();
|
||||
if (isWifiProxy(mContext) || checkVPN((ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE))) {
|
||||
ToastUtil.show(WordUtil.isNewZh()?"檢測開啓了VPN或者代理,請先關閉VPN或者代理再開播。":
|
||||
"It is detected that VPN or proxy is turned on. Please turn off VPN or proxy before starting the broadcast.");
|
||||
} else {
|
||||
boolean startPreview = ((LiveRyAnchorActivity) mContext).isStartPreview();
|
||||
// if (!startPreview) {
|
||||
// ToastUtil.show(R.string.please_wait);
|
||||
// return;
|
||||
// }
|
||||
if (mLiveClassID == 0) {
|
||||
ToastUtil.show(WordUtil.getNewString(R.string.live_choose_live_class));
|
||||
return;
|
||||
if (mLiveClassID == 0) {
|
||||
ToastUtil.show(WordUtil.getNewString(R.string.live_choose_live_class));
|
||||
return;
|
||||
}
|
||||
createRoom();
|
||||
}
|
||||
createRoom();
|
||||
}
|
||||
|
||||
private boolean isWifiProxy(Context context) {
|
||||
final boolean IS_ICS_OR_LATER = Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH;
|
||||
String proxyAddress;
|
||||
int proxyPort;
|
||||
if (IS_ICS_OR_LATER) {
|
||||
proxyAddress = System.getProperty("http.proxyHost");
|
||||
String portStr = System.getProperty("http.proxyPort");
|
||||
proxyPort = Integer.parseInt((portStr != null ? portStr : "-1"));
|
||||
} else {
|
||||
proxyAddress = android.net.Proxy.getHost(context);
|
||||
proxyPort = android.net.Proxy.getPort(context);
|
||||
}
|
||||
return (!TextUtils.isEmpty(proxyAddress)) && (proxyPort != -1);
|
||||
}
|
||||
|
||||
private boolean checkVPN(ConnectivityManager connMgr) {
|
||||
//don't know why always returns null:
|
||||
NetworkInfo networkInfo = connMgr.getNetworkInfo(ConnectivityManager.TYPE_VPN);
|
||||
boolean isVpnConn = networkInfo == null ? false : networkInfo.isConnected();
|
||||
return isVpnConn;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -91,6 +91,7 @@ import com.yunbao.common.bean.RankHourModel;
|
||||
import com.yunbao.common.bean.RedPacketInfoModel;
|
||||
import com.yunbao.common.bean.RedPacketModel;
|
||||
import com.yunbao.common.bean.RewardAllModel;
|
||||
import com.yunbao.common.bean.SendMoneyLongModel;
|
||||
import com.yunbao.common.bean.StarChallengeStatusModel;
|
||||
import com.yunbao.common.bean.SudGameDateModel;
|
||||
import com.yunbao.common.bean.TaskModel;
|
||||
@@ -98,10 +99,12 @@ import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.bean.WishModel;
|
||||
import com.yunbao.common.bean.XydCompleteModel;
|
||||
import com.yunbao.common.event.AllServerNotifyEvent;
|
||||
import com.yunbao.common.event.AllServerNotifyFFGGGDJANEvent;
|
||||
import com.yunbao.common.event.AnchorInfoEvent;
|
||||
import com.yunbao.common.event.CustomFullServiceNotifyEvent;
|
||||
import com.yunbao.common.event.LiveRoomChangeEvent;
|
||||
import com.yunbao.common.event.LiveSudGamePopupShowOrHideEvent;
|
||||
import com.yunbao.common.event.SendMoneyLongEndEvent;
|
||||
import com.yunbao.common.event.SlideEvent;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.API;
|
||||
@@ -158,9 +161,11 @@ import com.yunbao.live.bean.LiveLuckGiftWinBean;
|
||||
import com.yunbao.live.bean.LivePKUserListBean;
|
||||
import com.yunbao.live.bean.LiveReceiveGiftBean;
|
||||
import com.yunbao.live.bean.LiveWishlistBean;
|
||||
import com.yunbao.live.bean.NewAllServerNotifyGuardEvent;
|
||||
import com.yunbao.live.bean.WishlistItemModel;
|
||||
import com.yunbao.live.custom.LiveLightView;
|
||||
import com.yunbao.live.custom.RightGradual;
|
||||
import com.yunbao.live.dialog.DragonSendMoneyListPopup;
|
||||
import com.yunbao.live.dialog.GiftWallDialog;
|
||||
import com.yunbao.live.dialog.LiveContactDetailsSendGiftDialog;
|
||||
import com.yunbao.live.dialog.LiveFaceUnityDialogFragment;
|
||||
@@ -389,6 +394,12 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
private LinearLayout combo_layout;
|
||||
private TextView combo_number;
|
||||
private View quick_gift_reminder;
|
||||
private int guardType = 0;
|
||||
|
||||
public LiveRoomViewHolder setGuardType(int guardType) {
|
||||
this.guardType = guardType;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onUpdata(String str) {
|
||||
@@ -617,6 +628,21 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
}
|
||||
}
|
||||
|
||||
public void guardSpecialEffect(LiveReceiveGiftBean liveReceiveGiftBean) {
|
||||
// LiveChatBean chatBean = new LiveChatBean();
|
||||
// chatBean.setContent(
|
||||
// (WordUtil.isNewZh() ? liveReceiveGiftBean.getMsg() : liveReceiveGiftBean.getMsg_en()));
|
||||
// chatBean.setType(LiveChatBean.SYSTEM);
|
||||
// mLiveChatAdapter.insertItem(chatBean);
|
||||
Log.e("guardSpecialEffect", "msg" + liveReceiveGiftBean.getMsg() + "msg-en" + liveReceiveGiftBean.getMsg_en() + "guard_type" + liveReceiveGiftBean.getGuard_type());
|
||||
if (mLiveGiftAnimPresenter == null) {
|
||||
mLiveGiftAnimPresenter = new LiveGiftAnimPresenter(mContext, mContentView, mGifImageView, mSVGAImageView, mLiveGiftPrizePoolContainer, windowManager);
|
||||
}
|
||||
liveReceiveGiftBean.setGiftId(liveReceiveGiftBean.getGiftName());
|
||||
mLiveGiftAnimPresenter.showGifGift(liveReceiveGiftBean);
|
||||
|
||||
|
||||
}
|
||||
|
||||
List<XydCompleteModel> xydCompleteModels = new ArrayList<>();
|
||||
|
||||
@@ -1568,10 +1594,42 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
pa_pao_layout.setVisibility(View.GONE);
|
||||
combo_layout.setVisibility(View.GONE);
|
||||
|
||||
dragonImmediateParticipation = (LinearLayout) findViewById(R.id.dragon_immediate_participation);
|
||||
dragonImmediateParticipationTime = (LinearLayout) findViewById(R.id.dragon_immediate_participation_time);
|
||||
participation_time = (TextView) findViewById(R.id.participation_time);
|
||||
|
||||
ViewClicksAntiShake.clicksAntiShake(dragonImmediateParticipation, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
new DragonSendMoneyListPopup(mContext, mLiveUid, false, isAttention != 0).showDialog();
|
||||
// new XPopup.Builder(mContext)
|
||||
// .asCustom(new GuardUpgradePopup(mContext, mLiveUid))
|
||||
// .show();
|
||||
// ttttttype = ttttttype + 1;
|
||||
// buyGuardNew(new NewAllServerNotifyGuardEvent()
|
||||
// .setAction("90")
|
||||
// .setGuardType(String.valueOf(ttttttype))
|
||||
// .setMsgCn("周末暴打小朋友在接化发直播間開通【星之守護】")
|
||||
// .setMsgEn("周末暴打小朋友opened 【星之守護】 in 接化发 live broadcast room")
|
||||
// .setLiveuid("98915"));
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(dragonImmediateParticipationTime, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
new DragonSendMoneyListPopup(mContext, mLiveUid, true, isAttention != 0).showDialog();
|
||||
// new XPopup.Builder(mContext)
|
||||
// .asCustom(new GuardUpgradePopup(mContext, mLiveUid))
|
||||
// .show();
|
||||
}
|
||||
});
|
||||
// dragonImmediateParticipation.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
int ttttttype = 0;
|
||||
private LinearLayout dragonImmediateParticipation, dragonImmediateParticipationTime;
|
||||
private FrameLayout redPacket;
|
||||
private TextView redPacketCountdown, redSchedule, openRedPacket;
|
||||
private TextView redPacketCountdown, redSchedule, openRedPacket, participation_time;
|
||||
private LinearLayout redPacketQueue;
|
||||
private int redTimeCountdown = 0;
|
||||
private RedPacketModel mRedPacketModel;
|
||||
@@ -1624,6 +1682,15 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
}
|
||||
} else {
|
||||
redPacket.setVisibility(View.GONE);
|
||||
if (dragonImmediateParticipation.getVisibility() == View.VISIBLE) {
|
||||
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams();
|
||||
layoutParams.topMargin = DpUtil.dp2px(110);
|
||||
dragonImmediateParticipation.setLayoutParams(layoutParams);
|
||||
} if (dragonImmediateParticipationTime.getVisibility() == View.VISIBLE) {
|
||||
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams();
|
||||
layoutParams.topMargin = DpUtil.dp2px(110);
|
||||
dragonImmediateParticipationTime.setLayoutParams(layoutParams);
|
||||
}
|
||||
anchorTimeHandler.removeCallbacks(anchorTimeRunnable);
|
||||
LiveNetManager.get(mContext).
|
||||
endRedPacket(mLiveUid, mRedPacketModel.getRedPacketId(), new com.yunbao.common.http.base.HttpCallback<String>() {
|
||||
@@ -1650,6 +1717,25 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
mRedPacketModel = redPacketModel;
|
||||
if (redPacketModel.getIsShow() == 1) {
|
||||
redPacket.setVisibility(View.VISIBLE);
|
||||
if (dragonImmediateParticipation.getVisibility() == View.VISIBLE) {
|
||||
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams();
|
||||
layoutParams.topMargin = DpUtil.dp2px(190);
|
||||
dragonImmediateParticipation.setLayoutParams(layoutParams);
|
||||
}
|
||||
if (dragonImmediateParticipationTime.getVisibility() == View.VISIBLE&&mContext instanceof LiveRyAnchorActivity) {
|
||||
RelativeLayout.LayoutParams layoutParamsredPacket = (RelativeLayout.LayoutParams) redPacket.getLayoutParams();
|
||||
layoutParamsredPacket.topMargin = DpUtil.dp2px(110);
|
||||
redPacket.setLayoutParams(layoutParamsredPacket);
|
||||
|
||||
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipationTime.getLayoutParams();
|
||||
layoutParams.topMargin = DpUtil.dp2px(190);
|
||||
dragonImmediateParticipationTime.setLayoutParams(layoutParams);
|
||||
}
|
||||
if (dragonImmediateParticipationTime.getVisibility() == View.GONE&&mContext instanceof LiveRyAnchorActivity){
|
||||
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) redPacket.getLayoutParams();
|
||||
layoutParams.topMargin = DpUtil.dp2px(110);
|
||||
redPacket.setLayoutParams(layoutParams);
|
||||
}
|
||||
if (redPacketModel.getCountdown() > 180) {
|
||||
redPacketQueue.setVisibility(View.GONE);
|
||||
redPacketCountdown.setVisibility(View.VISIBLE);
|
||||
@@ -1721,6 +1807,16 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
|
||||
public void hindeRedPacket() {
|
||||
redPacket.setVisibility(View.GONE);
|
||||
if (dragonImmediateParticipation.getVisibility() == View.VISIBLE) {
|
||||
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams();
|
||||
layoutParams.topMargin = DpUtil.dp2px(110);
|
||||
dragonImmediateParticipation.setLayoutParams(layoutParams);
|
||||
}
|
||||
if (dragonImmediateParticipationTime.getVisibility() == View.VISIBLE) {
|
||||
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipationTime.getLayoutParams();
|
||||
layoutParams.topMargin = DpUtil.dp2px(110);
|
||||
dragonImmediateParticipationTime.setLayoutParams(layoutParams);
|
||||
}
|
||||
}
|
||||
|
||||
public void setRedPacketInfoModel(RedPacketInfoModel redPacket) {
|
||||
@@ -2113,7 +2209,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
|
||||
public void setLiveUid(String liveUid) {
|
||||
mLiveUid = liveUid;
|
||||
LiveHttpUtil.geteEvent(mLiveUid, new HttpCallback() {
|
||||
LiveHttpUtil.getAnchorActiveImgStatus(mLiveUid, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && imgEvent != null) {
|
||||
@@ -3114,6 +3210,101 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
}
|
||||
}
|
||||
|
||||
SendMoneyLongModel mSendMoneyLongModel;
|
||||
|
||||
public void onSendMoneyLongModel(SendMoneyLongModel sendMoneyLongModel) {
|
||||
|
||||
if (mLiveUid.contains(String.valueOf(IMLoginManager.get(mContext).getUserInfo().getId()))) {
|
||||
mSendMoneyLongModel = sendMoneyLongModel;
|
||||
sendMoneyTime = Long.parseLong(sendMoneyLongModel.getCountdown());
|
||||
participation_time.removeCallbacks(sendMoneyRunnable);
|
||||
dragonImmediateParticipationTime.setVisibility(View.VISIBLE);
|
||||
if (redPacket.getVisibility() == View.VISIBLE) {
|
||||
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams();
|
||||
layoutParams.topMargin = DpUtil.dp2px(190);
|
||||
dragonImmediateParticipationTime.setLayoutParams(layoutParams);
|
||||
} else {
|
||||
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams();
|
||||
layoutParams.topMargin = DpUtil.dp2px(110);
|
||||
dragonImmediateParticipationTime.setLayoutParams(layoutParams);
|
||||
}
|
||||
String s1 = StringUtil.getDurationText(sendMoneyTime * 1000);
|
||||
participation_time.setText(s1);
|
||||
participation_time.post(sendMoneyRunnable);
|
||||
} else {
|
||||
dragonImmediateParticipation.setVisibility(View.VISIBLE);
|
||||
if (redPacket.getVisibility() == View.VISIBLE) {
|
||||
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams();
|
||||
layoutParams.topMargin = DpUtil.dp2px(190);
|
||||
dragonImmediateParticipation.setLayoutParams(layoutParams);
|
||||
} else {
|
||||
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams();
|
||||
layoutParams.topMargin = DpUtil.dp2px(110);
|
||||
dragonImmediateParticipation.setLayoutParams(layoutParams);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void onSendMoneyLongEndEvent(SendMoneyLongEndEvent moneyLongEndEvent) {
|
||||
if (mLiveUid.contains(String.valueOf(IMLoginManager.get(mContext).getUserInfo().getId()))) {
|
||||
dragonImmediateParticipationTime.setVisibility(View.GONE);
|
||||
if (redPacket.getVisibility() == View.VISIBLE) {
|
||||
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams();
|
||||
layoutParams.topMargin = DpUtil.dp2px(190);
|
||||
dragonImmediateParticipationTime.setLayoutParams(layoutParams);
|
||||
} else {
|
||||
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams();
|
||||
layoutParams.topMargin = DpUtil.dp2px(110);
|
||||
dragonImmediateParticipationTime.setLayoutParams(layoutParams);
|
||||
}
|
||||
} else {
|
||||
dragonImmediateParticipation.setVisibility(View.GONE);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private long sendMoneyTime;
|
||||
Runnable sendMoneyRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
sendMoneyTime--;
|
||||
if (sendMoneyTime > 0) {
|
||||
String s1 = StringUtil.getDurationText(sendMoneyTime * 1000);
|
||||
participation_time.setText(s1);
|
||||
participation_time.postDelayed(sendMoneyRunnable, 1000);
|
||||
} else {
|
||||
participation_time.removeCallbacks(sendMoneyRunnable);
|
||||
LiveNetManager.get(mContext)
|
||||
.endSendMoneyLong(mLiveUid, mSendMoneyLongModel.getSendMoneyLongKey(),
|
||||
new com.yunbao.common.http.base.HttpCallback<SendMoneyLongModel>() {
|
||||
@Override
|
||||
public void onSuccess(SendMoneyLongModel data) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public void onSendMoneyLong() {
|
||||
dragonImmediateParticipation.setVisibility(View.VISIBLE);
|
||||
if (redPacket.getVisibility() == View.VISIBLE) {
|
||||
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams();
|
||||
layoutParams.topMargin = DpUtil.dp2px(190);
|
||||
dragonImmediateParticipation.setLayoutParams(layoutParams);
|
||||
} else {
|
||||
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams();
|
||||
layoutParams.topMargin = DpUtil.dp2px(110);
|
||||
dragonImmediateParticipation.setLayoutParams(layoutParams);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置礼物墙和周星榜
|
||||
*/
|
||||
@@ -3812,6 +4003,24 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
setHotData(bean.getHot_num());
|
||||
}
|
||||
|
||||
//新版购买守护
|
||||
public void buyGuardNew(NewAllServerNotifyGuardEvent event) {
|
||||
if (mLiveGiftAnimPresenter == null) {
|
||||
mLiveGiftAnimPresenter = new LiveGiftAnimPresenter(mContext, mContentView, mGifImageView, mSVGAImageView, mLiveGiftPrizePoolContainer, windowManager);
|
||||
}
|
||||
mLiveGiftAnimPresenter.setLiveUidStream(mLiveUid, mStream);
|
||||
mLiveGiftAnimPresenter.showBuyGuardGiftAnimNew(event);
|
||||
|
||||
}
|
||||
|
||||
public void showAllServerNotifyFFGGGD(AllServerNotifyFFGGGDJANEvent notifyFFGGGDJANEvent,boolean showB) {
|
||||
if (mLiveGiftAnimPresenter == null) {
|
||||
mLiveGiftAnimPresenter = new LiveGiftAnimPresenter(mContext, mContentView, mGifImageView, mSVGAImageView, mLiveGiftPrizePoolContainer, windowManager);
|
||||
}
|
||||
mLiveGiftAnimPresenter.setLiveUidStream(mLiveUid, mStream);
|
||||
mLiveGiftAnimPresenter.showAllServerNotifyFFGGGD(notifyFFGGGDJANEvent,showB);
|
||||
}
|
||||
|
||||
//全服通知 购买坐骑
|
||||
public void showBuyZuojiMessage(LiveReceiveGiftBean bean) {
|
||||
if (mLiveGiftAnimPresenter == null) {
|
||||
|
||||
@@ -128,6 +128,7 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
|
||||
btn_start_dr_pk.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (pk_nub <= 0) return;
|
||||
//開始多人PK
|
||||
HttpClient.getInstance().post("live.startDRPK", "live.startDRPK")
|
||||
.params("roomid", CommonAppConfig.getInstance().getUid())
|
||||
@@ -438,7 +439,7 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
|
||||
}
|
||||
|
||||
public void setLiveUid(String liveUid) {
|
||||
LiveHttpUtil.geteEvent(liveUid, new HttpCallback() {
|
||||
LiveHttpUtil.getAnchorActiveImgStatus(liveUid, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
package com.yunbao.live.views;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.makeramen.roundedimageview.RoundedImageView;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.utils.CommonIconUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.bean.GuardUserModel;
|
||||
|
||||
public class NewGuardViewHolder extends RecyclerView.ViewHolder {
|
||||
ImageView guard_number_img, userSex, tagKing;
|
||||
TextView guard_number_text, user_nicename, guardLevel, contribution;
|
||||
RoundedImageView avatar;
|
||||
|
||||
public NewGuardViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
guard_number_img = itemView.findViewById(R.id.guard_number_img);
|
||||
guard_number_text = itemView.findViewById(R.id.guard_number_text);
|
||||
avatar = itemView.findViewById(R.id.avatar);
|
||||
user_nicename = itemView.findViewById(R.id.user_nicename);
|
||||
userSex = itemView.findViewById(R.id.sex);
|
||||
guardLevel = itemView.findViewById(R.id.guard_level);
|
||||
tagKing = itemView.findViewById(R.id.tag_king);
|
||||
contribution = itemView.findViewById(R.id.contribution);
|
||||
}
|
||||
|
||||
public void setData(GuardUserModel guardUserModel, int position) {
|
||||
if (position == 0) {
|
||||
guard_number_img.setVisibility(View.VISIBLE);
|
||||
guard_number_text.setVisibility(View.GONE);
|
||||
ImgLoader.display(itemView.getContext(), R.mipmap.icon_one_guard, guard_number_img);
|
||||
} else if (position == 1) {
|
||||
guard_number_img.setVisibility(View.VISIBLE);
|
||||
guard_number_text.setVisibility(View.GONE);
|
||||
ImgLoader.display(itemView.getContext(), R.mipmap.icon_two_guard, guard_number_img);
|
||||
} else if (position == 2) {
|
||||
guard_number_img.setVisibility(View.VISIBLE);
|
||||
guard_number_text.setVisibility(View.GONE);
|
||||
ImgLoader.display(itemView.getContext(), R.mipmap.icon_three_guard, guard_number_img);
|
||||
} else {
|
||||
guard_number_img.setVisibility(View.GONE);
|
||||
guard_number_text.setVisibility(View.VISIBLE);
|
||||
guard_number_text.setText(String.valueOf(position + 1));
|
||||
}
|
||||
ImgLoader.display(itemView.getContext(), guardUserModel.getAvatar(), avatar);
|
||||
user_nicename.setText(guardUserModel.getUserNicename());
|
||||
userSex.setImageResource(CommonIconUtil.getSexIcon(guardUserModel.getSex()));
|
||||
guardLevel.setText(String.valueOf(guardUserModel.getGuardLevel()));
|
||||
|
||||
contribution.setText(guardUserModel.getContribute());
|
||||
|
||||
if (TextUtils.equals(guardUserModel.getGuardLevelCard(), "0")) {
|
||||
switch (guardUserModel.getGuardType()) {
|
||||
case 1:
|
||||
ImgLoader.display(itemView.getContext(), R.mipmap.tag_start_hui, tagKing);
|
||||
break;
|
||||
case 2:
|
||||
ImgLoader.display(itemView.getContext(), R.mipmap.tag_king_hui, tagKing);
|
||||
break;
|
||||
case 3:
|
||||
ImgLoader.display(itemView.getContext(), R.mipmap.tag_god_hui, tagKing);
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
switch (guardUserModel.getGuardType()) {
|
||||
case 1:
|
||||
ImgLoader.display(itemView.getContext(), R.mipmap.tag_start, tagKing);
|
||||
break;
|
||||
case 2:
|
||||
ImgLoader.display(itemView.getContext(), R.mipmap.tag_king, tagKing);
|
||||
break;
|
||||
case 3:
|
||||
ImgLoader.display(itemView.getContext(), R.mipmap.tag_god, tagKing);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -43,6 +43,7 @@ import com.yunbao.common.bean.LiveUserGiftBean;
|
||||
import com.yunbao.common.bean.MsgModel;
|
||||
import com.yunbao.common.bean.RedPacketInfoModel;
|
||||
import com.yunbao.common.bean.RedPacketModel;
|
||||
import com.yunbao.common.bean.SendMoneyLongModel;
|
||||
import com.yunbao.common.bean.StarChallengeStatusModel;
|
||||
import com.yunbao.common.bean.SudGameDateModel;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
@@ -50,6 +51,7 @@ import com.yunbao.common.bean.WishModel;
|
||||
import com.yunbao.common.bean.XydCompleteModel;
|
||||
import com.yunbao.common.custom.MyViewPager;
|
||||
import com.yunbao.common.event.AllServerNotifyEvent;
|
||||
import com.yunbao.common.event.AllServerNotifyFFGGGDJANEvent;
|
||||
import com.yunbao.common.event.FollowEvent;
|
||||
import com.yunbao.common.event.HideShowEvent;
|
||||
import com.yunbao.common.event.LiveFloatEvent;
|
||||
@@ -57,6 +59,7 @@ import com.yunbao.common.event.LiveGiftDialogEvent;
|
||||
import com.yunbao.common.event.LiveRoomChangeEvent;
|
||||
import com.yunbao.common.event.LiveSudGamePopupShowOrHideEvent;
|
||||
import com.yunbao.common.event.SendBlindGiftEvent;
|
||||
import com.yunbao.common.event.SendMoneyLongEndEvent;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.CommonHttpConsts;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
@@ -90,6 +93,7 @@ import com.yunbao.live.bean.LiveGuardInfo;
|
||||
import com.yunbao.live.bean.LiveLuckGiftWinBean;
|
||||
import com.yunbao.live.bean.LivePKUserListBean;
|
||||
import com.yunbao.live.bean.LiveReceiveGiftBean;
|
||||
import com.yunbao.live.bean.NewAllServerNotifyGuardEvent;
|
||||
import com.yunbao.live.bean.OpenParametersModel;
|
||||
import com.yunbao.live.dialog.BlowkissDialog;
|
||||
import com.yunbao.live.dialog.NewUserDialog;
|
||||
@@ -449,7 +453,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
public void run() {
|
||||
//加入房间发送Im消息
|
||||
LiveNetManager.get(mContext).userJoinRoomNew(mLiveBean.getStream(), mLiveBean.getUid());
|
||||
Log.e("观看时长","userJoinRoomNew-----------------------"+mLiveBean.getUid());
|
||||
Log.e("观看时长", "userJoinRoomNew-----------------------" + mLiveBean.getUid());
|
||||
}
|
||||
};
|
||||
|
||||
@@ -462,7 +466,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
.enterRoomNew(mLiveBean.getStream(), mLiveBean.getUid(), mLiveBean.getCity(), new com.yunbao.common.http.base.HttpCallback<EnterRoomNewModel>() {
|
||||
@Override
|
||||
public void onSuccess(EnterRoomNewModel data) {
|
||||
Log.e("观看时长","enterRoomNew-----------------------"+ mLiveBean.getUid());
|
||||
Log.e("观看时长", "enterRoomNew-----------------------" + mLiveBean.getUid());
|
||||
isEnterRoom = true;
|
||||
if (TextUtils.isEmpty(leaveStream)) {
|
||||
leaveStream = mLiveBean.getStream();
|
||||
@@ -624,7 +628,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
if (pkInfo != null && pkInfo.getIntValue("drpk_status") != 1) {
|
||||
String pkUid = pkInfo.getString("pkuid");
|
||||
//初始化天梯赛信息
|
||||
mLiveRoomViewHolder.initRankPKInfo(String.valueOf(data.getLiveInfo().getUid()),pkUid);
|
||||
mLiveRoomViewHolder.initRankPKInfo(String.valueOf(data.getLiveInfo().getUid()), pkUid);
|
||||
anyway = "1";
|
||||
if (!TextUtils.isEmpty(pkUid) && !"0".equals(pkUid) && anyway.equals("0")) {
|
||||
if (mLiveSDK != Constants.LIVE_SDK_TX) {
|
||||
@@ -693,6 +697,17 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
|
||||
upDataPkScore(pkInfo.getJSONArray("userlist"), pkInfo.getIntValue("drpk_time"));
|
||||
}
|
||||
if (data.getEnterRoomInfo().getGuard() != null) {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
if (TextUtils.isEmpty(data.getEnterRoomInfo().getGuard().getGuardType())) {
|
||||
IMLoginManager.get(mContext).setGuardType(0);
|
||||
} else {
|
||||
int guardType = Integer.parseInt(data.getEnterRoomInfo().getGuard().getGuardType());
|
||||
IMLoginManager.get(mContext).setGuardType(guardType);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
// mLivePlayViewHolder.setLayoutInterface(new LivePlayRyViewHolder.PlayViewLayoutInterface() {
|
||||
// @Override
|
||||
// public void playViewLayout(int width, int height) {
|
||||
@@ -762,6 +777,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
}
|
||||
}
|
||||
mLiveAudienceViewHolder.upDataQuickGift(data.getQuickGiftRemainingQuantity(), data.getIfViewingDurationComplete());
|
||||
if (!TextUtils.isEmpty(data.getModel().getSendMoneyLongKey())) {
|
||||
mLiveRoomViewHolder.onSendMoneyLong();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -817,7 +835,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
Log.e("直播间接口调用排查", "onRemove---------------");
|
||||
LiveNetManager.get(mContext).cancelLive();
|
||||
liveHandler.removeCallbacks(sendFIm);
|
||||
pkInfo=null;
|
||||
pkInfo = null;
|
||||
linkMicPkStartHandler.removeCallbacks(linkMicPkStartRunnable);
|
||||
LiveHttpUtil.cancel(LiveHttpConsts.CHECK_LIVE);
|
||||
LiveHttpUtil.cancel(LiveHttpConsts.ENTER_ROOM);
|
||||
@@ -1294,6 +1312,18 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
}
|
||||
}
|
||||
|
||||
public void buyGuardNew(NewAllServerNotifyGuardEvent event) {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
mLiveRoomViewHolder.buyGuardNew(event);
|
||||
}
|
||||
}
|
||||
|
||||
public void showAllServerNotifyFFGGGD(AllServerNotifyFFGGGDJANEvent notifyFFGGGDJANEvent) {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
mLiveRoomViewHolder.showAllServerNotifyFFGGGD(notifyFFGGGDJANEvent,true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBuyZuoji(LiveReceiveGiftBean bean) {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
@@ -2179,6 +2209,12 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
}
|
||||
}
|
||||
|
||||
public void guardSpecialEffect(LiveReceiveGiftBean liveReceiveGiftBean) {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
mLiveRoomViewHolder.guardSpecialEffect(liveReceiveGiftBean);
|
||||
}
|
||||
}
|
||||
|
||||
public void blindBoxAllServerNotify(AllServerNotifyEvent event) {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
mLiveRoomViewHolder.blindBoxAllServerNotify(event);
|
||||
@@ -2206,4 +2242,22 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
public boolean isEnterRoom() {
|
||||
return isEnterRoom;
|
||||
}
|
||||
|
||||
public void onSendMoneyLongModel(SendMoneyLongModel sendMoneyLongModel) {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
mLiveRoomViewHolder.onSendMoneyLongModel(sendMoneyLongModel);
|
||||
}
|
||||
}
|
||||
|
||||
public void onSendMoneyLongEndEvent(SendMoneyLongEndEvent moneyLongEndEvent) {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
mLiveRoomViewHolder.onSendMoneyLongEndEvent(moneyLongEndEvent);
|
||||
}
|
||||
}
|
||||
|
||||
public void onGuardRed() {
|
||||
if (mLiveAudienceViewHolder != null) {
|
||||
mLiveAudienceViewHolder.onGuardRed();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners
|
||||
android:topLeftRadius="12dp"
|
||||
android:topRightRadius="12dp" />
|
||||
<gradient
|
||||
android:angle="90"
|
||||
android:endColor="#1B1814"
|
||||
android:startColor="#2D2720" />
|
||||
|
||||
</shape>
|
||||
10
live/src/main/res/drawable/background_live_guard.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:angle="90"
|
||||
android:endColor="#100C4C"
|
||||
android:startColor="#0F043D" />
|
||||
<corners
|
||||
android:topLeftRadius="12dp"
|
||||
android:topRightRadius="12dp" />
|
||||
</shape>
|
||||
10
live/src/main/res/drawable/background_live_guard2.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:angle="90"
|
||||
android:endColor="#1D174A"
|
||||
android:startColor="#160C43" />
|
||||
<corners
|
||||
android:topLeftRadius="12dp"
|
||||
android:topRightRadius="12dp" />
|
||||
</shape>
|
||||
8
live/src/main/res/drawable/background_live_guard3.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:angle="90"
|
||||
android:startColor="#181F3B"
|
||||
android:endColor="#2B1477" />
|
||||
|
||||
</shape>
|
||||
12
live/src/main/res/drawable/guard_buy_bottom_bg.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:angle="45"
|
||||
android:endColor="#3B217D"
|
||||
android:startColor="#181F3B" />
|
||||
<corners
|
||||
android:bottomLeftRadius="0dp"
|
||||
android:bottomRightRadius="0dp"
|
||||
android:topLeftRadius="0dp"
|
||||
android:topRightRadius="0dp" />
|
||||
</shape>
|
||||
13
live/src/main/res/drawable/guard_buy_center_bg.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:angle="-45"
|
||||
android:centerColor="#090522"
|
||||
android:endColor="#0E1633"
|
||||
android:startColor="#2C1661" />
|
||||
<corners
|
||||
android:bottomLeftRadius="0dp"
|
||||
android:bottomRightRadius="0dp"
|
||||
android:topLeftRadius="12dp"
|
||||
android:topRightRadius="12dp" />
|
||||
</shape>
|
||||
13
live/src/main/res/drawable/guard_buy_top_bg.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:angle="45"
|
||||
android:centerColor="#220A3C"
|
||||
android:endColor="#0E1633"
|
||||
android:startColor="#0E1633" />
|
||||
<corners
|
||||
android:bottomLeftRadius="0dp"
|
||||
android:bottomRightRadius="0dp"
|
||||
android:topLeftRadius="12dp"
|
||||
android:topRightRadius="12dp" />
|
||||
</shape>
|
||||
118
live/src/main/res/layout/banner_item_buy_guard.xml
Normal file
@@ -0,0 +1,118 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="180dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/bg_star_guard" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="11dp"
|
||||
android:layout_marginTop="60dp"
|
||||
android:ellipsize="end"
|
||||
android:maxWidth="200dp"
|
||||
android:maxLines="1"
|
||||
android:text="@string/be_their_exclusive_guardian"
|
||||
android:textColor="#FAE3B9"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/guardian_medal"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="90dp"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:src="@mipmap/icon_king_guardian_medal_grey" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginBottom="38dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/user_avatar"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="35dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/icon_male_default"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/live_avatar"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/icon_male_default"
|
||||
app:riv_oval="true" />
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tas_guardian_group"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:text="@string/tas_guardian_group"
|
||||
android:textColor="#FDECCB"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="48dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/guard_open"
|
||||
android:layout_width="93dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/icon_bg_star_guard_open" />
|
||||
|
||||
<com.flyjingfish.gradienttextviewlib.GradientTextView
|
||||
android:id="@+id/god_guard"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:letterSpacing="0.1"
|
||||
android:text="@string/not_yet_open"
|
||||
android:textSize="12sp"
|
||||
android:visibility="visible"
|
||||
app:gradient_angle="45"
|
||||
app:gradient_endColor="#FFF2D7"
|
||||
app:gradient_startColor="#FFC179" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
73
live/src/main/res/layout/dialog_dragon_send_money_list.xml
Normal file
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="450dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@drawable/backgroud_dragon_send_money_list"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/money_back"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/dragon_rule"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_gravity="end" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="15dp">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:src="@mipmap/icon_live_dragon_money_back" />
|
||||
|
||||
<ImageView
|
||||
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_gravity="end"
|
||||
android:src="@mipmap/icon_dragon_rule" />
|
||||
|
||||
<com.flyjingfish.gradienttextviewlib.GradientTextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:letterSpacing="0.1"
|
||||
android:text="@string/dragon_sends_money"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:gradient_angle="45"
|
||||
app:gradient_endColor="#F9D78F"
|
||||
app:gradient_startColor="#E59F1F" />
|
||||
</FrameLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/send_money_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:itemCount="4"
|
||||
android:paddingBottom="12dp"
|
||||
tools:listitem="@layout/view_dragon_send_money_list" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
206
live/src/main/res/layout/dialog_live_buy_guard.xml
Normal file
@@ -0,0 +1,206 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="509dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/dialog_live_buy_guard_bg" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.stx.xhb.androidx.XBanner
|
||||
android:id="@+id/buy_guard_banner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="220dp"
|
||||
android:layout_marginTop="20dp"
|
||||
app:isAutoPlay="false"
|
||||
app:isClipChildrenMode="true"
|
||||
app:isClipChildrenModeLessThree="true"
|
||||
app:isHandLoop="true"
|
||||
app:clipChildrenLeftMargin="20dp"
|
||||
app:clipChildrenRightMargin="20dp"
|
||||
app:isShowIndicatorOnlyOne="true"
|
||||
app:isShowNumberIndicator="false"
|
||||
app:showIndicatorInCenter="false" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="21dp"
|
||||
android:text="@string/guardian_privilege"
|
||||
android:textColor="#FAE3B9"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/guard_rule"
|
||||
android:layout_width="19dp"
|
||||
android:layout_height="19dp"
|
||||
android:layout_gravity="center_vertical|end"
|
||||
android:layout_marginEnd="18dp"
|
||||
android:src="@mipmap/icon_guard_rule" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/guard_privilege"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="9dp"
|
||||
android:layout_marginBottom="73dp"
|
||||
android:overScrollMode="never"
|
||||
android:paddingEnd="9dp"
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||
app:spanCount="4"
|
||||
tools:itemCount="10"
|
||||
tools:listitem="@layout/view_live_buy_guard_privilege_item" />
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/bottom_panel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="73dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@drawable/bg_star_guard_bottom_panel"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="21dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/discount_price"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="520000"
|
||||
android:textColor="#FDECCB"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:src="@mipmap/icon_diamond2" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/original_price"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="564000"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/discount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:text="7.1折"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="195dp"
|
||||
android:layout_height="44dp"
|
||||
android:layout_gravity="center_vertical|end"
|
||||
android:layout_marginEnd="6dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_guard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@mipmap/btn_star_guard" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/guard_month_linear"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.9"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/guard_month"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/one_month"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/guard_arrow"
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginTop="1dp"
|
||||
android:src="@mipmap/icon_right" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/open_the_guard"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@string/open_the_start_guard"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
</FrameLayout>
|
||||
|
||||
</FrameLayout>
|
||||
249
live/src/main/res/layout/dialog_live_guard.xml
Normal file
@@ -0,0 +1,249 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="508dp">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="59dp"
|
||||
android:layout_marginBottom="71dp"
|
||||
android:background="@drawable/background_live_guard">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="50dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/dsadada"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_nickname"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="用戶昵稱"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/sex"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:src="@mipmap/icon_sex_male_1" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginStart="5dp">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tag_king"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/icon_tag_king" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/guard_level"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:gravity="center"
|
||||
android:text="100"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="10sp" />
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/week_contribution"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/dsadada"
|
||||
android:text="本周貢獻值"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/guardian_task"
|
||||
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="21dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/guardian_task"
|
||||
android:textColor="#E8C7F9"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<View
|
||||
android:id="@+id/guardian_task_view"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_gravity="bottom|center_horizontal"
|
||||
android:background="#E8C7F9" />
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/my_graud_grade"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="21dp"
|
||||
|
||||
android:layout_marginEnd="15dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/my_graud_grade"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@color/white" />
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="7dp"
|
||||
android:layout_marginTop="96dp"
|
||||
android:layout_marginEnd="7dp"
|
||||
android:background="@drawable/background_live_guard2">
|
||||
|
||||
|
||||
<com.yunbao.common.custom.CommonRefreshView
|
||||
android:id="@+id/refreshView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/guarding_the_anchor"
|
||||
android:layout_width="240dp"
|
||||
android:layout_height="141dp"
|
||||
android:layout_gravity="center_horizontal|center_vertical"
|
||||
android:background="@mipmap/background_guarding_the_anchor">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|center_horizontal"
|
||||
android:layout_marginBottom="7dp"
|
||||
android:text="@string/no_one_guarding_the_anchor_yet"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
</FrameLayout>
|
||||
</FrameLayout>
|
||||
</FrameLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="236dp"
|
||||
android:layout_height="110dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="-102dp"
|
||||
android:scaleType="centerCrop">
|
||||
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/guard_imageView"
|
||||
android:layout_width="58dp"
|
||||
android:layout_height="58dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/guardian_img_wings"
|
||||
android:visibility="visible"
|
||||
app:riv_oval="true" />
|
||||
|
||||
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/gift_svga"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@mipmap/guardian_img_wings"
|
||||
android:visibility="visible"
|
||||
app:autoPlay="true" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="71dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@drawable/background_live_guard3">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/guard_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:gravity="start"
|
||||
android:text="@string/guardian_for_your_favorite_anchor"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/guard_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:gravity="start"
|
||||
android:text="@string/guardian_for_your_favorite_anchor"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="11sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_guard_open"
|
||||
android:layout_width="124dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_gravity="center_vertical|end"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="@mipmap/btn_guard_open"
|
||||
android:gravity="center"
|
||||
android:text="續費守護"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
213
live/src/main/res/layout/dialog_new_guard.xml
Normal file
@@ -0,0 +1,213 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/transparent"
|
||||
android:clipChildren="false">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/guard_rootView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="52dp"
|
||||
android:background="@drawable/guard_buy_top_bg"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/guard_linearLayout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_marginTop="52dp"
|
||||
android:layout_marginBottom="21dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toTopOf="@+id/guard_constraintLayout"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/list_guard_list_user_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text=""
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/list_guard_list_user_sex"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginStart="3dp"
|
||||
android:layout_marginEnd="3dp"
|
||||
tools:srcCompat="@tools:sample/avatars" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/list_guard_list_user_level"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="15dp"
|
||||
tools:srcCompat="@tools:sample/avatars" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/list_guard_list_user_guard"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text=""
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/guard_constraintLayout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="365dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginTop="11dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:background="@drawable/guard_buy_center_bg"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/guard_linearLayout">
|
||||
|
||||
<com.yunbao.common.custom.CommonRefreshView
|
||||
android:id="@+id/refreshView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
app:crv_loadMoreEnable="false"
|
||||
app:crv_refreshEnable="false"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/guard_relativeLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="77dp"
|
||||
android:layout_marginTop="-20dp"
|
||||
android:background="@drawable/guard_buy_bottom_bg"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/guard_constraintLayout">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/guard_tip_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="25dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="280dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.yunbao.common.views.weight.MarqueeTextView
|
||||
android:id="@+id/guard_tip1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:text=""
|
||||
android:ellipsize="marquee"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:scrollHorizontally="true"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="11sp" />
|
||||
|
||||
<com.yunbao.common.views.weight.MarqueeTextView
|
||||
android:id="@+id/guard_tip2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/guard_coin_name"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:drawablePadding="4dp"
|
||||
android:text="456"
|
||||
android:ellipsize="marquee"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:scrollHorizontally="true"
|
||||
android:singleLine="true"
|
||||
android:textColor="#A281FD"
|
||||
android:textSize="11sp"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/guard_btn_buy"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="30dp"
|
||||
android:singleLine="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:background="@drawable/bg_guard_btn_buy"
|
||||
android:enabled="false"
|
||||
android:gravity="center"
|
||||
android:text="@string/guard_buy_2"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="243dp"
|
||||
android:layout_height="117dp"
|
||||
android:layout_above="@id/guard_rootView"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginBottom="-102dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/guard_imageView"
|
||||
android:layout_width="58dp"
|
||||
android:layout_height="58dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/guardian_img_wings"
|
||||
android:visibility="visible"
|
||||
app:riv_oval="true" />
|
||||
|
||||
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/gift_svga"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@mipmap/guardian_img_wings"
|
||||
android:visibility="visible"
|
||||
app:autoPlay="true" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
144
live/src/main/res/layout/dragon_expire_popup.xml
Normal file
@@ -0,0 +1,144 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/guard_title_top"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="您的神之守護"
|
||||
android:textColor="#FEECDC"
|
||||
android:textSize="25sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/due_in"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/due_in"
|
||||
android:textColor="#FEECDC"
|
||||
android:textSize="25sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/due_in_guard"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:text="2"
|
||||
android:textColor="#F9AB71"
|
||||
android:textSize="35sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/due_in_guard2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/due_in_guard"
|
||||
android:textColor="#FEECDC"
|
||||
android:textSize="25sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="9dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="262dp"
|
||||
android:layout_height="202dp"
|
||||
android:src="@mipmap/bg_dragon_expire" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="23dp">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/user_avatar"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="25dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/icon_male_default"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/live_avatar"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/icon_male_default"
|
||||
app:riv_oval="true" />
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="9dp"
|
||||
android:text="主播昵稱&用戶昵稱"
|
||||
android:textColor="#FFE0BF"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/guardian_privilege"
|
||||
android:layout_width="220dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:gravity="center"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="15dp"
|
||||
android:text="@string/continuative_guardian_privilege"
|
||||
android:textColor="#FFE0BF"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/travel_renewal"
|
||||
android:layout_width="203dp"
|
||||
android:layout_height="37dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/button_dragon_expire"
|
||||
android:gravity="center"
|
||||
android:text="@string/travel_renewal"
|
||||
android:textColor="#F3D0B7"
|
||||
android:textSize="15sp" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dragon_close"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
android:layout_marginTop="30dp"
|
||||
android:src="@mipmap/icon_dragon_close" />
|
||||
</LinearLayout>
|
||||
120
live/src/main/res/layout/dragon_sends_money_popup.xml
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="258dp"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="258dp"
|
||||
android:layout_height="265dp"
|
||||
android:layout_marginTop="35dp"
|
||||
android:src="@mipmap/background_dragon_sends_money" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dragon_close"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
android:src="@mipmap/icon_dragon_close" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dragon_rule"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_gravity="end"
|
||||
android:src="@mipmap/icon_dragon_rule" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.flyjingfish.gradienttextviewlib.GradientTextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:letterSpacing="0.1"
|
||||
android:text="@string/dragon_sends_money"
|
||||
android:textSize="23sp"
|
||||
android:textStyle="bold"
|
||||
app:gradient_angle="45"
|
||||
app:gradient_endColor="#F9D78F"
|
||||
app:gradient_startColor="#E59F1F" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/dragon_money"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="100dp"
|
||||
android:background="@drawable/input_dragon_money"
|
||||
android:hint="@string/please_enter_the_number_of_gold_beans"
|
||||
android:inputType="number"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/white"
|
||||
android:textColorHint="#C9C7C7"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="35dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/guard_my"
|
||||
android:textColor="#000000"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:src="@mipmap/gold_coin" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="2dp"
|
||||
android:text=":"
|
||||
android:textColor="#000000"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/my_gold_coin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="2dp"
|
||||
android:text="123456789"
|
||||
android:textColor="#000000"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/please_enter_the_number_of_gold_beans_hint"
|
||||
android:textColor="#333333"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/open_an_activity"
|
||||
android:layout_width="134dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:background="@drawable/button_dragon_sure"
|
||||
android:gravity="center"
|
||||
android:text="@string/open_an_activity"
|
||||
android:textColor="#893D0D"
|
||||
android:textSize="15sp" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
@@ -465,13 +465,28 @@
|
||||
tools:visibility="visible" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<!--普通工具合集-->
|
||||
<ImageView
|
||||
android:id="@+id/total_image"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:src="@mipmap/icon_more_live_menu" />
|
||||
<RelativeLayout
|
||||
android:layout_width="38dp"
|
||||
android:layout_height="38dp">
|
||||
<!--普通工具合集-->
|
||||
<ImageView
|
||||
android:id="@+id/total_image"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:src="@mipmap/icon_more_live_menu" />
|
||||
|
||||
<View
|
||||
android:id="@+id/total_image_red_point"
|
||||
android:layout_width="6dp"
|
||||
android:layout_height="6dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:background="@drawable/bg_red_point"
|
||||
tools:visibility="visible" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -43,9 +43,9 @@
|
||||
android:id="@+id/level_anchor"
|
||||
android:layout_width="13dp"
|
||||
android:layout_height="13dp"
|
||||
android:visibility="gone"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true" />
|
||||
android:layout_alignParentBottom="true"
|
||||
android:visibility="gone" />
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -1154,6 +1154,129 @@
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/gif_gift_tip_group_buy_guard_new"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="51dp"
|
||||
android:translationX="500dp"
|
||||
android:visibility="invisible">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/guard_all_server_notify_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="51dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="9dp"
|
||||
android:layout_marginRight="9dp"
|
||||
android:background="@mipmap/background_all_server_notify_star_zh"
|
||||
android:gravity="center|left"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<com.yunbao.common.views.weight.MarqueeTextView
|
||||
android:id="@+id/gif_gift_tip_buy_guard_new"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:gravity="center"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:paddingStart="100dp"
|
||||
android:paddingEnd="6dp"
|
||||
android:scrollHorizontally="true"
|
||||
android:singleLine="true"
|
||||
android:textColor="#072A93"
|
||||
android:textSize="13sp" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/iv_look_buy_guard_new"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:background="@mipmap/btn_king_guard_onlookers"
|
||||
android:clickable="true"
|
||||
android:gravity="center"
|
||||
android:text="@string/onlookers"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/full_service_notice_new"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="51dp"
|
||||
android:translationX="500dp"
|
||||
android:visibility="invisible">
|
||||
<ImageView
|
||||
android:id="@+id/full_service_notice_new_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="13dp"
|
||||
android:layout_marginEnd="7dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/background_full_service_notice_new" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="9dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginRight="9dp"
|
||||
android:gravity="center|left"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<com.yunbao.common.views.weight.MarqueeTextView
|
||||
android:id="@+id/full_service_notice_new_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="67dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_weight="1"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:gravity="center"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:scrollHorizontally="true"
|
||||
android:singleLine="true"
|
||||
android:text="字文文字文字文字文字fdsfsdfdsfdsfsdfdsfsdf文字文字"
|
||||
android:textColor="#fff"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/iv_look_full_service_notice_new3"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginEnd="5dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_look_full_service_notice_new2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="fitXY" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/iv_look_full_service_notice_new"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clickable="true"
|
||||
android:gravity="center"
|
||||
android:textSize="12sp" />
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/gif_gift_tip_group_buy_zuoji"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -1353,7 +1476,8 @@
|
||||
layout="@layout/sim_live_room_vote"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true" />
|
||||
android:layout_alignParentEnd="true"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon_pk_top"
|
||||
@@ -2545,4 +2669,60 @@
|
||||
android:layout_marginEnd="125dp"
|
||||
android:src="@mipmap/background_quick_gift_reminder"
|
||||
android:visibility="gone" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/dragon_immediate_participation"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="180dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="39dp"
|
||||
android:src="@mipmap/icon_live_dragon_money" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="-5dp"
|
||||
android:background="@drawable/background_dragon_immediate_participation"
|
||||
android:padding="1dp"
|
||||
android:text="@string/dragon_immediate_participation"
|
||||
android:textColor="#F9BA03"
|
||||
android:textSize="10sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/dragon_immediate_participation_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="120dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="39dp"
|
||||
android:src="@mipmap/icon_live_dragon_money" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/participation_time"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="-5dp"
|
||||
android:background="@drawable/background_dragon_immediate_participation"
|
||||
android:gravity="center"
|
||||
android:padding="1dp"
|
||||
android:text="00:00"
|
||||
android:textColor="#F9BA03"
|
||||
android:textSize="10sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
125
live/src/main/res/layout/view_new_guard_item.xml
Normal file
@@ -0,0 +1,125 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="42dp"
|
||||
android:layout_marginTop="15dp">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/guard_number_img"
|
||||
android:layout_width="19dp"
|
||||
android:layout_height="19dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/icon_one_guard"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/guard_number_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="4"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
</FrameLayout>
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/icon_male_default"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="6dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_nicename"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="用戶昵稱"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginBottom="2dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/sex"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:src="@mipmap/icon_sex_male_1" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginStart="6dp">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tag_king"
|
||||
android:layout_width="match_parent"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@mipmap/icon_tag_king" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/guard_level"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:gravity="center"
|
||||
android:text="100"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="10sp" />
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/contribution"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/contribution"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="contribution"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
10
live/src/main/res/layout/view_no_data_admin_room2.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:textColor="@color/gray1"
|
||||
android:textSize="14sp"
|
||||
android:layout_centerInParent="true"
|
||||
/>
|
||||
@@ -1,28 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<LinearLayout
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="200dp"
|
||||
android:layout_below="@id/guard_num"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="88dp"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="200dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:src="@mipmap/icon_guard_top_0"
|
||||
android:src="@mipmap/icon_guard_top_11"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:gravity="center"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:text="@string/guard_no_data_2"
|
||||
android:textColor="@color/gray1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
@@ -1,28 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<LinearLayout
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="200dp"
|
||||
android:layout_below="@id/guard_num"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="88dp"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="200dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:src="@mipmap/icon_guard_top_0"
|
||||
android:src="@mipmap/icon_guard_top_11"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:gravity="center"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:text="@string/guard_no_data"
|
||||
android:textColor="@color/gray1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
15
live/src/main/res/layout/view_vp_live_buy_guard.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="330dp"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="160dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:src="@mipmap/bg_star_guard" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
BIN
live/src/main/res/mipmap-mdpi/icon_guard_top_11.png
Normal file
|
After Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 44 KiB |
BIN
live/src/main/res/mipmap-xhdpi/bg_god_guard.png
Normal file
|
After Width: | Height: | Size: 387 KiB |
BIN
live/src/main/res/mipmap-xhdpi/bg_god_guard_en.png
Normal file
|
After Width: | Height: | Size: 390 KiB |
BIN
live/src/main/res/mipmap-xhdpi/bg_king_guard.png
Normal file
|
After Width: | Height: | Size: 386 KiB |
BIN
live/src/main/res/mipmap-xhdpi/bg_king_guard_en.png
Normal file
|
After Width: | Height: | Size: 393 KiB |
BIN
live/src/main/res/mipmap-xhdpi/bg_star_guard.png
Normal file
|
After Width: | Height: | Size: 385 KiB |
BIN
live/src/main/res/mipmap-xhdpi/bg_star_guard_en.png
Normal file
|
After Width: | Height: | Size: 401 KiB |
BIN
live/src/main/res/mipmap-xhdpi/icon_god_guardian_medal.png
Normal file
|
After Width: | Height: | Size: 140 KiB |
BIN
live/src/main/res/mipmap-xhdpi/icon_god_guardian_medal_grey.png
Normal file
|
After Width: | Height: | Size: 79 KiB |
BIN
live/src/main/res/mipmap-xhdpi/icon_king_guardian_medal.png
Normal file
|
After Width: | Height: | Size: 168 KiB |
BIN
live/src/main/res/mipmap-xhdpi/icon_king_guardian_medal_grey.png
Normal file
|
After Width: | Height: | Size: 96 KiB |
BIN
live/src/main/res/mipmap-xhdpi/icon_star_guardian_medal.png
Normal file
|
After Width: | Height: | Size: 132 KiB |
BIN
live/src/main/res/mipmap-xhdpi/icon_star_guardian_medal_grey.png
Normal file
|
After Width: | Height: | Size: 76 KiB |
|
After Width: | Height: | Size: 144 KiB |
BIN
live/src/main/res/mipmap-xxxhdpi/bg_dragon_expire.png
Normal file
|
After Width: | Height: | Size: 269 KiB |
BIN
live/src/main/res/mipmap-xxxhdpi/btn_guard_open.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
live/src/main/res/mipmap-xxxhdpi/dialog_live_buy_guard_bg.png
Normal file
|
After Width: | Height: | Size: 107 KiB |
BIN
live/src/main/res/mipmap-xxxhdpi/icon_guard_me.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
live/src/main/res/mipmap-xxxhdpi/icon_live_dragon_money_back.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
live/src/main/res/mipmap-xxxhdpi/icon_one_guard.png
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
BIN
live/src/main/res/mipmap-xxxhdpi/icon_tag_king.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
live/src/main/res/mipmap-xxxhdpi/icon_three_guard.png
Normal file
|
After Width: | Height: | Size: 7.1 KiB |
BIN
live/src/main/res/mipmap-xxxhdpi/icon_two_guard.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 23 KiB |
BIN
live/src/main/res/mipmap-xxxhdpi/tag_god.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
live/src/main/res/mipmap-xxxhdpi/tag_god_hui.png
Normal file
|
After Width: | Height: | Size: 8.6 KiB |
BIN
live/src/main/res/mipmap-xxxhdpi/tag_king.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
live/src/main/res/mipmap-xxxhdpi/tag_king_hui.png
Normal file
|
After Width: | Height: | Size: 9.3 KiB |
BIN
live/src/main/res/mipmap-xxxhdpi/tag_start.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
live/src/main/res/mipmap-xxxhdpi/tag_start_hui.png
Normal file
|
After Width: | Height: | Size: 7.3 KiB |