Compare commits
153 Commits
语音房_6.6.4_
...
master_声网
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e723356463 | ||
|
|
d38bc35324 | ||
|
|
382c53ab1f | ||
|
|
1c22f5fd48 | ||
|
|
09bef7afa6 | ||
|
|
88b96267ef | ||
|
|
7c006e8e03 | ||
|
|
f35b547c0d | ||
|
|
490c558e03 | ||
|
|
bbf5d159b4 | ||
|
|
e982994ecd | ||
|
|
a0294a8405 | ||
|
|
756cbb1ce1 | ||
| 9e5427bd35 | |||
|
|
f626ab03d4 | ||
|
|
0d7bdce4f0 | ||
|
|
cd3feebb94 | ||
|
|
3cca1a9e54 | ||
|
|
0b7b959151 | ||
| 1f1ac71bb0 | |||
|
|
ce7b6decc1 | ||
|
|
4a4a52aa61 | ||
|
|
123b9dd74a | ||
|
|
28dba93f17 | ||
|
|
285515345b | ||
|
|
f24744afe8 | ||
|
|
1e466ac13d | ||
|
|
d37b490088 | ||
|
|
a61bc8fbb8 | ||
| 9db23a32d1 | |||
|
|
5f1eadc47b | ||
|
|
de11b5123d | ||
|
|
5b0f5f03ab | ||
|
|
6095d2d04a | ||
|
|
3953e146a5 | ||
|
|
f04a2865af | ||
|
|
f94b3f27e3 | ||
|
|
61a966ea41 | ||
|
|
d0f2ac2c60 | ||
|
|
5dff64ec99 | ||
|
|
cad8236e5c | ||
|
|
faa401245f | ||
|
|
4fc021e866 | ||
|
|
f9a21d0357 | ||
|
|
d72a9a39c6 | ||
|
|
0317b339f8 | ||
|
|
4fabf3aba3 | ||
|
|
4693954a72 | ||
|
|
859810f1f6 | ||
|
|
53f389ddc8 | ||
|
|
ddc9bc344e | ||
|
|
cf34e73d32 | ||
|
|
1981fb553a | ||
|
|
3b6d586b58 | ||
|
|
50b6deaf01 | ||
|
|
bc8d916445 | ||
|
|
6870037683 | ||
|
|
8af7f907eb | ||
| 4d96bcc667 | |||
| f7845dde6f | |||
| ae9ef1f8a1 | |||
|
|
1023c0ab4d | ||
|
|
8184cf6c7f | ||
| df735af252 | |||
|
|
6f71a825b5 | ||
|
|
08e009e5f9 | ||
|
|
1a4a0632ee | ||
|
|
b3a02f8c2c | ||
| aa9bc7326c | |||
| 22769b981d | |||
|
|
85b4facfe8 | ||
| aef0435b93 | |||
| 9cc30186cd | |||
| f99641ed35 | |||
|
|
0552f56eb4 | ||
|
|
7ab4081f0b | ||
|
|
e7ef492015 | ||
| 1aa6cb8f55 | |||
| dc87fc7048 | |||
|
|
04b70d910a | ||
| a4ce44d9ba | |||
| 469e3e30ad | |||
|
|
7e7616ef29 | ||
|
|
dd64568fdf | ||
| 50fb801cf7 | |||
| e0200a9c7f | |||
| 5a32047c6d | |||
|
|
45fd56ba66 | ||
|
|
30b2884c46 | ||
| 0c07e8c2be | |||
|
|
508e9f1931 | ||
| 78d870ed89 | |||
|
|
c00afb1db0 | ||
|
|
dfca615735 | ||
|
|
a920b61bc4 | ||
|
|
3effb630c5 | ||
| 0e596e9be9 | |||
|
|
0a70cc027f | ||
| 47077a465a | |||
|
|
aa62dda844 | ||
|
|
004a5b2a53 | ||
|
|
64f9cee3af | ||
| 1eb43fb8cf | |||
|
|
f770370be0 | ||
| e185eb8612 | |||
| 299add0575 | |||
| feb08e1759 | |||
| 16755a9c8c | |||
|
|
d6e6164549 | ||
| 52c561fa08 | |||
| c2979b4cf7 | |||
|
|
0f70f10aed | ||
| 45f471055e | |||
|
|
c49c9c2f81 | ||
|
|
74b19de11c | ||
|
|
00b89aab69 | ||
|
|
6ff6cbbe6b | ||
|
|
65d38de73c | ||
|
|
ae6fdab7e8 | ||
|
|
3d1c4466e0 | ||
|
|
9963b37b6f | ||
| a8a1aa2e71 | |||
| 2857127285 | |||
|
|
3a1268aac7 | ||
|
|
5b813aff88 | ||
|
|
d9951b5a35 | ||
|
|
f928fce069 | ||
|
|
d365389ff8 | ||
| a4e98f3703 | |||
|
|
a307e6f864 | ||
|
|
b5c8f14994 | ||
|
|
34323fd983 | ||
|
|
1f7c6c8adc | ||
|
|
29c2334ee0 | ||
|
|
2aa50ecfc7 | ||
|
|
58b2d69601 | ||
|
|
e061e61088 | ||
|
|
24788d7e21 | ||
| 54693c0d37 | |||
|
|
27f136d6ca | ||
|
|
92d271ff93 | ||
|
|
0b15df41b8 | ||
|
|
7627219e77 | ||
|
|
ac6eb21e06 | ||
| 7795317c14 | |||
| c6fb323c68 | |||
| d629ee3f9f | |||
| df0d9795ed | |||
| 1759757176 | |||
|
|
661c2fd334 | ||
| b175e42ee1 | |||
| 6cdc648ea9 | |||
|
|
dcf3f5c308 |
@@ -83,6 +83,7 @@
|
||||
tools:ignore="ProtectedPermissions" />
|
||||
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
|
||||
<uses-permission android:name="com.android.vending.BILLING" />
|
||||
<uses-permission android:name="com.samsung.android.iap.permission.BILLING"/>
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||
<!-- Android11新增 -->
|
||||
<!-- <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />-->
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.app.Activity;
|
||||
import android.app.ActivityManager;
|
||||
import android.content.Context;
|
||||
import android.net.http.HttpResponseCache;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
@@ -61,6 +62,7 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import io.rong.imkit.config.RongConfigCenter;
|
||||
@@ -274,7 +276,6 @@ public class AppContext extends CommonAppContext {
|
||||
configSPApp();
|
||||
//初始化美颜SDK
|
||||
// FaceManager.initFaceUnity(this);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -339,7 +340,7 @@ public class AppContext extends CommonAppContext {
|
||||
if (!CommonAppConfig.IS_UPLOAD_ERROR_LOG) {
|
||||
return;
|
||||
}
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == 1) {
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY != 2) {
|
||||
GoogleUtils.newInstance(this).initializeApp(this);
|
||||
}
|
||||
}
|
||||
@@ -350,5 +351,17 @@ public class AppContext extends CommonAppContext {
|
||||
return;
|
||||
}
|
||||
String uid = CommonAppConfig.getInstance().getUid();
|
||||
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY != 2) {
|
||||
GoogleUtils.newInstance(sInstance).setFirebaseCrashData(
|
||||
uid,
|
||||
SpUtil.getInstance().getStringValue(SpUtil.USER_INFO),
|
||||
String.valueOf(CommonAppConfig.IS_GOOGLE_PLAY),
|
||||
Arrays.toString(Build.SUPPORTED_ABIS),
|
||||
String.valueOf(CrashSaveBean.getInstance().getStartTime()),
|
||||
String.valueOf(CrashSaveBean.getInstance().getEnterRoom()),
|
||||
String.valueOf(CrashSaveBean.getInstance().getSlidingRoom()),
|
||||
String.valueOf(CrashSaveBean.getInstance().getPlaySvga()), CrashSaveBean.getInstance().getActivitySize());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ dependencies {
|
||||
//腾讯im
|
||||
api 'com.tencent.imsdk:imsdk-plus:5.4.666'
|
||||
api 'com.google.code.gson:gson:2.8.8'
|
||||
api 'cn.rongcloud.sdk:rtc_lib:5.2.0' // 音视频通话基础能力库
|
||||
// api 'cn.rongcloud.sdk:rtc_lib:5.2.0' // 音视频通话基础能力库
|
||||
//此处以集成 5.1.2 版本为例
|
||||
api 'cn.rongcloud.sdk:im_lib:5.2.0.2'
|
||||
|
||||
@@ -209,15 +209,22 @@ dependencies {
|
||||
|
||||
// 多语言语音识别扩展库(可选)
|
||||
api 'tech.sud.mgp:SudASR:1.3.3.1158'
|
||||
//侧滑删除
|
||||
api 'com.yanzhenjie.recyclerview:x:1.3.2'
|
||||
|
||||
//华为支付插件包
|
||||
//api project(':lib_huawei')
|
||||
|
||||
//google插件包
|
||||
//api project(':lib_google')
|
||||
api project(':lib_google')
|
||||
|
||||
//samsung插件包
|
||||
api project(':IAP6Helper')
|
||||
|
||||
//文字渐变色
|
||||
api 'com.github.FlyJingFish:GradientTextView:1.2.4'
|
||||
//轮播 一屏显示多个
|
||||
api 'com.github.xiaohaibin:XBanner:androidx_v1.2.6'
|
||||
|
||||
implementation 'io.agora.rtc:full-sdk:4.3.0'
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ public class CommonAppContext extends MultiDexApplication {
|
||||
// RongPushClient.setPushConfig(config); //将推送相关配置设置到 SDK
|
||||
//设置新加坡融云服务器 有时候国内收不到推送是因为这个
|
||||
RongIMClient.setServerInfo("navsg01.cn.ronghub.com", null);
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == 1) {
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY != 2) {
|
||||
//谷歌推送
|
||||
PushConfig gconfig = new PushConfig.Builder().enableFCM(true).build();
|
||||
RongPushClient.setPushConfig(gconfig);
|
||||
|
||||
@@ -30,6 +30,7 @@ import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.interfaces.LifeCycleListener;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.ClickUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -381,5 +382,13 @@ public abstract class AbsActivity extends AppCompatActivity {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isKefu(String url){
|
||||
if(url.contains("kefu")){
|
||||
return true;
|
||||
}
|
||||
if(url.contains("https://newkf.yaoulive.com/")){
|
||||
return true;
|
||||
}
|
||||
return url.startsWith("https://kefu.yaoulive.com");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.LiveRoomCheckLivePresenter;
|
||||
import com.yunbao.common.utils.MicStatusManager;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.HintCustomPopup;
|
||||
@@ -83,7 +84,15 @@ public class WebViewActivity extends AbsActivity {
|
||||
@Override
|
||||
protected void main() {
|
||||
String url = getIntent().getStringExtra(Constants.URL);
|
||||
if(StringUtil.isEmpty(url)){
|
||||
url="";
|
||||
}
|
||||
L.e("H5--->" + url);
|
||||
if(isKefu(url)){
|
||||
RouteUtil.forwardCustomerService(url);
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
Bus.getOn(this);
|
||||
LinearLayout rootView = (LinearLayout) findViewById(R.id.rootView);
|
||||
mProgressBar = (ProgressBar) findViewById(R.id.progressbar);
|
||||
@@ -100,6 +109,10 @@ public class WebViewActivity extends AbsActivity {
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
L.e("H5-------->" + url);
|
||||
if(isKefu(url)){
|
||||
RouteUtil.forwardCustomerService(url);
|
||||
return true;
|
||||
}
|
||||
if (url.startsWith(Constants.COPY_PREFIX)) {
|
||||
String content = url.substring(Constants.COPY_PREFIX.length());
|
||||
if (!TextUtils.isEmpty(content)) {
|
||||
@@ -186,7 +199,7 @@ public class WebViewActivity extends AbsActivity {
|
||||
mWebView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||
}
|
||||
mWebView.loadUrl(url);
|
||||
AndroidBug5497Workaround.assistActivity(this);
|
||||
AndroidBug5497Workaround.assistActivity(mWebView);
|
||||
|
||||
if (Constants.myIntoIndex == 2) {
|
||||
ft_title.setVisibility(View.GONE);
|
||||
@@ -397,6 +410,8 @@ public class WebViewActivity extends AbsActivity {
|
||||
} else if (TextUtils.equals(event.getMethod(), "androidMethodLookToLive")) {
|
||||
//看直播
|
||||
gotoLive(event.getLiveId());
|
||||
}else if (TextUtils.equals(event.getMethod(), "androidtoCommunityVideo")) {
|
||||
RouteUtil.forwardCommunityActivity();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.yunbao.common.adapter;
|
||||
|
||||
import android.os.CountDownTimer;
|
||||
import android.util.SparseArray;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.sendMoneyLongListModel;
|
||||
import com.yunbao.common.views.DragonSendMoneyListViewHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class DragonSendMoneyListAdapter extends RecyclerView.Adapter {
|
||||
RecyclerView send_money_list;
|
||||
boolean isAnchor;
|
||||
SparseArray<CountDownTimer> countDownMap;
|
||||
boolean isAttention;
|
||||
|
||||
public DragonSendMoneyListAdapter setAnchor(boolean anchor) {
|
||||
isAnchor = anchor;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DragonSendMoneyListAdapter setAttention(boolean attention) {
|
||||
isAttention = attention;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<sendMoneyLongListModel> getMoneyLongListModels() {
|
||||
return moneyLongListModels;
|
||||
}
|
||||
|
||||
public DragonSendMoneyListAdapter(RecyclerView send_money_list) {
|
||||
this.send_money_list = send_money_list;
|
||||
countDownMap = new SparseArray<>();
|
||||
}
|
||||
|
||||
List<sendMoneyLongListModel> moneyLongListModels = new ArrayList<>();
|
||||
DragonSendMoneyListViewHolder.DragonSendMoneyListClicksCallBack callBack;
|
||||
|
||||
public void setCallBack(DragonSendMoneyListViewHolder.DragonSendMoneyListClicksCallBack callBack) {
|
||||
this.callBack = callBack;
|
||||
}
|
||||
|
||||
public void setMoneyLongListModels(List<sendMoneyLongListModel> models) {
|
||||
|
||||
moneyLongListModels.clear();
|
||||
moneyLongListModels.addAll(models);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
|
||||
View goodGiftsView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_dragon_send_money_list, parent, false);
|
||||
|
||||
return new DragonSendMoneyListViewHolder(goodGiftsView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
DragonSendMoneyListViewHolder sendMoneyListViewHolder = (DragonSendMoneyListViewHolder) holder;
|
||||
// sendMoneyLongListModel model = moneyLongListModels.get(position);
|
||||
// long mPkTimeCount2 = Long.parseLong(model.getCountdown());
|
||||
// long time = mPkTimeCount2 * 1000;
|
||||
// if (sendMoneyListViewHolder.countDownTimer != null) {
|
||||
// sendMoneyListViewHolder.countDownTimer.cancel();
|
||||
// }
|
||||
// if (time > 0) {
|
||||
//
|
||||
// }
|
||||
sendMoneyListViewHolder.setData(moneyLongListModels.get(position), callBack, isAnchor,isAttention);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return moneyLongListModels.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemViewType(int position) {
|
||||
return super.getItemViewType(position);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.yunbao.common.adapter;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.views.LiveBuyGuardPrivilegeViewHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class LiveBuyGuardPrivilegeAdapter extends RecyclerView.Adapter {
|
||||
List<String> guardPrivilege = new ArrayList<>();
|
||||
|
||||
public void setGuardPrivilege(List<String> privilege) {
|
||||
guardPrivilege.clear();
|
||||
guardPrivilege.addAll(privilege);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public LiveBuyGuardPrivilegeAdapter(List<String> guardPrivilege) {
|
||||
this.guardPrivilege = guardPrivilege;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_live_buy_guard_privilege_item, parent, false);
|
||||
return new LiveBuyGuardPrivilegeViewHolder(herdView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
LiveBuyGuardPrivilegeViewHolder buyGuardSelectViewHolder = (LiveBuyGuardPrivilegeViewHolder) holder;
|
||||
buyGuardSelectViewHolder.setData(guardPrivilege.get(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return guardPrivilege.size();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.yunbao.common.adapter;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.GuardPriceModel;
|
||||
import com.yunbao.common.views.LiveBuyGuardSelectViewHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class LiveBuyGuardSelectAdapter extends RecyclerView.Adapter {
|
||||
List<GuardPriceModel> price = new ArrayList<>();
|
||||
GuardPriceModel model;
|
||||
|
||||
public LiveBuyGuardSelectAdapter(List<GuardPriceModel> price, GuardPriceModel mModel) {
|
||||
this.price = price;
|
||||
model = mModel;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_live_buy_guard_slelect_item, parent, false);
|
||||
return new LiveBuyGuardSelectViewHolder(herdView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
LiveBuyGuardSelectViewHolder buyGuardSelectViewHolder = (LiveBuyGuardSelectViewHolder) holder;
|
||||
buyGuardSelectViewHolder.setData(price.get(position), liveBuyGuardSelectClickListener,model);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return price.size();
|
||||
}
|
||||
|
||||
private LiveBuyGuardSelectViewHolder.LiveBuyGuardSelectClickListener liveBuyGuardSelectClickListener;
|
||||
|
||||
public LiveBuyGuardSelectAdapter setLiveBuyGuardSelectClickListener(LiveBuyGuardSelectViewHolder.LiveBuyGuardSelectClickListener liveBuyGuardSelectClickListener) {
|
||||
this.liveBuyGuardSelectClickListener = liveBuyGuardSelectClickListener;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -67,6 +67,13 @@ public abstract class RefreshAdapter<T> extends RecyclerView.Adapter {
|
||||
}
|
||||
}
|
||||
|
||||
public void refreshDel(){
|
||||
if (mRecyclerView != null) {
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void refreshData(List<T> list) {
|
||||
if (mRecyclerView != null && list != null) {
|
||||
mList.clear();
|
||||
|
||||
@@ -45,7 +45,6 @@ public class SudTitleSelectAdapter extends RecyclerView.Adapter {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -20,6 +20,12 @@ public class AnchorRecommendModel extends BaseModel {
|
||||
@SerializedName("red_packet_show")
|
||||
private int showRedPacket = 0;//是否显示首页红包浮窗
|
||||
//是否支持换一批0=不支持 1=支持
|
||||
|
||||
|
||||
@SerializedName("live_battle_pass_show_status")
|
||||
private int showWarOrder = 0;//是否显示首页戰令
|
||||
//是否支持换一批0=不支持 1=支持
|
||||
|
||||
@SerializedName("up_show")
|
||||
private int upShow = 0;
|
||||
@SerializedName("list")
|
||||
@@ -40,6 +46,14 @@ public class AnchorRecommendModel extends BaseModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getShowWarOrder() {
|
||||
return showWarOrder;
|
||||
}
|
||||
|
||||
public void setShowWarOrder(int showWarOrder) {
|
||||
this.showWarOrder = showWarOrder;
|
||||
}
|
||||
|
||||
public int getListShow() {
|
||||
return listShow;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,13 @@ public class BattlePassPoints extends BaseModel{
|
||||
@SerializedName("exchange_status_remark")
|
||||
private String exchangeMark;
|
||||
|
||||
@SerializedName("send_reward_type")
|
||||
private int sendRewardType;
|
||||
@SerializedName("send_gift_type")
|
||||
private int sendGiftType;
|
||||
@SerializedName("send_gift_needcoin")
|
||||
private String sendGiftNeedcoin;
|
||||
|
||||
public BattlePassPoints() {
|
||||
}
|
||||
|
||||
@@ -172,4 +179,54 @@ public class BattlePassPoints extends BaseModel{
|
||||
public void setPointsThresholdText(String pointsThresholdText) {
|
||||
this.pointsThresholdText = pointsThresholdText;
|
||||
}
|
||||
|
||||
public int getSendRewardType() {
|
||||
return sendRewardType;
|
||||
}
|
||||
|
||||
public void setSendRewardType(int sendRewardType) {
|
||||
this.sendRewardType = sendRewardType;
|
||||
}
|
||||
|
||||
public int getSendGiftType() {
|
||||
return sendGiftType;
|
||||
}
|
||||
|
||||
public void setSendGiftType(int sendGiftType) {
|
||||
this.sendGiftType = sendGiftType;
|
||||
}
|
||||
|
||||
public String getSendGiftNeedcoin() {
|
||||
return sendGiftNeedcoin;
|
||||
}
|
||||
|
||||
public void setSendGiftNeedcoin(String sendGiftNeedcoin) {
|
||||
this.sendGiftNeedcoin = sendGiftNeedcoin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BattlePassPoints{" +
|
||||
"id=" + id +
|
||||
", type=" + type +
|
||||
", rewardsName='" + rewardsName + '\'' +
|
||||
", rewardsId=" + rewardsId +
|
||||
", imageUrl='" + imageUrl + '\'' +
|
||||
", pointsThreshold='" + pointsThreshold + '\'' +
|
||||
", pointsThresholdText='" + pointsThresholdText + '\'' +
|
||||
", rewardsValue='" + rewardsValue + '\'' +
|
||||
", battlePassLevel=" + battlePassLevel +
|
||||
", exchangeQuantity=" + exchangeQuantity +
|
||||
", liveBattlePassTypeId=" + liveBattlePassTypeId +
|
||||
", description='" + description + '\'' +
|
||||
", restrictTime=" + restrictTime +
|
||||
", sort=" + sort +
|
||||
", exchangeStatus=" + exchangeStatus +
|
||||
", userQuintyCount=" + userQuintyCount +
|
||||
", exchangeMark='" + exchangeMark + '\'' +
|
||||
", sendRewardType=" + sendRewardType +
|
||||
", sendGiftType=" + sendGiftType +
|
||||
", sendRewardNeedcoin='" + sendGiftNeedcoin + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,4 +173,27 @@ public class BattlePassUserInfoBean extends BaseModel{
|
||||
public void setMaxLevel(int maxLevel) {
|
||||
this.maxLevel = maxLevel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BattlePassUserInfoBean{" +
|
||||
"uid='" + uid + '\'' +
|
||||
", points=" + points +
|
||||
", battlePassExp=" + battlePassExp +
|
||||
", battlePassUserRecords1=" + battlePassUserRecords1 +
|
||||
", battlePassUserRecords2=" + battlePassUserRecords2 +
|
||||
", battlePassUserRecords3=" + battlePassUserRecords3 +
|
||||
", level=" + level +
|
||||
", lastLevelExp=" + lastLevelExp +
|
||||
", nextLevelExp=" + nextLevelExp +
|
||||
", id='" + id + '\'' +
|
||||
", battlePassName='" + battlePassName + '\'' +
|
||||
", startTime='" + startTime + '\'' +
|
||||
", endTime='" + endTime + '\'' +
|
||||
", battlePassStatus=" + battlePassStatus +
|
||||
", maxLevelExp=" + maxLevelExp +
|
||||
", maxLevel=" + maxLevel +
|
||||
", live_battle_pass_type=" + live_battle_pass_type +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class CheckUpgradesModel extends BaseModel {
|
||||
/**
|
||||
* {
|
||||
* "level": 33, // 等级
|
||||
* "rewards": [ // 奖励信息
|
||||
* {
|
||||
* "id": 1,
|
||||
* "reward_name": "星之守護等級牌", // 奖励名称
|
||||
* "image_path": "https://ceshi.yaoulive.com/data/upload/20240304/tequan_1.png" // 图片链接
|
||||
* },
|
||||
* {
|
||||
* "id": 2,
|
||||
* "reward_name": "人氣票",
|
||||
* "image_path": "https://ceshi.yaoulive.com/data/upload/20240304/tequan_1.png"
|
||||
* }
|
||||
* ]
|
||||
* }
|
||||
* }
|
||||
*/
|
||||
@SerializedName("level")
|
||||
private String level;
|
||||
@SerializedName("rewards")
|
||||
private List<RewardsModel> rewards;
|
||||
|
||||
public String getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public CheckUpgradesModel setLevel(String level) {
|
||||
this.level = level;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<RewardsModel> getRewards() {
|
||||
return rewards;
|
||||
}
|
||||
|
||||
public CheckUpgradesModel setRewards(List<RewardsModel> rewards) {
|
||||
this.rewards = rewards;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -43,6 +43,17 @@ public class EnterRoomNewModel extends BaseModel {
|
||||
private int quickGiftRemainingQuantity;//剩余的小PD礼物数量
|
||||
@SerializedName("if_viewing_duration_complete")
|
||||
private int ifViewingDurationComplete;//通过观看时间获取小PD礼物的次数
|
||||
@SerializedName("sendMoneyLongStatus")
|
||||
private SendMoneyLongStatusModel model;
|
||||
|
||||
public SendMoneyLongStatusModel getModel() {
|
||||
return model;
|
||||
}
|
||||
|
||||
public EnterRoomNewModel setModel(SendMoneyLongStatusModel model) {
|
||||
this.model = model;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getQuickGiftRemainingQuantity() {
|
||||
return quickGiftRemainingQuantity;
|
||||
|
||||
@@ -0,0 +1,142 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class GuardDataTipModel extends BaseModel {
|
||||
/**
|
||||
* {
|
||||
* "guard_name": "星之守護", // 守护名称
|
||||
* "guard_type": 1, // 守护类型
|
||||
* "close_img": "https://ceshi.yaoulive.com/data/upload/20240304/guard_xing_close.png", // 未开通图标
|
||||
* "open_img": "https://ceshi.yaoulive.com/data/upload/20240304/guard_xing_open.png", // 已开通图标
|
||||
* "is_open": true, // 是否开通 是.true 否.false
|
||||
* "price": { // 价格
|
||||
* {
|
||||
* "opening_time": "1個月", // 开通时长
|
||||
* "original_price": "188000", // 原价
|
||||
* "discount_price": "", // 折扣价
|
||||
* "discount": "", // 折扣
|
||||
* "price_key": 1
|
||||
* },
|
||||
* {
|
||||
* "opening_time": "3個月",
|
||||
* "original_price": "564000",
|
||||
* "discount_price": "398000",
|
||||
* "discount": "7.1折",
|
||||
* "price_key": 3
|
||||
* },
|
||||
* {
|
||||
* "opening_time": "6個月",
|
||||
* "original_price": "1128000",
|
||||
* "discount_price": "738000",
|
||||
* "discount": "6.5折",
|
||||
* "price_key": 6
|
||||
* },
|
||||
* {
|
||||
* "opening_time": "12個月",
|
||||
* "original_price": "2256000",
|
||||
* "discount_price": "1314000",
|
||||
* "discount": "5.8折",
|
||||
* "price_key": 12
|
||||
* }
|
||||
* ],
|
||||
* "guard_privilege": [
|
||||
* "https://ceshi.yaoulive.com/data/upload/20240304/tequan_1.png",
|
||||
* "https://ceshi.yaoulive.com/data/upload/20240304/tequan_2.png",
|
||||
* "https://ceshi.yaoulive.com/data/upload/20240304/tequan_3.png",
|
||||
* "https://ceshi.yaoulive.com/data/upload/20240304/tequan_1.png",
|
||||
* "https://ceshi.yaoulive.com/data/upload/20240304/tequan_2.png",
|
||||
* "https://ceshi.yaoulive.com/data/upload/20240304/tequan_3.png",
|
||||
* "https://ceshi.yaoulive.com/data/upload/20240304/tequan_1.png",
|
||||
* "https://ceshi.yaoulive.com/data/upload/20240304/tequan_1.png",
|
||||
* "https://ceshi.yaoulive.com/data/upload/20240304/tequan_2.png",
|
||||
* "https://ceshi.yaoulive.com/data/upload/20240304/tequan_3.png"
|
||||
* ]
|
||||
* }
|
||||
*/
|
||||
@SerializedName("guard_name")
|
||||
private String guardName;
|
||||
@SerializedName("guard_type")
|
||||
private int guardType;
|
||||
@SerializedName("close_img")
|
||||
private String closeImg;
|
||||
@SerializedName("open_img")
|
||||
private String openImg;
|
||||
@SerializedName("is_open")
|
||||
private String isOpen;
|
||||
@SerializedName("price")
|
||||
private List<GuardPriceModel> price;
|
||||
@SerializedName("guard_privilege")
|
||||
private List<String> guardPrivilege;
|
||||
|
||||
public String getGuardName() {
|
||||
return guardName;
|
||||
}
|
||||
|
||||
public GuardDataTipModel setGuardName(String guardName) {
|
||||
this.guardName = guardName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getGuardType() {
|
||||
return guardType;
|
||||
}
|
||||
|
||||
public GuardDataTipModel setGuardType(int guardType) {
|
||||
this.guardType = guardType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCloseImg() {
|
||||
return closeImg;
|
||||
}
|
||||
|
||||
public GuardDataTipModel setCloseImg(String closeImg) {
|
||||
this.closeImg = closeImg;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getOpenImg() {
|
||||
return openImg;
|
||||
}
|
||||
|
||||
public GuardDataTipModel setOpenImg(String openImg) {
|
||||
this.openImg = openImg;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isOpen() {
|
||||
return TextUtils.equals(isOpen, "1");
|
||||
}
|
||||
|
||||
public String getIsOpen() {
|
||||
return isOpen;
|
||||
}
|
||||
|
||||
public GuardDataTipModel setIsOpen(String isOpen) {
|
||||
this.isOpen = isOpen;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<GuardPriceModel> getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public GuardDataTipModel setPrice(List<GuardPriceModel> price) {
|
||||
this.price = price;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<String> getGuardPrivilege() {
|
||||
return guardPrivilege;
|
||||
}
|
||||
|
||||
public GuardDataTipModel setGuardPrivilege(List<String> guardPrivilege) {
|
||||
this.guardPrivilege = guardPrivilege;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class GuardGetGuardOpenInfoModel extends BaseModel {
|
||||
|
||||
@SerializedName("user_info")
|
||||
private GuardUserInfoModel userInfo;
|
||||
@SerializedName("guard_data")
|
||||
private List<GuardDataTipModel> guardData;
|
||||
|
||||
public GuardUserInfoModel getUserInfo() {
|
||||
return userInfo;
|
||||
}
|
||||
|
||||
public GuardGetGuardOpenInfoModel setUserInfo(GuardUserInfoModel userInfo) {
|
||||
this.userInfo = userInfo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<GuardDataTipModel> getGuardData() {
|
||||
return guardData;
|
||||
}
|
||||
|
||||
public GuardGetGuardOpenInfoModel setGuardData(List<GuardDataTipModel> guardData) {
|
||||
this.guardData = guardData;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class GuardGetGuardUserInfoModel extends BaseModel {
|
||||
/**
|
||||
* "info": {
|
||||
* "uid": "98923", // 用户ID
|
||||
* "user_avatar": "https://downs.yaoulive.com/20230706/0572c0f694601f4d2695cd210effbe93.jpeg?imageView2/2/w/600/h/600", // 用户头像链接
|
||||
* "liveuid": "98889", // 主播ID
|
||||
* "live_avatar": "https://ceshi.yaoulive.com/data/upload/20230522/20230526102906.png", // 主播头像链接
|
||||
* "guard_type": 0, // 守护类型 0.未开通 1.星之守护 2.王之守护 3.神之守护
|
||||
* "exp": 0, // 守护经验值
|
||||
* "level": 0, // 守护等级
|
||||
* "endtime": 0, // 到期时间
|
||||
* "user_language": "chinese",
|
||||
* "live_language": "chinese"
|
||||
* }
|
||||
* }
|
||||
*/
|
||||
@SerializedName("uid")
|
||||
private String uid;
|
||||
@SerializedName("user_avatar")
|
||||
private String userAvatar;
|
||||
@SerializedName("liveuid")
|
||||
private String liveuid;
|
||||
@SerializedName("live_avatar")
|
||||
private String liveAvatar;
|
||||
@SerializedName("guard_type")
|
||||
private int guardType;
|
||||
@SerializedName("exp")
|
||||
private String exp;
|
||||
@SerializedName("level")
|
||||
private int level;
|
||||
@SerializedName("endtime")
|
||||
private long endtime;
|
||||
@SerializedName("user_language")
|
||||
private String userLanguage;
|
||||
@SerializedName("live_language")
|
||||
private String liveLanguage;
|
||||
@SerializedName("is_open")
|
||||
private String isOpen;
|
||||
|
||||
public String getIsOpen() {
|
||||
return isOpen;
|
||||
}
|
||||
|
||||
public GuardGetGuardUserInfoModel setIsOpen(String isOpen) {
|
||||
this.isOpen = isOpen;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public GuardGetGuardUserInfoModel setUid(String uid) {
|
||||
this.uid = uid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserAvatar() {
|
||||
return userAvatar;
|
||||
}
|
||||
|
||||
public GuardGetGuardUserInfoModel setUserAvatar(String userAvatar) {
|
||||
this.userAvatar = userAvatar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLiveuid() {
|
||||
return liveuid;
|
||||
}
|
||||
|
||||
public GuardGetGuardUserInfoModel setLiveuid(String liveuid) {
|
||||
this.liveuid = liveuid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLiveAvatar() {
|
||||
return liveAvatar;
|
||||
}
|
||||
|
||||
public GuardGetGuardUserInfoModel setLiveAvatar(String liveAvatar) {
|
||||
this.liveAvatar = liveAvatar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getGuardType() {
|
||||
return guardType;
|
||||
}
|
||||
|
||||
public GuardGetGuardUserInfoModel setGuardType(int guardType) {
|
||||
this.guardType = guardType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getExp() {
|
||||
return exp;
|
||||
}
|
||||
|
||||
public GuardGetGuardUserInfoModel setExp(String exp) {
|
||||
this.exp = exp;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public GuardGetGuardUserInfoModel setLevel(int level) {
|
||||
this.level = level;
|
||||
return this;
|
||||
}
|
||||
|
||||
public long getEndtime() {
|
||||
return endtime;
|
||||
}
|
||||
|
||||
public GuardGetGuardUserInfoModel setEndtime(long endtime) {
|
||||
this.endtime = endtime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserLanguage() {
|
||||
return userLanguage;
|
||||
}
|
||||
|
||||
public GuardGetGuardUserInfoModel setUserLanguage(String userLanguage) {
|
||||
this.userLanguage = userLanguage;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLiveLanguage() {
|
||||
return liveLanguage;
|
||||
}
|
||||
|
||||
public GuardGetGuardUserInfoModel setLiveLanguage(String liveLanguage) {
|
||||
this.liveLanguage = liveLanguage;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,145 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class GuardMaturityDateRemindModel extends BaseModel{
|
||||
|
||||
@SerializedName("_method_")
|
||||
private String method;
|
||||
@SerializedName("action")
|
||||
private String action;
|
||||
@SerializedName("is_overdue")
|
||||
private int isOverdue;
|
||||
@SerializedName("days")
|
||||
private int days;
|
||||
@SerializedName("uid")
|
||||
private String uid;
|
||||
@SerializedName("liveuid")
|
||||
private String liveuid;
|
||||
@SerializedName("user_avatar")
|
||||
private String userAvatar;
|
||||
@SerializedName("user_nicename")
|
||||
private String userNicename;
|
||||
@SerializedName("live_avatar")
|
||||
private String liveAvatar;
|
||||
@SerializedName("live_nicename")
|
||||
private String liveNicename;
|
||||
@SerializedName("ct")
|
||||
private String ct;
|
||||
@SerializedName("guard_type")
|
||||
private String guardType;
|
||||
|
||||
public String getGuardType() {
|
||||
return guardType;
|
||||
}
|
||||
|
||||
public GuardMaturityDateRemindModel setGuardType(String guardType) {
|
||||
this.guardType = guardType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMethod() {
|
||||
return method;
|
||||
}
|
||||
|
||||
public void setMethod(String method) {
|
||||
this.method = method;
|
||||
}
|
||||
|
||||
public String getAction() {
|
||||
return action;
|
||||
}
|
||||
|
||||
public void setAction(String action) {
|
||||
this.action = action;
|
||||
}
|
||||
|
||||
public int getIsOverdue() {
|
||||
return isOverdue;
|
||||
}
|
||||
|
||||
public void setIsOverdue(int isOverdue) {
|
||||
this.isOverdue = isOverdue;
|
||||
}
|
||||
|
||||
public int getDays() {
|
||||
return days;
|
||||
}
|
||||
|
||||
public void setDays(int days) {
|
||||
this.days = days;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(String uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public String getLiveuid() {
|
||||
return liveuid;
|
||||
}
|
||||
|
||||
public void setLiveuid(String liveuid) {
|
||||
this.liveuid = liveuid;
|
||||
}
|
||||
|
||||
public String getUserAvatar() {
|
||||
return userAvatar;
|
||||
}
|
||||
|
||||
public void setUserAvatar(String userAvatar) {
|
||||
this.userAvatar = userAvatar;
|
||||
}
|
||||
|
||||
public String getUserNicename() {
|
||||
return userNicename;
|
||||
}
|
||||
|
||||
public void setUserNicename(String userNicename) {
|
||||
this.userNicename = userNicename;
|
||||
}
|
||||
|
||||
public String getLiveAvatar() {
|
||||
return liveAvatar;
|
||||
}
|
||||
|
||||
public void setLiveAvatar(String liveAvatar) {
|
||||
this.liveAvatar = liveAvatar;
|
||||
}
|
||||
|
||||
public String getLiveNicename() {
|
||||
return liveNicename;
|
||||
}
|
||||
|
||||
public void setLiveNicename(String liveNicename) {
|
||||
this.liveNicename = liveNicename;
|
||||
}
|
||||
|
||||
public String getCt() {
|
||||
return ct;
|
||||
}
|
||||
|
||||
public void setCt(String ct) {
|
||||
this.ct = ct;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "GuardMaturityDateRemindModel{" +
|
||||
"method='" + method + '\'' +
|
||||
", action='" + action + '\'' +
|
||||
", isOverdue=" + isOverdue +
|
||||
", days=" + days +
|
||||
", uid='" + uid + '\'' +
|
||||
", liveuid='" + liveuid + '\'' +
|
||||
", userAvatar='" + userAvatar + '\'' +
|
||||
", userNicename='" + userNicename + '\'' +
|
||||
", liveAvatar='" + liveAvatar + '\'' +
|
||||
", liveNicename='" + liveNicename + '\'' +
|
||||
", ct='" + ct + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,17 @@ public class GuardModel extends BaseModel {
|
||||
private String type;
|
||||
@SerializedName("endtime")
|
||||
private String endtime;
|
||||
@SerializedName("guard_type")
|
||||
private String guardType;
|
||||
|
||||
public String getGuardType() {
|
||||
return guardType;
|
||||
}
|
||||
|
||||
public GuardModel setGuardType(String guardType) {
|
||||
this.guardType = guardType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class GuardPriceModel extends BaseModel {
|
||||
/**
|
||||
* {
|
||||
* "opening_time": "1個月", // 开通时长
|
||||
* "original_price": "188000", // 原价
|
||||
* "discount_price": "", // 折扣价
|
||||
* "discount": "", // 折扣
|
||||
* "price_key": 1
|
||||
* }
|
||||
*/
|
||||
@SerializedName("opening_time")
|
||||
private String openingTime;
|
||||
@SerializedName("original_price")
|
||||
private String originalPrice;
|
||||
@SerializedName("discount_price")
|
||||
private String discountPrice;
|
||||
@SerializedName("discount")
|
||||
private String discount;
|
||||
@SerializedName("price_key")
|
||||
private int priceKey;
|
||||
|
||||
public String getOpeningTime() {
|
||||
return openingTime;
|
||||
}
|
||||
|
||||
public GuardPriceModel setOpeningTime(String openingTime) {
|
||||
this.openingTime = openingTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getOriginalPrice() {
|
||||
return originalPrice;
|
||||
}
|
||||
|
||||
public GuardPriceModel setOriginalPrice(String originalPrice) {
|
||||
this.originalPrice = originalPrice;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDiscountPrice() {
|
||||
return discountPrice;
|
||||
}
|
||||
|
||||
public GuardPriceModel setDiscountPrice(String discountPrice) {
|
||||
this.discountPrice = discountPrice;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDiscount() {
|
||||
return discount;
|
||||
}
|
||||
|
||||
public GuardPriceModel setDiscount(String discount) {
|
||||
this.discount = discount;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getPriceKey() {
|
||||
return priceKey;
|
||||
}
|
||||
|
||||
public GuardPriceModel setPriceKey(int priceKey) {
|
||||
this.priceKey = priceKey;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class GuardUserInfoModel extends BaseModel {
|
||||
/**
|
||||
* {
|
||||
* "user_info": { // 用户开通信息
|
||||
* "uid": "98888", // 用户ID
|
||||
* "user_avatar": "https://downs.yaoulive.com/mannine.png", // 用户头像链接
|
||||
* "liveuid": "98889", // 主播ID
|
||||
* "live_avatar": "https://ceshi.yaoulive.com/data/upload/20230522/20230526102906.png", // 主播头像链接
|
||||
* "guard_type": 1, // 守护类型
|
||||
* "exp": 0, // 经验值
|
||||
* "level": 1, // 等级
|
||||
* "endtime": 1710145929, // 到期时间
|
||||
* "user_language": "chinese", // 用户语言
|
||||
* "live_language": "chinese" // 主播语言
|
||||
* }
|
||||
*/
|
||||
@SerializedName("uid")
|
||||
private String uid;
|
||||
@SerializedName("user_avatar")
|
||||
private String userAvatar;
|
||||
@SerializedName("liveuid")
|
||||
private String liveuid;
|
||||
@SerializedName("live_avatar")
|
||||
private String liveAvatar;
|
||||
@SerializedName("guard_type")
|
||||
private int guardType;
|
||||
@SerializedName("exp")
|
||||
private String exp;
|
||||
@SerializedName("level")
|
||||
private String level;
|
||||
@SerializedName("endtime")
|
||||
private String endtime;
|
||||
@SerializedName("user_language")
|
||||
private String userLanguage;
|
||||
@SerializedName("live_language")
|
||||
private String liveLanguage;
|
||||
@SerializedName("is_open")
|
||||
private String isOpen;
|
||||
|
||||
public String getIsOpen() {
|
||||
return isOpen;
|
||||
}
|
||||
|
||||
public GuardUserInfoModel setIsOpen(String isOpen) {
|
||||
this.isOpen = isOpen;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public GuardUserInfoModel setUid(String uid) {
|
||||
this.uid = uid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserAvatar() {
|
||||
return userAvatar;
|
||||
}
|
||||
|
||||
public GuardUserInfoModel setUserAvatar(String userAvatar) {
|
||||
this.userAvatar = userAvatar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLiveuid() {
|
||||
return liveuid;
|
||||
}
|
||||
|
||||
public GuardUserInfoModel setLiveuid(String liveuid) {
|
||||
this.liveuid = liveuid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLiveAvatar() {
|
||||
return liveAvatar;
|
||||
}
|
||||
|
||||
public GuardUserInfoModel setLiveAvatar(String liveAvatar) {
|
||||
this.liveAvatar = liveAvatar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getGuardType() {
|
||||
return guardType;
|
||||
}
|
||||
|
||||
public GuardUserInfoModel setGuardType(int guardType) {
|
||||
this.guardType = guardType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getExp() {
|
||||
return exp;
|
||||
}
|
||||
|
||||
public GuardUserInfoModel setExp(String exp) {
|
||||
this.exp = exp;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public GuardUserInfoModel setLevel(String level) {
|
||||
this.level = level;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getEndtime() {
|
||||
return endtime;
|
||||
}
|
||||
|
||||
public GuardUserInfoModel setEndtime(String endtime) {
|
||||
this.endtime = endtime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserLanguage() {
|
||||
return userLanguage;
|
||||
}
|
||||
|
||||
public GuardUserInfoModel setUserLanguage(String userLanguage) {
|
||||
this.userLanguage = userLanguage;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLiveLanguage() {
|
||||
return liveLanguage;
|
||||
}
|
||||
|
||||
public GuardUserInfoModel setLiveLanguage(String liveLanguage) {
|
||||
this.liveLanguage = liveLanguage;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -97,6 +97,15 @@ public class LiveBattlePassRewardsBean extends BaseModel{
|
||||
private String rewardName;
|
||||
@SerializedName("image_url")
|
||||
private String imageUrl;
|
||||
@SerializedName("send_reward_type")
|
||||
private int sendRewardType;
|
||||
@SerializedName("send_gift_type")
|
||||
private int sendGiftType;
|
||||
@SerializedName("send_reward_needcoin")
|
||||
private String sendRewardNeedcoin;
|
||||
@SerializedName("send_reward_restrict_time")
|
||||
private String sendRewardRestrictTime;
|
||||
|
||||
private int lock;
|
||||
private int received;
|
||||
|
||||
@@ -158,5 +167,54 @@ public class LiveBattlePassRewardsBean extends BaseModel{
|
||||
public void setReceived(int received) {
|
||||
this.received = received;
|
||||
}
|
||||
|
||||
public int getSendRewardType() {
|
||||
return sendRewardType;
|
||||
}
|
||||
|
||||
public void setSendRewardType(int sendRewardType) {
|
||||
this.sendRewardType = sendRewardType;
|
||||
}
|
||||
|
||||
public int getSendGiftType() {
|
||||
return sendGiftType;
|
||||
}
|
||||
|
||||
public void setSendGiftType(int sendGiftType) {
|
||||
this.sendGiftType = sendGiftType;
|
||||
}
|
||||
|
||||
public String getSendRewardNeedcoin() {
|
||||
return sendRewardNeedcoin;
|
||||
}
|
||||
|
||||
public void setSendRewardNeedcoin(String sendRewardNeedcoin) {
|
||||
this.sendRewardNeedcoin = sendRewardNeedcoin;
|
||||
}
|
||||
|
||||
public String getSendRewardRestrictTime() {
|
||||
return sendRewardRestrictTime;
|
||||
}
|
||||
|
||||
public void setSendRewardRestrictTime(String sendRewardRestrictTime) {
|
||||
this.sendRewardRestrictTime = sendRewardRestrictTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "LiveBattlePassReward{" +
|
||||
"id=" + id +
|
||||
", liveBattlePassLevel=" + liveBattlePassLevel +
|
||||
", liveBattlePassTypeId=" + liveBattlePassTypeId +
|
||||
", rewardName='" + rewardName + '\'' +
|
||||
", imageUrl='" + imageUrl + '\'' +
|
||||
", sendRewardType=" + sendRewardType +
|
||||
", sendGiftType=" + sendGiftType +
|
||||
", sendRewardNeedcoin='" + sendRewardNeedcoin + '\'' +
|
||||
", sendRewardRestrictTime='" + sendRewardRestrictTime + '\'' +
|
||||
", lock=" + lock +
|
||||
", received=" + received +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,6 +56,18 @@ public class LiveBean implements Parcelable {
|
||||
private int redPacketStatus;
|
||||
@SerializedName("giftId")
|
||||
private String giftId;
|
||||
@SerializedName("sendMoneyLongStatus ")
|
||||
private int sendMoneyLongStatus ;
|
||||
|
||||
public int getSendMoneyLongStatus() {
|
||||
return sendMoneyLongStatus;
|
||||
}
|
||||
|
||||
public LiveBean setSendMoneyLongStatus(int sendMoneyLongStatus) {
|
||||
this.sendMoneyLongStatus = sendMoneyLongStatus;
|
||||
return this;
|
||||
}
|
||||
|
||||
private Map<String,String> params;//用于跳转Activity时扩展参数,例:从首页Banner跳转到直播间时需要根据携带参数判断是否弹出新人特惠对话框
|
||||
|
||||
public String getRecommendCardIconSizeTwo() {
|
||||
|
||||
@@ -20,6 +20,14 @@ public class LiveClassBean {
|
||||
@SerializedName("channel_show")
|
||||
private int channel_show;
|
||||
|
||||
public LiveClassBean() {
|
||||
}
|
||||
|
||||
public LiveClassBean(String chinese, String english) {
|
||||
this.chinese = chinese;
|
||||
this.english = english;
|
||||
}
|
||||
|
||||
public String getChinese() {
|
||||
return chinese;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.yunbao.common.bean;
|
||||
import android.view.View;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/10/12.
|
||||
@@ -18,6 +19,8 @@ public class LiveGiftBean {
|
||||
// public static final int MARK_LUCK = 3;
|
||||
|
||||
private int id;
|
||||
@SerializedName("gift_id")
|
||||
private int gift_id;//包裹礼物id
|
||||
private int type;//0 普通礼物 1是贵族 2守护 3粉丝团 5盲盒礼物
|
||||
private int mark;// 0 普通 1热门 2守护 3幸运
|
||||
private String name;
|
||||
@@ -34,6 +37,7 @@ public class LiveGiftBean {
|
||||
private String isweek;
|
||||
private String end_time;
|
||||
private String tag;
|
||||
private boolean isPageGift;
|
||||
@JSONField(name = "blind_box_type")
|
||||
private int blind_box_type = 0;
|
||||
//礼物角标
|
||||
@@ -71,6 +75,14 @@ public class LiveGiftBean {
|
||||
@JSONField(name = "blind_box_ticket_id")
|
||||
private int blindBoxTicketId;
|
||||
|
||||
public boolean isPageGift() {
|
||||
return isPageGift;
|
||||
}
|
||||
|
||||
public void setPageGift(boolean pageGift) {
|
||||
isPageGift = pageGift;
|
||||
}
|
||||
|
||||
public int getBlindBoxTicketId() {
|
||||
return blindBoxTicketId;
|
||||
}
|
||||
@@ -80,6 +92,14 @@ public class LiveGiftBean {
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getGift_id() {
|
||||
return gift_id;
|
||||
}
|
||||
|
||||
public void setGift_id(int gift_id) {
|
||||
this.gift_id = gift_id;
|
||||
}
|
||||
|
||||
public int getBlindBoxTicket() {
|
||||
return blindBoxTicket;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class NewGuardLevelModel extends BaseModel{
|
||||
|
||||
@SerializedName("guard_type")
|
||||
private int guardType;
|
||||
@SerializedName("cn")
|
||||
private String cn;
|
||||
@SerializedName("en")
|
||||
private String en;
|
||||
|
||||
public int getGuardType() {
|
||||
return guardType;
|
||||
}
|
||||
|
||||
public void setGuardType(int guardType) {
|
||||
this.guardType = guardType;
|
||||
}
|
||||
|
||||
public String getCn() {
|
||||
return cn;
|
||||
}
|
||||
|
||||
public void setCn(String cn) {
|
||||
this.cn = cn;
|
||||
}
|
||||
|
||||
public String getEn() {
|
||||
return en;
|
||||
}
|
||||
|
||||
public void setEn(String en) {
|
||||
this.en = en;
|
||||
}
|
||||
}
|
||||
@@ -96,6 +96,9 @@ public class OpenAdModel extends BaseModel {
|
||||
}
|
||||
return url + "?t=" + System.currentTimeMillis() / 1000;
|
||||
}
|
||||
public String getOriginalUrl(){
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class RewardsModel extends BaseModel {
|
||||
@SerializedName("id")
|
||||
private int id;
|
||||
@SerializedName("reward_name")
|
||||
private String rewardName;
|
||||
@SerializedName("image_path")
|
||||
private String imagePath;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public RewardsModel setId(int id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getRewardName() {
|
||||
return rewardName;
|
||||
}
|
||||
|
||||
public RewardsModel setRewardName(String rewardName) {
|
||||
this.rewardName = rewardName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getImagePath() {
|
||||
return imagePath;
|
||||
}
|
||||
|
||||
public RewardsModel setImagePath(String imagePath) {
|
||||
this.imagePath = imagePath;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class RoomMicStatusModel extends BaseModel{
|
||||
|
||||
@SerializedName("mic_status")
|
||||
private String micStatus;
|
||||
@SerializedName("im_status")
|
||||
private String imStatus;
|
||||
|
||||
public String getMicStatus() {
|
||||
return micStatus;
|
||||
}
|
||||
|
||||
public void setMicStatus(String micStatus) {
|
||||
this.micStatus = micStatus;
|
||||
}
|
||||
|
||||
public String getImStatus() {
|
||||
return imStatus;
|
||||
}
|
||||
|
||||
public void setImStatus(String imStatus) {
|
||||
this.imStatus = imStatus;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class SendMoneyLongModel extends BaseModel {
|
||||
/**
|
||||
* {
|
||||
* "_method_": "SendMoneyLong",
|
||||
* "action": "0",
|
||||
* "uid": "98888",
|
||||
* "user_nicename": "周末暴打小朋友",
|
||||
* "user_avatar": "https://downs.yaoulive.com/mannine.png",
|
||||
* "liveuid": "98889",
|
||||
* "add_time": 1710318757,
|
||||
* "gold_num": "5000"
|
||||
* "countdown": 300 // 倒计时
|
||||
* "send_money_long_key": "1710384258446",
|
||||
* }
|
||||
*/
|
||||
|
||||
@SerializedName("_method_")
|
||||
private String method;
|
||||
@SerializedName("action")
|
||||
private String action;
|
||||
@SerializedName("uid")
|
||||
private String uid;
|
||||
@SerializedName("user_nicename")
|
||||
private String userNicename;
|
||||
@SerializedName("user_avatar")
|
||||
private String userAvatar;
|
||||
@SerializedName("liveuid")
|
||||
private String liveuid;
|
||||
@SerializedName("add_time")
|
||||
private String addTime;
|
||||
@SerializedName("gold_num")
|
||||
private String goldNum;
|
||||
@SerializedName("countdown")
|
||||
private String countdown;
|
||||
@SerializedName("send_money_long_key")
|
||||
private String sendMoneyLongKey;
|
||||
|
||||
public String getSendMoneyLongKey() {
|
||||
return sendMoneyLongKey;
|
||||
}
|
||||
|
||||
public SendMoneyLongModel setSendMoneyLongKey(String sendMoneyLongKey) {
|
||||
this.sendMoneyLongKey = sendMoneyLongKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCountdown() {
|
||||
return countdown;
|
||||
}
|
||||
|
||||
public SendMoneyLongModel setCountdown(String countdown) {
|
||||
this.countdown = countdown;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMethod() {
|
||||
return method;
|
||||
}
|
||||
|
||||
public void setMethod(String method) {
|
||||
this.method = method;
|
||||
}
|
||||
|
||||
public String getAction() {
|
||||
return action;
|
||||
}
|
||||
|
||||
public void setAction(String action) {
|
||||
this.action = action;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(String uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public String getUserNicename() {
|
||||
return userNicename;
|
||||
}
|
||||
|
||||
public void setUserNicename(String userNicename) {
|
||||
this.userNicename = userNicename;
|
||||
}
|
||||
|
||||
public String getUserAvatar() {
|
||||
return userAvatar;
|
||||
}
|
||||
|
||||
public void setUserAvatar(String userAvatar) {
|
||||
this.userAvatar = userAvatar;
|
||||
}
|
||||
|
||||
public String getLiveuid() {
|
||||
return liveuid;
|
||||
}
|
||||
|
||||
public void setLiveuid(String liveuid) {
|
||||
this.liveuid = liveuid;
|
||||
}
|
||||
|
||||
public String getAddTime() {
|
||||
return addTime;
|
||||
}
|
||||
|
||||
public void setAddTime(String addTime) {
|
||||
this.addTime = addTime;
|
||||
}
|
||||
|
||||
public String getGoldNum() {
|
||||
return goldNum;
|
||||
}
|
||||
|
||||
public void setGoldNum(String goldNum) {
|
||||
this.goldNum = goldNum;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SendMoneyLongModel{" +
|
||||
"method='" + method + '\'' +
|
||||
", action='" + action + '\'' +
|
||||
", uid='" + uid + '\'' +
|
||||
", userNicename='" + userNicename + '\'' +
|
||||
", userAvatar='" + userAvatar + '\'' +
|
||||
", liveuid='" + liveuid + '\'' +
|
||||
", addTime=" + addTime +
|
||||
", goldNum='" + goldNum + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class SendMoneyLongStatusModel extends BaseModel {
|
||||
/**
|
||||
* "sendMoneyLongStatus": { // 未查询到数据时为空数组
|
||||
* "liveuid": "98889", // 主播ID
|
||||
* "uid": "98888", // 发起用户ID
|
||||
* "addtime": "1710384258446", // 开始时间 毫秒时间戳
|
||||
* "gold_num": "5000", // 金豆数量
|
||||
* "user_nicename": "周末暴打小朋友", // 用户昵称
|
||||
* "user_avatar": "https://downs.yaoulive.com/mannine.png", // 用户头像链接
|
||||
* "countdown": 300 // 倒计时
|
||||
* "start_status": false,
|
||||
* "start_time": "",
|
||||
* "send_money_long_key": "1710397575473",
|
||||
* "participate": 0,
|
||||
* "add_time": "1710397575473"
|
||||
* }
|
||||
*/
|
||||
@SerializedName("liveuid")
|
||||
private String liveuid;
|
||||
@SerializedName("uid")
|
||||
private String uid;
|
||||
@SerializedName("addtime")
|
||||
private String addtime;
|
||||
@SerializedName("gold_num")
|
||||
private String goldNum;
|
||||
@SerializedName("user_nicename")
|
||||
private String userNicename;
|
||||
@SerializedName("user_avatar")
|
||||
private String userAvatar;
|
||||
@SerializedName("countdown")
|
||||
private String countdown;
|
||||
@SerializedName("start_status")
|
||||
private String startStatus;
|
||||
@SerializedName("start_time")
|
||||
private String startTime;
|
||||
@SerializedName("send_money_long_key")
|
||||
private String sendMoneyLongKey;
|
||||
@SerializedName("participate")
|
||||
private String participate;
|
||||
@SerializedName("add_time")
|
||||
private String addTime;
|
||||
|
||||
public String getLiveuid() {
|
||||
return liveuid;
|
||||
}
|
||||
|
||||
public SendMoneyLongStatusModel setLiveuid(String liveuid) {
|
||||
this.liveuid = liveuid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public SendMoneyLongStatusModel setUid(String uid) {
|
||||
this.uid = uid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAddtime() {
|
||||
return addtime;
|
||||
}
|
||||
|
||||
public SendMoneyLongStatusModel setAddtime(String addtime) {
|
||||
this.addtime = addtime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGoldNum() {
|
||||
return goldNum;
|
||||
}
|
||||
|
||||
public SendMoneyLongStatusModel setGoldNum(String goldNum) {
|
||||
this.goldNum = goldNum;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserNicename() {
|
||||
return userNicename;
|
||||
}
|
||||
|
||||
public SendMoneyLongStatusModel setUserNicename(String userNicename) {
|
||||
this.userNicename = userNicename;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserAvatar() {
|
||||
return userAvatar;
|
||||
}
|
||||
|
||||
public SendMoneyLongStatusModel setUserAvatar(String userAvatar) {
|
||||
this.userAvatar = userAvatar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCountdown() {
|
||||
return countdown;
|
||||
}
|
||||
|
||||
public SendMoneyLongStatusModel setCountdown(String countdown) {
|
||||
this.countdown = countdown;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getStartStatus() {
|
||||
return startStatus;
|
||||
}
|
||||
|
||||
public SendMoneyLongStatusModel setStartStatus(String startStatus) {
|
||||
this.startStatus = startStatus;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public SendMoneyLongStatusModel setStartTime(String startTime) {
|
||||
this.startTime = startTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSendMoneyLongKey() {
|
||||
return sendMoneyLongKey;
|
||||
}
|
||||
|
||||
public SendMoneyLongStatusModel setSendMoneyLongKey(String sendMoneyLongKey) {
|
||||
this.sendMoneyLongKey = sendMoneyLongKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getParticipate() {
|
||||
return participate;
|
||||
}
|
||||
|
||||
public SendMoneyLongStatusModel setParticipate(String participate) {
|
||||
this.participate = participate;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAddTime() {
|
||||
return addTime;
|
||||
}
|
||||
|
||||
public SendMoneyLongStatusModel setAddTime(String addTime) {
|
||||
this.addTime = addTime;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,17 @@ public class SudGameChatImModel extends BaseModel {
|
||||
//文字消息
|
||||
private String textMessage;
|
||||
|
||||
private boolean welcomMessage;
|
||||
|
||||
public boolean isWelcomMessage() {
|
||||
return welcomMessage;
|
||||
}
|
||||
|
||||
public SudGameChatImModel setWelcomMessage(boolean welcomMessage) {
|
||||
this.welcomMessage = welcomMessage;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNickname() {
|
||||
return nickname;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class SudGameUserModel extends BaseModel {
|
||||
@@ -14,6 +16,21 @@ public class SudGameUserModel extends BaseModel {
|
||||
private int id;
|
||||
@SerializedName("mic_status")
|
||||
private int micStatus; //麦克风状态 2.打开麦克风 3.关闭麦克风
|
||||
@SerializedName("game_status")
|
||||
private String gameStatus;// 游戏状态 1.未在游戏状态 2.游戏中;
|
||||
|
||||
public String getGameStatus() {
|
||||
return gameStatus;
|
||||
}
|
||||
|
||||
public boolean isGameIng() {
|
||||
return TextUtils.equals(getGameStatus(), "2") ;
|
||||
}
|
||||
|
||||
public SudGameUserModel setGameStatus(String gameStatus) {
|
||||
this.gameStatus = gameStatus;
|
||||
return this;
|
||||
}
|
||||
|
||||
private boolean mute = false;
|
||||
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class sendMoneyLongListModel extends BaseModel {
|
||||
/**
|
||||
* {
|
||||
* "liveuid": "98889", // 主播ID
|
||||
* "uid": "98888", // 用户ID
|
||||
* "addtime": "1710397350011", // 创建时间 毫秒时间戳
|
||||
* "gold_num": "5000", // 金豆数量
|
||||
* "user_nicename": "周末暴打小朋友", // 用户昵称
|
||||
* "user_avatar": "https://downs.yaoulive.com/mannine.png", // 用户头像
|
||||
* "countdown": 300, // 倒计时
|
||||
* "start_status": false,
|
||||
* "start_time": "",
|
||||
* "send_money_long_key": "1710397485729",
|
||||
* "participate": 0, // 是否参与活动 0.未参与 1.已参与
|
||||
* "add_time": "1710397485729"
|
||||
* }
|
||||
*/
|
||||
@SerializedName("liveuid")
|
||||
private String liveuid;
|
||||
@SerializedName("uid")
|
||||
private String uid;
|
||||
@SerializedName("addtime")
|
||||
private String addtime;
|
||||
@SerializedName("gold_num")
|
||||
private String goldNum;
|
||||
@SerializedName("user_nicename")
|
||||
private String userNicename;
|
||||
@SerializedName("user_avatar")
|
||||
private String userAvatar;
|
||||
@SerializedName("countdown")
|
||||
private String countdown;
|
||||
@SerializedName("start_status")
|
||||
private boolean startStatus;
|
||||
@SerializedName("start_time")
|
||||
private String startTime;
|
||||
@SerializedName("send_money_long_key")
|
||||
private String sendMoneyLongKey;
|
||||
@SerializedName("participate")
|
||||
private String participate;
|
||||
@SerializedName("add_time")
|
||||
private String addTime;
|
||||
|
||||
public String getLiveuid() {
|
||||
return liveuid;
|
||||
}
|
||||
|
||||
public sendMoneyLongListModel setLiveuid(String liveuid) {
|
||||
this.liveuid = liveuid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public sendMoneyLongListModel setUid(String uid) {
|
||||
this.uid = uid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAddtime() {
|
||||
return addtime;
|
||||
}
|
||||
|
||||
public sendMoneyLongListModel setAddtime(String addtime) {
|
||||
this.addtime = addtime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGoldNum() {
|
||||
return goldNum;
|
||||
}
|
||||
|
||||
public sendMoneyLongListModel setGoldNum(String goldNum) {
|
||||
this.goldNum = goldNum;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserNicename() {
|
||||
return userNicename;
|
||||
}
|
||||
|
||||
public sendMoneyLongListModel setUserNicename(String userNicename) {
|
||||
this.userNicename = userNicename;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserAvatar() {
|
||||
return userAvatar;
|
||||
}
|
||||
|
||||
public sendMoneyLongListModel setUserAvatar(String userAvatar) {
|
||||
this.userAvatar = userAvatar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCountdown() {
|
||||
return countdown;
|
||||
}
|
||||
|
||||
public sendMoneyLongListModel setCountdown(String countdown) {
|
||||
this.countdown = countdown;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isStartStatus() {
|
||||
return startStatus;
|
||||
}
|
||||
|
||||
public sendMoneyLongListModel setStartStatus(boolean startStatus) {
|
||||
this.startStatus = startStatus;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public sendMoneyLongListModel setStartTime(String startTime) {
|
||||
this.startTime = startTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSendMoneyLongKey() {
|
||||
return sendMoneyLongKey;
|
||||
}
|
||||
|
||||
public sendMoneyLongListModel setSendMoneyLongKey(String sendMoneyLongKey) {
|
||||
this.sendMoneyLongKey = sendMoneyLongKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getParticipate() {
|
||||
return participate;
|
||||
}
|
||||
|
||||
public sendMoneyLongListModel setParticipate(String participate) {
|
||||
this.participate = participate;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAddTime() {
|
||||
return addTime;
|
||||
}
|
||||
|
||||
public sendMoneyLongListModel setAddTime(String addTime) {
|
||||
this.addTime = addTime;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.yunbao.common.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.core.CenterPopupView;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
public class DragonRulePopup extends CenterPopupView {
|
||||
LinearLayout list_no;
|
||||
LinearLayout list;
|
||||
|
||||
boolean isList;
|
||||
|
||||
public DragonRulePopup(@NonNull Context context, boolean isList) {
|
||||
super(context);
|
||||
this.isList = isList;
|
||||
}
|
||||
|
||||
// 返回自定义弹窗的布局
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.dragon_rule_popup;
|
||||
}
|
||||
|
||||
// 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
list_no = findViewById(R.id.list_no);
|
||||
list = findViewById(R.id.list);
|
||||
if (!isList){
|
||||
list_no.setVisibility(VISIBLE);
|
||||
list.setVisibility(GONE);
|
||||
}else {
|
||||
list_no.setVisibility(GONE);
|
||||
list.setVisibility(VISIBLE);
|
||||
}
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.dragon_close), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
package com.yunbao.common.dialog;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.GuardGetGuardUserInfoModel;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
public class GuardBuyTipsDialog {
|
||||
|
||||
/**
|
||||
* @param context
|
||||
* @param coin 钻石
|
||||
* @param content 购买类型名称
|
||||
* @param simpleCallback
|
||||
*/
|
||||
public static void showBuyOrRenewDialog(Context context, String coin, String content,
|
||||
boolean isOpen, GuardGetGuardUserInfoModel mGuardUserInfoModel, int guardType,
|
||||
DialogUitl.SimpleCallback simpleCallback) {
|
||||
if (context instanceof Activity) {
|
||||
if (((Activity) context).isDestroyed() || ((Activity) context).isFinishing()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
final Dialog dialog = new Dialog(context, R.style.dialog2);
|
||||
dialog.setContentView(R.layout.dialog_guard_buy_tips);
|
||||
dialog.setCancelable(true);
|
||||
dialog.setCanceledOnTouchOutside(true);
|
||||
TextView btn_confirm = dialog.findViewById(R.id.btn_confirm);
|
||||
TextView content1 = dialog.findViewById(R.id.content1);
|
||||
TextView content2 = dialog.findViewById(R.id.content2);
|
||||
TextView contentTextView = dialog.findViewById(R.id.content);
|
||||
TextView buyTypeTextView = dialog.findViewById(R.id.buyType);
|
||||
content1.setVisibility(View.VISIBLE);
|
||||
contentTextView.setVisibility(View.VISIBLE);
|
||||
buyTypeTextView.setVisibility(View.VISIBLE);
|
||||
content2.setVisibility(View.GONE);
|
||||
if (TextUtils.isEmpty(coin) && mGuardUserInfoModel == null && !isOpen && guardType == -200) {
|
||||
content1.setVisibility(View.GONE);
|
||||
contentTextView.setVisibility(View.VISIBLE);
|
||||
buyTypeTextView.setVisibility(View.GONE);
|
||||
content2.setVisibility(View.GONE);
|
||||
contentTextView.setText(content);
|
||||
} else {
|
||||
if (!isOpen) {
|
||||
if (!TextUtils.isEmpty(coin)) {
|
||||
contentTextView.setText(context.getString(R.string.guard_buy_tips_1, coin));
|
||||
}
|
||||
if (!TextUtils.isEmpty(content)) {
|
||||
buyTypeTextView.setText("【" + content + "】");
|
||||
}
|
||||
} else {
|
||||
if (!TextUtils.isEmpty(coin)) {
|
||||
contentTextView.setText(context.getString(R.string.guard_buy_tips_2, coin));
|
||||
}
|
||||
if (!TextUtils.isEmpty(content)) {
|
||||
buyTypeTextView.setText("【" + content + "】");
|
||||
}
|
||||
}
|
||||
if (mGuardUserInfoModel != null) {
|
||||
if (mGuardUserInfoModel.getGuardType() != 0) {
|
||||
if (TextUtils.equals(mGuardUserInfoModel.getIsOpen(), "1") &&
|
||||
guardType < mGuardUserInfoModel.getGuardType()) {
|
||||
content1.setVisibility(View.GONE);
|
||||
contentTextView.setVisibility(View.GONE);
|
||||
buyTypeTextView.setVisibility(View.GONE);
|
||||
content2.setVisibility(View.VISIBLE);
|
||||
|
||||
} else if (guardType == mGuardUserInfoModel.getGuardType()) {
|
||||
content1.setVisibility(View.GONE);
|
||||
} else {
|
||||
content1.setVisibility(View.VISIBLE);
|
||||
}
|
||||
} else {
|
||||
content1.setVisibility(View.GONE);
|
||||
}
|
||||
} else {
|
||||
content1.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dialog.findViewById(R.id.btn_cancel).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
btn_confirm.setText(WordUtil.isNewZh() ? "確認" : "Confirm");
|
||||
btn_confirm.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (content2.getVisibility() == View.VISIBLE) {
|
||||
dialog.dismiss();
|
||||
} else {
|
||||
simpleCallback.onConfirmClick(dialog, "");
|
||||
dialog.dismiss();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
package com.yunbao.common.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
|
||||
import com.lxj.xpopup.core.CenterPopupView;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.CheckUpgradesModel;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.bean.RewardsModel;
|
||||
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.RouteUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
|
||||
public class GuardUpgradePopup extends CenterPopupView {
|
||||
FragmentActivity activity;
|
||||
String mLiveUid;
|
||||
CheckUpgradesModel mUpgradesModel;
|
||||
TextView leave_hint;
|
||||
LinearLayout rewards_line1, rewards_line2, rewards_line3;
|
||||
ImageView rewards_img1, rewards_img2, rewards_img3;
|
||||
TextView rewards_text1, rewards_text2, rewards_text3;
|
||||
|
||||
public GuardUpgradePopup(@NonNull Context context, String liveUid, CheckUpgradesModel upgradesModel, GuardUpgradeCallBack guardUpgradeCallBack) {
|
||||
super(context);
|
||||
activity = (FragmentActivity) context;
|
||||
mLiveUid = liveUid;
|
||||
mUpgradesModel = upgradesModel;
|
||||
mGuardUpgradeCallBack = guardUpgradeCallBack;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.guard_upgrade_popup;
|
||||
}
|
||||
|
||||
// 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
leave_hint = findViewById(R.id.leave_hint);
|
||||
rewards_line1 = findViewById(R.id.rewards_line1);
|
||||
rewards_line2 = findViewById(R.id.rewards_line2);
|
||||
rewards_line3 = findViewById(R.id.rewards_line3);
|
||||
rewards_img1 = findViewById(R.id.rewards_img1);
|
||||
rewards_img2 = findViewById(R.id.rewards_img2);
|
||||
rewards_img3 = findViewById(R.id.rewards_img3);
|
||||
rewards_text1 = findViewById(R.id.rewards_text1);
|
||||
rewards_text2 = findViewById(R.id.rewards_text2);
|
||||
rewards_text3 = findViewById(R.id.rewards_text3);
|
||||
StringBuffer hintStringBuffer = new StringBuffer();
|
||||
if (WordUtil.isNewZh()) {
|
||||
hintStringBuffer.append("您的守護等級已達到")
|
||||
.append(mUpgradesModel.getLevel())
|
||||
.append("級 可以領取以下獎勵");
|
||||
} else {
|
||||
hintStringBuffer.append("Your guardian level has reached level ")
|
||||
.append(mUpgradesModel.getLevel())
|
||||
.append(" You can receive the following rewards")
|
||||
;
|
||||
}
|
||||
leave_hint.setText(hintStringBuffer.toString());
|
||||
if (mUpgradesModel.getRewards().size() > 0) {
|
||||
if (mUpgradesModel.getRewards().size() == 1) {
|
||||
rewards_line1.setVisibility(INVISIBLE);
|
||||
rewards_line2.setVisibility(VISIBLE);
|
||||
rewards_line3.setVisibility(INVISIBLE);
|
||||
RewardsModel rewardsModel = mUpgradesModel.getRewards().get(0);
|
||||
ImgLoader.display(getContext(), rewardsModel.getImagePath(), rewards_img2);
|
||||
rewards_text2.setText(rewardsModel.getRewardName());
|
||||
} else if (mUpgradesModel.getRewards().size() == 2) {
|
||||
rewards_line1.setVisibility(VISIBLE);
|
||||
rewards_line2.setVisibility(INVISIBLE);
|
||||
rewards_line3.setVisibility(VISIBLE);
|
||||
RewardsModel rewardsModel1 = mUpgradesModel.getRewards().get(0);
|
||||
RewardsModel rewardsModel3 = mUpgradesModel.getRewards().get(1);
|
||||
|
||||
ImgLoader.display(getContext(), rewardsModel1.getImagePath(), rewards_img1);
|
||||
rewards_text1.setText(rewardsModel1.getRewardName());
|
||||
|
||||
ImgLoader.display(getContext(), rewardsModel3.getImagePath(), rewards_img3);
|
||||
rewards_text3.setText(rewardsModel3.getRewardName());
|
||||
|
||||
} else if (mUpgradesModel.getRewards().size() == 3) {
|
||||
rewards_line1.setVisibility(VISIBLE);
|
||||
rewards_line2.setVisibility(VISIBLE);
|
||||
rewards_line3.setVisibility(VISIBLE);
|
||||
RewardsModel rewardsModel1 = mUpgradesModel.getRewards().get(0);
|
||||
RewardsModel rewardsModel2 = mUpgradesModel.getRewards().get(1);
|
||||
RewardsModel rewardsModel3 = mUpgradesModel.getRewards().get(2);
|
||||
|
||||
ImgLoader.display(getContext(), rewardsModel1.getImagePath(), rewards_img1);
|
||||
rewards_text1.setText(rewardsModel1.getRewardName());
|
||||
|
||||
ImgLoader.display(getContext(), rewardsModel2.getImagePath(), rewards_img2);
|
||||
rewards_text2.setText(rewardsModel2.getRewardName());
|
||||
|
||||
ImgLoader.display(getContext(), rewardsModel3.getImagePath(), rewards_img3);
|
||||
rewards_text3.setText(rewardsModel3.getRewardName());
|
||||
} else {
|
||||
rewards_line1.setVisibility(INVISIBLE);
|
||||
rewards_line2.setVisibility(INVISIBLE);
|
||||
rewards_line3.setVisibility(INVISIBLE);
|
||||
}
|
||||
} else {
|
||||
rewards_line1.setVisibility(INVISIBLE);
|
||||
rewards_line2.setVisibility(INVISIBLE);
|
||||
rewards_line3.setVisibility(INVISIBLE);
|
||||
}
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.confirm), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
LiveNetManager.get(getContext())
|
||||
.guardGetRewards(mUpgradesModel.getLevel(), mLiveUid, new HttpCallback<Object>() {
|
||||
@Override
|
||||
public void onSuccess(Object data) {
|
||||
ToastUtil.show(WordUtil.isNewZh() ? "領取成功" : "Receive successfully");
|
||||
dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.view_grade), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
if (mGuardUpgradeCallBack != null) {
|
||||
mGuardUpgradeCallBack.onGuardLevel();
|
||||
}
|
||||
dismiss();
|
||||
StringBuffer htmlUrl = new StringBuffer();
|
||||
IMLoginModel userInfo = IMLoginManager.get(getContext()).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 GuardUpgradeCallBack mGuardUpgradeCallBack;
|
||||
|
||||
public interface GuardUpgradeCallBack {
|
||||
void onGuardLevel();
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import com.yunbao.common.R;
|
||||
import com.yunbao.common.http.ResponseModel;
|
||||
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.WordUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
@@ -75,6 +76,8 @@ public class LiberalBattlePassPopupWindow extends CenterPopupView {
|
||||
if (mPassCallback != null) {
|
||||
mPassCallback.onCallback(data.getData().getCode(), data.getData().getMsg());
|
||||
}
|
||||
IMLoginManager.get(getContext()).upDataUserInfo();
|
||||
IMLoginManager.get(getContext()).updateUserCoin();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,134 @@
|
||||
package com.yunbao.common.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.lxj.xpopup.core.AttachPopupView;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.adapter.LiveBuyGuardSelectAdapter;
|
||||
import com.yunbao.common.bean.GuardPriceModel;
|
||||
import com.yunbao.common.views.LiveBuyGuardSelectViewHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class LiveBuyGuardSelectPopup extends AttachPopupView {
|
||||
private int mType;
|
||||
private DialogInterface.OnDismissListener onDismissListener;
|
||||
|
||||
private LiveBuyGuardSelectListener buyGuardSelectListener;
|
||||
List<GuardPriceModel> price = new ArrayList<>();
|
||||
LiveBuyGuardSelectAdapter liveBuyGuardSelectAdapter;
|
||||
RecyclerView live_buy_guard_list;
|
||||
GuardPriceModel model;
|
||||
|
||||
public LiveBuyGuardSelectPopup(@NonNull Context context, List<GuardPriceModel> mPrice, GuardPriceModel mModel) {
|
||||
super(context);
|
||||
price = mPrice;
|
||||
model = mModel;
|
||||
}
|
||||
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.view_live_buy_guard_slelect;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
live_buy_guard_list = findViewById(R.id.live_buy_guard_list);
|
||||
liveBuyGuardSelectAdapter = new LiveBuyGuardSelectAdapter(price,model);
|
||||
live_buy_guard_list.setAdapter(liveBuyGuardSelectAdapter);
|
||||
live_buy_guard_list.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||
liveBuyGuardSelectAdapter.setLiveBuyGuardSelectClickListener(new LiveBuyGuardSelectViewHolder.LiveBuyGuardSelectClickListener() {
|
||||
@Override
|
||||
public void onClickListener(GuardPriceModel guardPriceModel) {
|
||||
dialog.dismiss();
|
||||
if (onDismissListener != null) {
|
||||
onDismissListener.onDismiss(null);
|
||||
}
|
||||
if (buyGuardSelectListener != null) {
|
||||
buyGuardSelectListener.onLiveBuyGuardSelectListener(guardPriceModel);
|
||||
}
|
||||
}
|
||||
});
|
||||
// ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.one_month), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
// @Override
|
||||
// public void onViewClicks() {
|
||||
// dialog.dismiss();
|
||||
// if (onDismissListener != null) {
|
||||
// onDismissListener.onDismiss(null);
|
||||
// }
|
||||
// if (buyGuardSelectListener != null) {
|
||||
// buyGuardSelectListener.onLiveBuyGuardSelectListener(0);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.tree_month), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
// @Override
|
||||
// public void onViewClicks() {
|
||||
// dialog.dismiss();
|
||||
// if (onDismissListener != null) {
|
||||
// onDismissListener.onDismiss(null);
|
||||
// }
|
||||
// if (buyGuardSelectListener != null) {
|
||||
// buyGuardSelectListener.onLiveBuyGuardSelectListener(1);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.six_month), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
// @Override
|
||||
// public void onViewClicks() {
|
||||
// dialog.dismiss();
|
||||
// if (onDismissListener != null) {
|
||||
// onDismissListener.onDismiss(null);
|
||||
// }
|
||||
// if (buyGuardSelectListener != null) {
|
||||
// buyGuardSelectListener.onLiveBuyGuardSelectListener(2);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.one_two_month), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
// @Override
|
||||
// public void onViewClicks() {
|
||||
// dialog.dismiss();
|
||||
// if (onDismissListener != null) {
|
||||
// onDismissListener.onDismiss(null);
|
||||
// }
|
||||
// if (buyGuardSelectListener != null) {
|
||||
// buyGuardSelectListener.onLiveBuyGuardSelectListener(3);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
|
||||
if (model == null) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public LiveBuyGuardSelectPopup setOnDismissListener(DialogInterface.OnDismissListener onDismissListener) {
|
||||
this.onDismissListener = onDismissListener;
|
||||
return this;
|
||||
}
|
||||
|
||||
public LiveBuyGuardSelectPopup setBuyGuardSelectListener(LiveBuyGuardSelectListener buyGuardSelectListener) {
|
||||
this.buyGuardSelectListener = buyGuardSelectListener;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDismiss() {
|
||||
super.onDismiss();
|
||||
if (onDismissListener != null) {
|
||||
onDismissListener.onDismiss(null);
|
||||
}
|
||||
}
|
||||
|
||||
public interface LiveBuyGuardSelectListener {
|
||||
void onLiveBuyGuardSelectListener(GuardPriceModel guardPriceModel);
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import com.yunbao.common.bean.OpenAdModel;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.ScreenDimenUtil;
|
||||
|
||||
public class OpenAdCenterDialogPopup extends AbsDialogFullScreenPopupWindow {
|
||||
@@ -65,6 +66,11 @@ public class OpenAdCenterDialogPopup extends AbsDialogFullScreenPopupWindow {
|
||||
mClose = findViewById(R.id.close);
|
||||
findViewById(R.id.layout).setOnClickListener(v -> dismiss());
|
||||
mImageView.setOnClickListener(v -> {
|
||||
if("home_page_banner_battle".equals(model.getOriginalUrl())){
|
||||
RouteUtil.forwardBattlePass();
|
||||
dismiss();
|
||||
return;
|
||||
}
|
||||
WebViewActivity.forward(mContext, model.getUrl(), model.getType() != OpenAdModel.TYPE_HOME);
|
||||
if (mListener != null) {
|
||||
mListener.onItemClick(model, 1);
|
||||
|
||||
@@ -7,11 +7,15 @@ import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.lxj.xpopup.core.CenterPopupView;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.BattlePassUserInfoBean;
|
||||
import com.yunbao.common.http.ResponseModel;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
@@ -22,22 +26,24 @@ import java.math.BigDecimal;
|
||||
* 战令等级 经验
|
||||
*/
|
||||
public class OrderLevelPopupWindow extends CenterPopupView {
|
||||
private TextView orderLevel, orderLevelDiamond, balanceDiamond, current,expText;
|
||||
private TextView orderLevel, orderLevelDiamond, balanceDiamond, current, expText;
|
||||
private int currentExperience, totalExperience;//当前经验,全部经验
|
||||
private String buyExp = "100", currentLevel, balance;
|
||||
private ProgressBar progressBar;
|
||||
private OrderLevelCallback orderLevelCallback;
|
||||
private long maxExp;
|
||||
private BattlePassUserInfoBean userInfoBean;
|
||||
|
||||
public OrderLevelPopupWindow(@NonNull Context context,
|
||||
public OrderLevelPopupWindow(@NonNull Context context, BattlePassUserInfoBean userInfoBean,
|
||||
int mCurrentExperience, int mTotalExperience,
|
||||
String mCurrentLevel, String mBalance,long maxExp, OrderLevelCallback mOrderLevelCallback) {
|
||||
String mCurrentLevel, String mBalance, long maxExp, OrderLevelCallback mOrderLevelCallback) {
|
||||
super(context);
|
||||
this.userInfoBean = userInfoBean;
|
||||
currentExperience = mCurrentExperience;
|
||||
totalExperience = mTotalExperience;
|
||||
currentLevel = mCurrentLevel;
|
||||
balance = mBalance;
|
||||
this.maxExp=maxExp;
|
||||
this.maxExp = maxExp;
|
||||
orderLevelCallback = mOrderLevelCallback;
|
||||
}
|
||||
|
||||
@@ -59,7 +65,7 @@ public class OrderLevelPopupWindow extends CenterPopupView {
|
||||
orderLevel.setText(buyExp);
|
||||
progressBar.setMax(totalExperience);
|
||||
progressBar.setProgress(currentExperience);
|
||||
expText.setText(String.format("%s/%s", currentExperience, totalExperience));
|
||||
expText.setText(String.format("%s/%s", userInfoBean.getBattlePassExp(), userInfoBean.getNextLevelExp()));
|
||||
current.setText(String.format("Lv%s", currentLevel));
|
||||
balanceDiamond.setText(balance);
|
||||
findViewById(R.id.sub).setOnClickListener(new OnClickListener() {
|
||||
@@ -83,8 +89,8 @@ public class OrderLevelPopupWindow extends CenterPopupView {
|
||||
buyExp = String.valueOf(buyExpBigDecimal.intValue());
|
||||
orderLevelDiamond.setText(String.valueOf(buyExpBigDecimal.floatValue()));
|
||||
orderLevel.setText(buyExp);
|
||||
}else if(exp>=maxExp){
|
||||
ToastUtil.show(WordUtil.isNewZh()?"经验已滿":"Experience full");
|
||||
} else if (exp >= maxExp) {
|
||||
ToastUtil.show(WordUtil.isNewZh() ? "经验已滿" : "Experience full");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -102,20 +108,33 @@ public class OrderLevelPopupWindow extends CenterPopupView {
|
||||
.buyingExperiencePoint(buyExp, new HttpCallback<ResponseModel<Object>>() {
|
||||
@Override
|
||||
public void onSuccess(ResponseModel<Object> data) {
|
||||
|
||||
if (orderLevelCallback != null) {
|
||||
orderLevelCallback.onCallback(data.getData().getCode(), data.getMsg());
|
||||
}dialog.dismiss();
|
||||
}
|
||||
dialog.dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
if (orderLevelCallback != null) {
|
||||
orderLevelCallback.onCallback(102, error);
|
||||
} dialog.dismiss();
|
||||
}
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
IMLoginManager.get(getContext())
|
||||
.updateUserCoin(new OnItemClickListener<JSONObject>() {
|
||||
@Override
|
||||
public void onItemClick(JSONObject bean, int position) {
|
||||
if (bean != null) {
|
||||
balance = bean.getString("coin");
|
||||
balanceDiamond.setText(balance);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public interface OrderLevelCallback {
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.yunbao.common.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.core.CenterPopupView;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
public class SkitCheckInWasSuccessfulPopup extends CenterPopupView {
|
||||
public SkitCheckInWasSuccessfulPopup(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.skit_check_in_was_successful_popup;
|
||||
}
|
||||
|
||||
// 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.icon_slice_368), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -48,15 +48,16 @@ public class SudGameInputPopupWindow extends BottomPopupView {
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.send), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
dialog.dismiss();
|
||||
|
||||
if (sudGameInputCallBack != null) {
|
||||
String textMessageStr = textMessage.getText().toString();
|
||||
String textMessageStr = textMessage.getText().toString().trim();
|
||||
if (!TextUtils.isEmpty(textMessageStr)) {
|
||||
if (textMessageStr.length() > 100) {
|
||||
ToastUtil.show(WordUtil.isNewZh() ? "超出字數限制" : "Exceed word limit");
|
||||
} else {
|
||||
sudGameInputCallBack.sendMessage(textMessageStr);
|
||||
}
|
||||
dialog.dismiss();
|
||||
} else {
|
||||
ToastUtil.show(WordUtil.getNewString(R.string.cannot_be_empty));
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.yunbao.common.dialog;
|
||||
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.animation.LinearInterpolator;
|
||||
@@ -275,6 +276,29 @@ public class SudGameListPopup extends BottomPopupView {
|
||||
.asCustom(new LiveSudGameHistoryPopup(getContext(), customSidebarChildModels)).show();
|
||||
}
|
||||
});
|
||||
if (interactionID == 0) {
|
||||
gameTitle.setTextColor(getDefColor());
|
||||
} else {
|
||||
gameTitle.setTextColor(getYellowColor());
|
||||
}
|
||||
if (mSill.equals("0,0,0")) {
|
||||
sillTitle.setTextColor(getDefColor());
|
||||
} else {
|
||||
sillTitle.setTextColor(getYellowColor());
|
||||
}
|
||||
if ("0".equals(roomHolderType)) {
|
||||
houseOwnerTitle.setTextColor(getDefColor());
|
||||
} else {
|
||||
houseOwnerTitle.setTextColor(getYellowColor());
|
||||
}
|
||||
}
|
||||
|
||||
private int getYellowColor() {
|
||||
return Color.parseColor("#FF8D41");
|
||||
}
|
||||
|
||||
private int getDefColor() {
|
||||
return Color.WHITE;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -293,6 +317,11 @@ public class SudGameListPopup extends BottomPopupView {
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onSudGameListEvent(SudGameListEvent event) {
|
||||
interactionID = event.getInteractionID();
|
||||
if (interactionID == 0) {
|
||||
gameTitle.setTextColor(getDefColor());
|
||||
} else {
|
||||
gameTitle.setTextColor(getYellowColor());
|
||||
}
|
||||
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||
gameTitle.setText(event.getTitle());
|
||||
} else {
|
||||
@@ -325,7 +354,11 @@ public class SudGameListPopup extends BottomPopupView {
|
||||
} else {
|
||||
sillTitle.setText(mSillName.substring(0, mSillName.length() - 2));
|
||||
}
|
||||
|
||||
if (mSill.equals("0,0,0")) {
|
||||
sillTitle.setTextColor(getDefColor());
|
||||
} else {
|
||||
sillTitle.setTextColor(getYellowColor());
|
||||
}
|
||||
|
||||
ObjectAnimator animator = ObjectAnimator.ofFloat(roomSillArrow, "rotation", 90f, 0f);
|
||||
animator.setDuration(500);
|
||||
@@ -344,6 +377,11 @@ public class SudGameListPopup extends BottomPopupView {
|
||||
animator.setInterpolator(new LinearInterpolator());
|
||||
animator.start();
|
||||
mRefreshView.initData();
|
||||
if ("0".equals(roomHolderType)) {
|
||||
houseOwnerTitle.setTextColor(getDefColor());
|
||||
} else {
|
||||
houseOwnerTitle.setTextColor(getYellowColor());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ public class SudGameSmallPopupPindow extends AttachPopupView {
|
||||
return;
|
||||
}
|
||||
if (sudGameUserModel.getMicStatus() == 3) {
|
||||
ToastUtil.show("对方未开麦!");
|
||||
ToastUtil.show(WordUtil.isNewZh() ? "對方未開麥!" : "The other side did not turn on the microphone");
|
||||
return;
|
||||
}
|
||||
if (!mute) {
|
||||
|
||||
@@ -0,0 +1,227 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class AllServerNotifyFFGGGDJANEvent extends BaseModel {
|
||||
|
||||
@SerializedName("_method_")
|
||||
private String method;
|
||||
@SerializedName("action")
|
||||
private String action;
|
||||
@SerializedName("msg_cn")
|
||||
private String msgCn;
|
||||
@SerializedName("msg_en")
|
||||
private String msgEn;
|
||||
@SerializedName("uid")
|
||||
private String uid;
|
||||
@SerializedName("liveuid")
|
||||
private String liveuid;
|
||||
@SerializedName("background_image")
|
||||
private String backgroundImage;
|
||||
@SerializedName("style")
|
||||
private List<StyleDTO> style;
|
||||
@SerializedName("jump_type")
|
||||
private String jumpType;
|
||||
@SerializedName("link")
|
||||
private String link;
|
||||
@SerializedName("button_image")
|
||||
private String buttonImage;
|
||||
@SerializedName("button_msg_cn")
|
||||
private String buttonMsgCn;
|
||||
@SerializedName("button_msg_en")
|
||||
private String buttonMsgEn;
|
||||
@SerializedName("button_style")
|
||||
private List<ButtonStyleDTO> buttonStyle;
|
||||
@SerializedName("h5_type")
|
||||
private String h5Type;
|
||||
|
||||
public String getH5Type() {
|
||||
return h5Type;
|
||||
}
|
||||
|
||||
public AllServerNotifyFFGGGDJANEvent setH5Type(String h5Type) {
|
||||
this.h5Type = h5Type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMethod() {
|
||||
return method;
|
||||
}
|
||||
|
||||
public void setMethod(String method) {
|
||||
this.method = method;
|
||||
}
|
||||
|
||||
public String getAction() {
|
||||
return action;
|
||||
}
|
||||
|
||||
public void setAction(String action) {
|
||||
this.action = action;
|
||||
}
|
||||
|
||||
public String getMsgCn() {
|
||||
return msgCn;
|
||||
}
|
||||
|
||||
public void setMsgCn(String msgCn) {
|
||||
this.msgCn = msgCn;
|
||||
}
|
||||
|
||||
public String getMsgEn() {
|
||||
return msgEn;
|
||||
}
|
||||
|
||||
public void setMsgEn(String msgEn) {
|
||||
this.msgEn = msgEn;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(String uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public String getLiveuid() {
|
||||
return liveuid;
|
||||
}
|
||||
|
||||
public void setLiveuid(String liveuid) {
|
||||
this.liveuid = liveuid;
|
||||
}
|
||||
|
||||
public String getBackgroundImage() {
|
||||
return backgroundImage;
|
||||
}
|
||||
|
||||
public void setBackgroundImage(String backgroundImage) {
|
||||
this.backgroundImage = backgroundImage;
|
||||
}
|
||||
|
||||
public List<StyleDTO> getStyle() {
|
||||
return style;
|
||||
}
|
||||
|
||||
public void setStyle(List<StyleDTO> style) {
|
||||
this.style = style;
|
||||
}
|
||||
|
||||
public String getJumpType() {
|
||||
return jumpType;
|
||||
}
|
||||
|
||||
public void setJumpType(String jumpType) {
|
||||
this.jumpType = jumpType;
|
||||
}
|
||||
|
||||
public String getLink() {
|
||||
return link;
|
||||
}
|
||||
|
||||
public void setLink(String link) {
|
||||
this.link = link;
|
||||
}
|
||||
|
||||
public String getButtonImage() {
|
||||
return buttonImage;
|
||||
}
|
||||
|
||||
public void setButtonImage(String buttonImage) {
|
||||
this.buttonImage = buttonImage;
|
||||
}
|
||||
|
||||
public String getButtonMsgCn() {
|
||||
return buttonMsgCn;
|
||||
}
|
||||
|
||||
public void setButtonMsgCn(String buttonMsgCn) {
|
||||
this.buttonMsgCn = buttonMsgCn;
|
||||
}
|
||||
|
||||
public String getButtonMsgEn() {
|
||||
return buttonMsgEn;
|
||||
}
|
||||
|
||||
public void setButtonMsgEn(String buttonMsgEn) {
|
||||
this.buttonMsgEn = buttonMsgEn;
|
||||
}
|
||||
|
||||
public List<ButtonStyleDTO> getButtonStyle() {
|
||||
return buttonStyle;
|
||||
}
|
||||
|
||||
public void setButtonStyle(List<ButtonStyleDTO> buttonStyle) {
|
||||
this.buttonStyle = buttonStyle;
|
||||
}
|
||||
|
||||
public static class StyleDTO {
|
||||
@SerializedName("str_cn")
|
||||
private String strCn;
|
||||
@SerializedName("str_en")
|
||||
private String strEn;
|
||||
@SerializedName("colour")
|
||||
private String colour;
|
||||
|
||||
public String getStrCn() {
|
||||
return strCn;
|
||||
}
|
||||
|
||||
public void setStrCn(String strCn) {
|
||||
this.strCn = strCn;
|
||||
}
|
||||
|
||||
public String getStrEn() {
|
||||
return strEn;
|
||||
}
|
||||
|
||||
public void setStrEn(String strEn) {
|
||||
this.strEn = strEn;
|
||||
}
|
||||
|
||||
public String getColour() {
|
||||
return colour;
|
||||
}
|
||||
|
||||
public void setColour(String colour) {
|
||||
this.colour = colour;
|
||||
}
|
||||
}
|
||||
|
||||
public static class ButtonStyleDTO {
|
||||
@SerializedName("str_cn")
|
||||
private String strCn;
|
||||
@SerializedName("str_en")
|
||||
private String strEn;
|
||||
@SerializedName("colour")
|
||||
private String colour;
|
||||
|
||||
public String getStrCn() {
|
||||
return strCn;
|
||||
}
|
||||
|
||||
public void setStrCn(String strCn) {
|
||||
this.strCn = strCn;
|
||||
}
|
||||
|
||||
public String getStrEn() {
|
||||
return strEn;
|
||||
}
|
||||
|
||||
public void setStrEn(String strEn) {
|
||||
this.strEn = strEn;
|
||||
}
|
||||
|
||||
public String getColour() {
|
||||
return colour;
|
||||
}
|
||||
|
||||
public void setColour(String colour) {
|
||||
this.colour = colour;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
class DragonSendsMoneyEvent extends BaseModel {
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
public class FloatWarOrderEvent extends BaseModel {
|
||||
private boolean floatWarOrder;
|
||||
|
||||
public boolean isFloatWarOrder() {
|
||||
return floatWarOrder;
|
||||
}
|
||||
|
||||
public FloatWarOrderEvent setFloatWarOrder(boolean floatWarOrder) {
|
||||
this.floatWarOrder = floatWarOrder;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
public class SendMoneyLongEndEvent extends BaseModel {
|
||||
}
|
||||
@@ -208,6 +208,10 @@ public class CommonHttpUtil {
|
||||
JSONArray levelArray = obj.getJSONArray("liveclass");
|
||||
new LiveClassManager(context).UpDataLiveClass(levelArray.toJSONString());
|
||||
}
|
||||
if (obj.containsKey("guard_type")) {
|
||||
JSONArray levelArray = obj.getJSONArray("guard_type");
|
||||
new NewLevelManager(context).upDataGuardLevel(levelArray.toJSONString());
|
||||
}
|
||||
if (obj.containsKey("apk_ver")) {
|
||||
APKManager.get().setApkVer(obj.getString("apk_ver"));
|
||||
}
|
||||
@@ -329,6 +333,8 @@ public class CommonHttpUtil {
|
||||
isGoogle = "1";
|
||||
} else if (CommonAppConfig.IS_GOOGLE_PLAY == 2) {
|
||||
isGoogle = "2";
|
||||
}else if (CommonAppConfig.IS_GOOGLE_PLAY == 3) {
|
||||
isGoogle = "3";
|
||||
} else {
|
||||
isGoogle = "-1";
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.MD5Util;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.VersionUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@@ -644,7 +645,40 @@ public class LiveHttpUtil {
|
||||
.params("appVersion", CommonAppConfig.getInstance().getVersion())
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 观众给主播送礼物 - 包裹
|
||||
*
|
||||
* @param isContactGift 是否为联系方式礼物
|
||||
*/
|
||||
public static void sendGiftForPage(String by, String liveUid, String stream, int giftId, String giftCount, int isContactGift, boolean isFansGroupGift, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Live.sendPackGift", LiveHttpConsts.SEND_GIFT)
|
||||
.params("liveuid", liveUid)
|
||||
.params("stream", stream)
|
||||
.params("giftid", giftId)
|
||||
.params("isContactGift", isContactGift)
|
||||
.params("giftcount", giftCount)
|
||||
.params("isprank", by)
|
||||
.params("fans_exclusive_pack", isFansGroupGift ? "1" : "0")
|
||||
.params("appVersion", CommonAppConfig.getInstance().getVersion())
|
||||
.execute(callback);
|
||||
}
|
||||
/**
|
||||
* 观众给主播送礼物 - 粉丝团
|
||||
*
|
||||
* @param isContactGift 是否为联系方式礼物
|
||||
*/
|
||||
public static void sendGiftForFansGroup(String by, String liveUid, String stream, int giftId, String giftCount, int isContactGift, boolean isFansGroupGift, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Live.fansExclusivePack", LiveHttpConsts.SEND_GIFT)
|
||||
.params("liveuid", liveUid)
|
||||
.params("stream", stream)
|
||||
.params("giftid", giftId)
|
||||
.params("isContactGift", isContactGift)
|
||||
.params("giftcount", giftCount)
|
||||
.params("isprank", by)
|
||||
.params("fans_exclusive_pack", isFansGroupGift ? "1" : "0")
|
||||
.params("appVersion", CommonAppConfig.getInstance().getVersion())
|
||||
.execute(callback);
|
||||
}
|
||||
public static void sendBlindBoxTicket(String by, String liveUid, String stream, int giftId, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Live.sendBlindBoxTicket", LiveHttpConsts.SEND_GIFT)
|
||||
.params("liveuid", liveUid)
|
||||
@@ -872,7 +906,11 @@ public class LiveHttpUtil {
|
||||
.params("anchorUid", anchor_id)
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
public static void getAnchorActiveImgStatus(String anchor_id, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Live.getAnchorActiveImgStatus", LiveHttpConsts.GET_EVENT)
|
||||
.params("anchorUid", anchor_id)
|
||||
.execute(callback);
|
||||
}
|
||||
/**
|
||||
* 重置活动
|
||||
*/
|
||||
@@ -1003,5 +1041,13 @@ public class LiveHttpUtil {
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取短剧Url
|
||||
*/
|
||||
public static void getCoolydrama(HttpCallback callback){
|
||||
HttpClient.getInstance().get("cool.register", "Home.getFollow")
|
||||
.params("lang", WordUtil.isNewZh()?"zh_CN":"en")
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.yunbao.common.bean.BattlePassUserInfoBean;
|
||||
import com.yunbao.common.bean.BlindBoxInfoModel;
|
||||
import com.yunbao.common.bean.CheckLiveModel;
|
||||
import com.yunbao.common.bean.CheckRemainingBalance;
|
||||
import com.yunbao.common.bean.CheckUpgradesModel;
|
||||
import com.yunbao.common.bean.ContributeModel;
|
||||
import com.yunbao.common.bean.CoolConfig;
|
||||
import com.yunbao.common.bean.CreateSudRoomModel;
|
||||
@@ -26,6 +27,8 @@ import com.yunbao.common.bean.GiftGuideModel;
|
||||
import com.yunbao.common.bean.GiftNamingInfoModel;
|
||||
import com.yunbao.common.bean.GiftWallGiftDetail;
|
||||
import com.yunbao.common.bean.GiftWallModel;
|
||||
import com.yunbao.common.bean.GuardGetGuardOpenInfoModel;
|
||||
import com.yunbao.common.bean.GuardGetGuardUserInfoModel;
|
||||
import com.yunbao.common.bean.HourRank;
|
||||
import com.yunbao.common.bean.HttpCallbackModel;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
@@ -58,7 +61,9 @@ import com.yunbao.common.bean.RedPacketDetailsBean;
|
||||
import com.yunbao.common.bean.RedPacketGiftModel;
|
||||
import com.yunbao.common.bean.RedPacketInfoModel;
|
||||
import com.yunbao.common.bean.RedPacketListBean;
|
||||
import com.yunbao.common.bean.RoomMicStatusModel;
|
||||
import com.yunbao.common.bean.SearchModel;
|
||||
import com.yunbao.common.bean.SendMoneyLongModel;
|
||||
import com.yunbao.common.bean.SetAttentsModel;
|
||||
import com.yunbao.common.bean.SlideInBannerModel;
|
||||
import com.yunbao.common.bean.StarChallengeStatusModel;
|
||||
@@ -70,6 +75,7 @@ import com.yunbao.common.bean.UserAvatarSelectBean;
|
||||
import com.yunbao.common.bean.VipModel;
|
||||
import com.yunbao.common.bean.WishListGiftConfModel;
|
||||
import com.yunbao.common.bean.WishListModel;
|
||||
import com.yunbao.common.bean.sendMoneyLongListModel;
|
||||
import com.yunbao.common.event.CheckCurrencyModel;
|
||||
|
||||
import java.util.List;
|
||||
@@ -104,7 +110,8 @@ public interface PDLiveApi {
|
||||
@Field("user_pass") String passWord,
|
||||
@Field("uuid_Device") String uuidDevice,
|
||||
@Field("pushid") String pushid,
|
||||
@Field("lastlogindevice") String lastlogindevice
|
||||
@Field("lastlogindevice") String lastlogindevice,
|
||||
@Field("langue")String langue
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -1142,16 +1149,47 @@ public interface PDLiveApi {
|
||||
Observable<ResponseModel<String>> battlePassRule();
|
||||
|
||||
@GET("/api/public/?service=Livebattlepass.addChatCount")
|
||||
Observable<ResponseModel<List<BaseModel>>> addChatCount();
|
||||
Observable<ResponseModel<List<BaseModel>>> addChatCount(@Query("stream") String stream);
|
||||
|
||||
@GET("/api/public/?service=Sudgameserver.joinMic")
|
||||
Observable<ResponseModel<List<BaseModel>>> joinMic(@Query("room_id") String roomId);
|
||||
|
||||
@GET("/api/public/?service=Sudgameserver.onMic")
|
||||
Observable<ResponseModel<List<BaseModel>>> onMic(@Query("room_id") String roomId);
|
||||
|
||||
@GET("/api/public/?service=Sudgameserver.offMic")
|
||||
Observable<ResponseModel<List<BaseModel>>> offMic(@Query("room_id") String roomId);
|
||||
|
||||
@GET("/api/public/?service=Sudgameserver.leaveMic")
|
||||
Observable<ResponseModel<List<BaseModel>>> leaveMic(@Query("room_id") String roomId);
|
||||
|
||||
@GET("/api/public/?service=Sudgameserver.getRoomMicData")
|
||||
Observable<ResponseModel<List<SudGameUserModel>>> getRoomMicData(@Query("room_id") String roomId);
|
||||
|
||||
@GET("/api/public/?service=Sudgameserver.getRoomMicStatus")
|
||||
Observable<ResponseModel<RoomMicStatusModel>> getRoomMicStatus();
|
||||
|
||||
@GET("/api/public/?service=Guard.getGuardUserInfo")
|
||||
Observable<ResponseModel<GuardGetGuardUserInfoModel>> getGuardUserInfo(@Query("liveuid") String liveUid);
|
||||
|
||||
@GET("/api/public/?service=Guard.getGuardOpenInfo")
|
||||
Observable<ResponseModel<GuardGetGuardOpenInfoModel>> getGuardOpenInfo(@Query("liveuid") String liveUid);
|
||||
|
||||
@GET("/api/public/?service=Guard.openGuard")
|
||||
Observable<ResponseModel<Object>> openGuard(@Query("liveuid") String liveUid, @Query("guard_type") String guardType, @Query("price_key") String priceKey, @Query("stream") String stream);
|
||||
|
||||
@GET("/api/public/?service=Guard.sendMoneyLong")
|
||||
Observable<ResponseModel<Object>> sendMoneyLong(@Query("liveuid") String liveUid, @Query("gold_num") String goldNum);
|
||||
|
||||
@GET("/api/public/?service=Guard.sendMoneyLongList")
|
||||
Observable<ResponseModel<List<sendMoneyLongListModel>>> sendMoneyLongList(@Query("liveuid") String liveUid);
|
||||
|
||||
@GET("/api/public/?service=Guard.participateMoneyLong")
|
||||
Observable<ResponseModel<String>> participateMoneyLong(@Query("liveuid") String liveUid, @Query("send_money_long_key") String sendMoneyLongKey);
|
||||
@GET("/api/public/?service=Guard.endSendMoneyLong")
|
||||
Observable<ResponseModel<SendMoneyLongModel>> endSendMoneyLong(@Query("liveuid") String liveUid, @Query("send_money_long_key") String sendMoneyLongKey);
|
||||
@GET("/api/public/?service=Guard.checkUpgrades")
|
||||
Observable<ResponseModel<CheckUpgradesModel>> checkUpgrades(@Query("liveuid") String liveUid);
|
||||
@GET("/api/public/?service=Guard.getRewards")
|
||||
Observable<ResponseModel<Object>> guardGetRewards(@Query("guard_level") String guardLevel,@Query("liveuid") String liveUid);
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.yunbao.common.bean.BattlePassUserInfoBean;
|
||||
import com.yunbao.common.bean.BlindBoxInfoModel;
|
||||
import com.yunbao.common.bean.CheckLiveModel;
|
||||
import com.yunbao.common.bean.CheckRemainingBalance;
|
||||
import com.yunbao.common.bean.CheckUpgradesModel;
|
||||
import com.yunbao.common.bean.CoolConfig;
|
||||
import com.yunbao.common.bean.CreateSudRoomModel;
|
||||
import com.yunbao.common.bean.CustomSidebarInfoModel;
|
||||
@@ -27,6 +28,8 @@ import com.yunbao.common.bean.GiftGuideModel;
|
||||
import com.yunbao.common.bean.GiftNamingInfoModel;
|
||||
import com.yunbao.common.bean.GiftWallGiftDetail;
|
||||
import com.yunbao.common.bean.GiftWallModel;
|
||||
import com.yunbao.common.bean.GuardGetGuardOpenInfoModel;
|
||||
import com.yunbao.common.bean.GuardGetGuardUserInfoModel;
|
||||
import com.yunbao.common.bean.HttpCallbackModel;
|
||||
import com.yunbao.common.bean.LinkMicUserBean;
|
||||
import com.yunbao.common.bean.LinkMicUserBeanV2;
|
||||
@@ -56,6 +59,8 @@ import com.yunbao.common.bean.RedPacketDetailsBean;
|
||||
import com.yunbao.common.bean.RedPacketGiftModel;
|
||||
import com.yunbao.common.bean.RedPacketInfoModel;
|
||||
import com.yunbao.common.bean.RedPacketListBean;
|
||||
import com.yunbao.common.bean.RoomMicStatusModel;
|
||||
import com.yunbao.common.bean.SendMoneyLongModel;
|
||||
import com.yunbao.common.bean.SetAttentsModel;
|
||||
import com.yunbao.common.bean.StarChallengeStatusModel;
|
||||
import com.yunbao.common.bean.SudGameUserModel;
|
||||
@@ -66,6 +71,7 @@ import com.yunbao.common.bean.UserAvatarSelectBean;
|
||||
import com.yunbao.common.bean.VipModel;
|
||||
import com.yunbao.common.bean.WishListGiftConfModel;
|
||||
import com.yunbao.common.bean.WishListModel;
|
||||
import com.yunbao.common.bean.sendMoneyLongListModel;
|
||||
import com.yunbao.common.event.CheckCurrencyModel;
|
||||
import com.yunbao.common.http.API;
|
||||
import com.yunbao.common.http.ResponseModel;
|
||||
@@ -2674,9 +2680,7 @@ public class LiveNetManager {
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(responseModel -> {
|
||||
if (callback != null) {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(new HttpCallbackModel(responseModel.getData().getCode(), responseModel.getData().getMsg()));
|
||||
}
|
||||
callback.onSuccess(new HttpCallbackModel(responseModel.getData().getCode(), responseModel.getData().getMsg()));
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
@@ -2771,9 +2775,9 @@ public class LiveNetManager {
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void addChatCount(HttpCallback<HttpCallbackModel> callback) {
|
||||
public void addChatCount(String stream, HttpCallback<HttpCallbackModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.addChatCount()
|
||||
.addChatCount(stream)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(responseModel -> {
|
||||
@@ -2908,6 +2912,254 @@ public class LiveNetManager {
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void getRoomMicStatus(HttpCallback<RoomMicStatusModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getRoomMicStatus()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<RoomMicStatusModel>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<RoomMicStatusModel> roomMicStatusModelResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(roomMicStatusModelResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
throwable.printStackTrace();
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
|
||||
}
|
||||
|
||||
public void getGuardUserInfo(String liveUid, HttpCallback<GuardGetGuardUserInfoModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getGuardUserInfo(liveUid)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<GuardGetGuardUserInfoModel>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<GuardGetGuardUserInfoModel> guardGetGuardUserInfoModelResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(guardGetGuardUserInfoModelResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
throwable.printStackTrace();
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
|
||||
}
|
||||
|
||||
public void getGuardOpenInfo(String liveUid, HttpCallback<GuardGetGuardOpenInfoModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getGuardOpenInfo(liveUid)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<GuardGetGuardOpenInfoModel>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<GuardGetGuardOpenInfoModel> guardGetGuardOpenInfoModelResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(guardGetGuardOpenInfoModelResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
throwable.printStackTrace();
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
|
||||
}
|
||||
|
||||
public void openGuard(String liveUid, String guardType, String priceKey, String stream, HttpCallback<String> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.openGuard(liveUid, guardType, priceKey, stream)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<Object>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<Object> stringResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
if (stringResponseModel.getData().getCode() == 0) {
|
||||
callback.onSuccess(stringResponseModel.getData().getMsg());
|
||||
} else if (stringResponseModel.getData().getCode() == 1001) {
|
||||
callback.onSuccess("22");
|
||||
} else {
|
||||
callback.onError(stringResponseModel.getData().getMsg());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
throwable.printStackTrace();
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
|
||||
}
|
||||
|
||||
public void sendMoneyLongList(String liveUid, HttpCallback<List<sendMoneyLongListModel>> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.sendMoneyLongList(liveUid)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<List<sendMoneyLongListModel>>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<List<sendMoneyLongListModel>> stringResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(stringResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
throwable.printStackTrace();
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
|
||||
}
|
||||
|
||||
public void sendMoneyLong(String liveUid, String goldNum, HttpCallback<String> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.sendMoneyLong(liveUid, goldNum)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<Object>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<Object> stringResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(stringResponseModel.getData().getMsg());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
throwable.printStackTrace();
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
|
||||
}
|
||||
|
||||
public void participateMoneyLong(String liveUid, String sendMoneyLongKey, HttpCallback<String> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.participateMoneyLong(liveUid, sendMoneyLongKey)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<String>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<String> stringResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(stringResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
throwable.printStackTrace();
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void endSendMoneyLong(String liveUid, String sendMoneyLongKey, HttpCallback<SendMoneyLongModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.endSendMoneyLong(liveUid, sendMoneyLongKey)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<SendMoneyLongModel>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<SendMoneyLongModel> stringResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(stringResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
throwable.printStackTrace();
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
|
||||
}
|
||||
|
||||
public void checkUpgrades(String liveUid, HttpCallback<CheckUpgradesModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.checkUpgrades(liveUid)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<CheckUpgradesModel>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<CheckUpgradesModel> listResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
throwable.printStackTrace();
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
|
||||
}
|
||||
|
||||
public void guardGetRewards(String guardLevel, String liveUid, HttpCallback<Object> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.guardGetRewards("0", liveUid)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<Object>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<Object> listResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
throwable.printStackTrace();
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 直播间取消网络请求
|
||||
*/
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.yunbao.common.http.API;
|
||||
import com.yunbao.common.http.ResponseData;
|
||||
import com.yunbao.common.http.ResponseModel;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -54,7 +55,7 @@ public class MainNetManager {
|
||||
* @param callback 网络请求回调
|
||||
*/
|
||||
public void login(String phoneNum, String pwd, String uuid, HttpCallback<IMLoginModel> callback) {
|
||||
API.get().pdLiveApi(mContext).loginByManager(phoneNum, pwd, uuid, "", "Android")
|
||||
API.get().pdLiveApi(mContext).loginByManager(phoneNum, pwd, uuid, "", "Android", WordUtil.isNewZh()?"chinese":"english")
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<IMLoginModel>>() {
|
||||
|
||||
@@ -8,6 +8,7 @@ import android.text.TextUtils;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.google.gson.Gson;
|
||||
import com.lzf.easyfloat.EasyFloat;
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
@@ -16,6 +17,7 @@ import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.event.DataUserInfoEvent;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.HttpClient;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.manager.base.BaseCacheManager;
|
||||
import com.yunbao.common.manager.imrongcloud.MessageIMManager;
|
||||
import com.yunbao.common.manager.imrongcloud.RongcloudIMManager;
|
||||
@@ -52,6 +54,15 @@ public class IMLoginManager extends BaseCacheManager {
|
||||
|
||||
private final String KEY_LANGUAGE = "language";
|
||||
private final String KEY_GAME = "key_game";
|
||||
private final String GUARD_TYPE = "key_GUARD_TYPE";
|
||||
|
||||
public void setGuardType(int guardType) {
|
||||
put(GUARD_TYPE, guardType);
|
||||
}
|
||||
|
||||
public int getGuardType() {
|
||||
return getInt(GUARD_TYPE, 0);
|
||||
}
|
||||
|
||||
public void setRedPoint() {
|
||||
put("RedPoint", "1");
|
||||
@@ -60,7 +71,24 @@ public class IMLoginManager extends BaseCacheManager {
|
||||
public boolean getRedPoint() {
|
||||
return !TextUtils.isEmpty(getString("RedPoint")) || !TextUtils.equals(getString("RedPoint"), "1");
|
||||
}
|
||||
public void setQuickGiftIfFirst() {
|
||||
|
||||
public void setGuardRedPoint() {
|
||||
put("GuardRedPoint", "1");
|
||||
}
|
||||
|
||||
public boolean getGuardRedPoint() {
|
||||
String GuardRedPoint = getString("GuardRedPoint");
|
||||
if (TextUtils.isEmpty(GuardRedPoint)) {
|
||||
return true;
|
||||
}
|
||||
if (!TextUtils.equals(GuardRedPoint, "1")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setQuickGiftIfFirst() {
|
||||
put("quick_gift_if_first", "1");
|
||||
}
|
||||
|
||||
@@ -510,4 +538,40 @@ public class IMLoginManager extends BaseCacheManager {
|
||||
});
|
||||
}
|
||||
|
||||
public void updateUserCoin() {
|
||||
HttpClient.getInstance().get("User.getUserBalance", "User.getUserBalance")
|
||||
.execute(new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
JSONObject obj = JSONObject.parseObject(info[0]);
|
||||
String golds = obj.getString("gold");
|
||||
String coins = obj.getString("coin");
|
||||
String yuanbaos = obj.getString("yuanbao");
|
||||
userInfo.setCoin(obj.getLong("coin"));
|
||||
userInfo.setGold(obj.getLong("gold"));
|
||||
userInfo.setYuanbao(yuanbaos);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void updateUserCoin(OnItemClickListener<JSONObject> listener) {
|
||||
HttpClient.getInstance().get("User.getUserBalance", "User.getUserBalance")
|
||||
.execute(new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
JSONObject obj = JSONObject.parseObject(info[0]);
|
||||
listener.onItemClick(obj, 0);
|
||||
String golds = obj.getString("gold");
|
||||
String coins = obj.getString("coin");
|
||||
String yuanbaos = obj.getString("yuanbao");
|
||||
userInfo.setCoin(obj.getLong("coin"));
|
||||
userInfo.setGold(obj.getLong("gold"));
|
||||
userInfo.setYuanbao(yuanbaos);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.content.Context;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.yunbao.common.bean.FansModel;
|
||||
import com.yunbao.common.bean.NewGuardLevelModel;
|
||||
import com.yunbao.common.bean.NewLevelModel;
|
||||
import com.yunbao.common.manager.base.BaseCacheManager;
|
||||
|
||||
@@ -19,10 +20,12 @@ public class NewLevelManager extends BaseCacheManager {
|
||||
private final String KEY_ANCHOR_LEVEL = "keyAnchorLevel";
|
||||
private final String KEY_LIVE_LEVEL = "keyLiveLevel";
|
||||
private final String KEY_FANS_LEVEL = "keyFansLevel";
|
||||
private final String KEY_GUARD_LEVEL = "keyGuardLevel";
|
||||
|
||||
private List<NewLevelModel> newLevelModels = new ArrayList<>();
|
||||
private List<NewLevelModel> keyAnchorLevel = new ArrayList<>();
|
||||
private List<FansModel> fansModels = new ArrayList<>();
|
||||
private List<NewGuardLevelModel> newGuardLevelModels = new ArrayList<>();
|
||||
|
||||
public NewLevelManager(Context context) {
|
||||
super(context);
|
||||
@@ -62,6 +65,29 @@ public class NewLevelManager extends BaseCacheManager {
|
||||
return fansModel;
|
||||
}
|
||||
|
||||
public void upDataGuardLevel(String json) {
|
||||
newGuardLevelModels = new Gson().fromJson(json, new TypeToken<List<NewGuardLevelModel>>() {
|
||||
}.getType());
|
||||
put(KEY_GUARD_LEVEL, newGuardLevelModels);
|
||||
}
|
||||
|
||||
public List<NewGuardLevelModel> getGuardLevel() {
|
||||
newGuardLevelModels = getList(KEY_GUARD_LEVEL, new TypeToken<List<NewGuardLevelModel>>() {
|
||||
}.getType());
|
||||
return newGuardLevelModels;
|
||||
}
|
||||
|
||||
public NewGuardLevelModel getGuardModel(int type) {
|
||||
getGuardLevel();
|
||||
NewGuardLevelModel guardLevelModel = null;
|
||||
for (NewGuardLevelModel model : newGuardLevelModels) {
|
||||
if (model.getGuardType() == type) {
|
||||
guardLevelModel = model;
|
||||
}
|
||||
}
|
||||
return guardLevelModel;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取等级数据
|
||||
*
|
||||
|
||||
@@ -245,7 +245,7 @@ public class GameMicManager {
|
||||
|
||||
|
||||
try {
|
||||
getView().onSubscribeSuccess(userID,mute,position);
|
||||
getView().onSubscribeSuccess(userID, mute, position);
|
||||
} catch (IllegalStateException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -355,39 +355,44 @@ public class GameMicManager {
|
||||
RCRTCEngine.getInstance().getDefaultAudioStream().setAudioQuality(RCRTCParamsType.AudioQuality.MUSIC_HIGH, RCRTCParamsType.AudioScenario.MUSIC_CHATROOM);
|
||||
}
|
||||
|
||||
public void joinRoom(String roomId) {
|
||||
public void joinRoom(String roomId, boolean imOff) {
|
||||
mRoomID = roomId;
|
||||
RCRTCRoomConfig roomConfig = RCRTCRoomConfig.Builder.create()
|
||||
// 根据实际场景,选择音视频直播:LIVE_AUDIO_VIDEO 或音频直播:LIVE_AUDIO
|
||||
.setRoomType(RCRTCRoomType.MEETING)
|
||||
if (imOff) {
|
||||
|
||||
.build();
|
||||
RCRTCEngine.getInstance().joinRoom("v" + roomId, roomConfig, new IRCRTCResultDataCallback<RCRTCRoom>() {
|
||||
@Override
|
||||
public void onSuccess(final RCRTCRoom rcrtcRoom) {
|
||||
GameMicManager.this.mRtcRoom = rcrtcRoom;
|
||||
// 注册房间回调
|
||||
rcrtcRoom.registerRoomListener(roomEventsListener);
|
||||
try {
|
||||
getView().onJoinRoomSuccess(rcrtcRoom);
|
||||
} catch (IllegalStateException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
RCRTCRoomConfig roomConfig = RCRTCRoomConfig.Builder.create()
|
||||
// 根据实际场景,选择音视频直播:LIVE_AUDIO_VIDEO 或音频直播:LIVE_AUDIO
|
||||
.setRoomType(RCRTCRoomType.MEETING)
|
||||
|
||||
@Override
|
||||
public void onFailed(RTCErrorCode rtcErrorCode) {
|
||||
try {
|
||||
getView().onJoinRoomFailed(rtcErrorCode);
|
||||
} catch (IllegalStateException e) {
|
||||
e.printStackTrace();
|
||||
.build();
|
||||
RCRTCEngine.getInstance().joinRoom("v" + roomId, roomConfig, new IRCRTCResultDataCallback<RCRTCRoom>() {
|
||||
@Override
|
||||
public void onSuccess(final RCRTCRoom rcrtcRoom) {
|
||||
GameMicManager.this.mRtcRoom = rcrtcRoom;
|
||||
// 注册房间回调
|
||||
rcrtcRoom.registerRoomListener(roomEventsListener);
|
||||
try {
|
||||
getView().onJoinRoomSuccess(rcrtcRoom);
|
||||
} catch (IllegalStateException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@Override
|
||||
public void onFailed(RTCErrorCode rtcErrorCode) {
|
||||
try {
|
||||
getView().onJoinRoomFailed(rtcErrorCode);
|
||||
} catch (IllegalStateException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
RongChatRoomClient.getInstance().joinChatRoom("v" + roomId, -1, new IRongCoreCallback.OperationCallback() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
Log.i("tx", "加入成功");
|
||||
enterRoom();
|
||||
|
||||
}
|
||||
|
||||
@@ -436,7 +441,18 @@ public class GameMicManager {
|
||||
SudGameSocketImEvent.MsgDTO msgDTO = msgDTOS.get(0);
|
||||
//正常文字消息
|
||||
if (TextUtils.equals(msgDTO.getMethod(), "SendMsg")) {
|
||||
getView().insertItem(new SudGameChatImModel().setNickname(msgDTO.getUname()).setTextMessage(msgDTO.getCt()));
|
||||
getView().insertItem(new SudGameChatImModel().setWelcomMessage(false).setNickname(msgDTO.getUname()).setTextMessage(msgDTO.getCt()));
|
||||
} else if (TextUtils.equals(msgDTO.getMethod(), "welcomMessage")) {
|
||||
// 欢迎(用户名)进入房间 Welcome (username) to the room
|
||||
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
if (WordUtil.isNewZh()) {
|
||||
stringBuffer.append("歡迎 ").append(msgDTO.getCt()).append(" 進入房間");
|
||||
} else {
|
||||
stringBuffer.append("Welcome ").append(msgDTO.getCt()).append(" to enter the room");
|
||||
}
|
||||
|
||||
getView().insertItem(new SudGameChatImModel().setWelcomMessage(true).setNickname(msgDTO.getCt()).setTextMessage(stringBuffer.toString()));
|
||||
} else if (TextUtils.equals(msgDTO.getMethod(), "sudGameRoomVoiceList")) {
|
||||
List<SudGameUserModel> personList = new Gson().fromJson(msgDTO.getCt(), new TypeToken<List<SudGameUserModel>>() {
|
||||
}.getType());
|
||||
@@ -447,12 +463,7 @@ public class GameMicManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送聊天信息
|
||||
*
|
||||
* @param textMessage
|
||||
*/
|
||||
public void sendMessage(String textMessage) {
|
||||
private void sendChatMessage(String textMessage, String method) {
|
||||
IMLoginModel loginModel = IMLoginManager.get(CommonAppContext.sInstance.getApplicationContext()).getUserInfo();
|
||||
SudGameSocketImEvent sudGameSocketImEvent = new SudGameSocketImEvent();
|
||||
sudGameSocketImEvent.setRetcode("000000");
|
||||
@@ -463,7 +474,7 @@ public class GameMicManager {
|
||||
.setCt(textMessage)
|
||||
.setEquipment("app")
|
||||
.setUid(String.valueOf(loginModel.getId()))
|
||||
.setMethod("SendMsg")
|
||||
.setMethod(method)
|
||||
.setUname(loginModel.getUserNicename())
|
||||
.setRoomnum(mRoomID);
|
||||
|
||||
@@ -490,11 +501,28 @@ public class GameMicManager {
|
||||
|
||||
@Override
|
||||
public void onError(Message message, RongIMClient.ErrorCode errorCode) {
|
||||
|
||||
Log.i("tx", "发送成功" + errorCode.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送聊天信息
|
||||
*
|
||||
* @param textMessage
|
||||
*/
|
||||
public void sendMessage(String textMessage) {
|
||||
sendChatMessage(textMessage, "SendMsg");
|
||||
}
|
||||
|
||||
/**
|
||||
* 进房间
|
||||
*/
|
||||
public void enterRoom() {
|
||||
IMLoginModel loginModel = IMLoginManager.get(CommonAppContext.sInstance.getApplicationContext()).getUserInfo();
|
||||
sendChatMessage(loginModel.getUserNicename(), "welcomMessage");
|
||||
}
|
||||
|
||||
/**
|
||||
* activity相关回调
|
||||
*/
|
||||
@@ -515,9 +543,11 @@ public class GameMicManager {
|
||||
void onSubscribeSuccess(List<RCRTCInputStream> inputStreamList);
|
||||
|
||||
void onSubscribeFailed();
|
||||
void onSubscribeSuccess(String userID,boolean mute, int position);
|
||||
|
||||
void onSubscribeSuccess(String userID, boolean mute, int position);
|
||||
|
||||
void onSubscribeFailed(String userID);
|
||||
|
||||
void onUserJoined(RCRTCRemoteUser rcrtcRemoteUser);
|
||||
|
||||
void onUserLeft(RCRTCRemoteUser rcrtcRemoteUser);
|
||||
|
||||
@@ -66,6 +66,7 @@ public class RongcloudIMManager {
|
||||
SpeechUtility.createUtility(application.getApplicationContext(), params);
|
||||
}
|
||||
|
||||
|
||||
private static RongIMClient.OnReceiveMessageWrapperListener mListener;
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,7 +11,6 @@ import com.samsung.android.sdk.iap.lib.listener.OnPaymentListener;
|
||||
import com.samsung.android.sdk.iap.lib.vo.ConsumeVo;
|
||||
import com.samsung.android.sdk.iap.lib.vo.ErrorVo;
|
||||
import com.samsung.android.sdk.iap.lib.vo.OwnedProductVo;
|
||||
import com.samsung.android.sdk.iap.lib.vo.PurchaseVo;
|
||||
import com.yunbao.common.utils.L;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -41,9 +40,16 @@ public class SamsungUtil {
|
||||
public void init() {
|
||||
iapHelper = IapHelper.getInstance(mContext);
|
||||
//设置支付模式 OPERATION_MODE_PRODUCTION 正式模式 OPERATION_MODE_TEST 测试模式
|
||||
iapHelper.setOperationMode(HelperDefine.OperationMode.OPERATION_MODE_TEST);
|
||||
iapHelper.setOperationMode(HelperDefine.OperationMode.OPERATION_MODE_PRODUCTION);
|
||||
}
|
||||
|
||||
public void dispose() {
|
||||
if (iapHelper != null) {
|
||||
iapHelper.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 购买
|
||||
*
|
||||
|
||||
@@ -9,6 +9,8 @@ import android.view.ViewTreeObserver;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
|
||||
/**
|
||||
* 修复全屏WebView输入法遮挡输入框的问题
|
||||
* <a href="https://github.com/madebycm/AndroidBug5497Workaround/tree/master">GitHub</a>
|
||||
@@ -21,11 +23,14 @@ public class AndroidBug5497Workaround {
|
||||
public static void assistActivity(Activity activity) {
|
||||
new AndroidBug5497Workaround(activity);
|
||||
}
|
||||
public static void assistActivity(View webView) {
|
||||
new AndroidBug5497Workaround(webView);
|
||||
}
|
||||
|
||||
private View mChildOfContent;
|
||||
private int usableHeightPrevious;
|
||||
private int defHeight = ViewGroup.LayoutParams.MATCH_PARENT;
|
||||
private FrameLayout.LayoutParams frameLayoutParams;
|
||||
private ViewGroup.LayoutParams frameLayoutParams;
|
||||
|
||||
private AndroidBug5497Workaround(Activity activity) {
|
||||
FrameLayout content = (FrameLayout) activity.findViewById(android.R.id.content);
|
||||
@@ -34,6 +39,7 @@ public class AndroidBug5497Workaround {
|
||||
public void onGlobalLayout() {
|
||||
possiblyResizeChildOfContent();
|
||||
int heightDiff = mChildOfContent.getRootView().getHeight() - mChildOfContent.getHeight();
|
||||
System.out.println("heightDiff = " + heightDiff);
|
||||
if (heightDiff < 100) {
|
||||
frameLayoutParams.height = defHeight;
|
||||
mChildOfContent.requestLayout();
|
||||
@@ -41,7 +47,24 @@ public class AndroidBug5497Workaround {
|
||||
}
|
||||
});
|
||||
|
||||
frameLayoutParams = (FrameLayout.LayoutParams) mChildOfContent.getLayoutParams();
|
||||
frameLayoutParams = (ViewGroup.LayoutParams) mChildOfContent.getLayoutParams();
|
||||
}
|
||||
|
||||
public AndroidBug5497Workaround(View content) {
|
||||
mChildOfContent = content;
|
||||
mChildOfContent.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
||||
public void onGlobalLayout() {
|
||||
possiblyResizeChildOfContent();
|
||||
int heightDiff = mChildOfContent.getRootView().getHeight() - mChildOfContent.getHeight();
|
||||
System.out.println("heightDiff = " + heightDiff);
|
||||
if (heightDiff < 100) {
|
||||
frameLayoutParams.height = defHeight;
|
||||
mChildOfContent.requestLayout();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
frameLayoutParams = (ViewGroup.LayoutParams) mChildOfContent.getLayoutParams();
|
||||
}
|
||||
|
||||
private void possiblyResizeChildOfContent() {
|
||||
@@ -51,7 +74,7 @@ public class AndroidBug5497Workaround {
|
||||
int heightDifference = usableHeightSansKeyboard - usableHeightNow;
|
||||
if (heightDifference > (usableHeightSansKeyboard / 4)) {
|
||||
// keyboard probably just became visible
|
||||
frameLayoutParams.height = usableHeightSansKeyboard - heightDifference;
|
||||
frameLayoutParams.height = usableHeightSansKeyboard - heightDifference - AbsActivity.getCurrentNavigationBarHeight((Activity) mChildOfContent.getContext());
|
||||
} else {
|
||||
// keyboard probably just became hidden
|
||||
frameLayoutParams.height = usableHeightSansKeyboard;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.yunbao.common.utils;
|
||||
|
||||
import com.yunbao.common.http.Data;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
@@ -13,10 +15,13 @@ public class DateFormatUtil {
|
||||
private static SimpleDateFormat sFormat2;
|
||||
private static SimpleDateFormat sFormat3;
|
||||
|
||||
private static SimpleDateFormat sFormat4;
|
||||
|
||||
static {
|
||||
sFormat = new SimpleDateFormat("yyyyMMddHHmmssSSS");
|
||||
sFormat2 = new SimpleDateFormat("yyyyMMdd_HHmmss_SSS");
|
||||
sFormat3 = new SimpleDateFormat("MM.dd-HH:mm:ss");
|
||||
sFormat4 = new SimpleDateFormat("yyyy年MM月dd日 HH:mm");
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +29,14 @@ public class DateFormatUtil {
|
||||
return sFormat.format(new Date());
|
||||
}
|
||||
|
||||
public static String getTimeString(long time) {
|
||||
Date date = new Date(time); // 创建Date对象并传入时间戳参数
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); // 设置日期格式
|
||||
String formattedDate = sdf.format(date); // 格式化日期字符串
|
||||
return formattedDate;
|
||||
}
|
||||
|
||||
|
||||
public static String getVideoCurTimeString() {
|
||||
return sFormat2.format(new Date());
|
||||
}
|
||||
|
||||
@@ -69,7 +69,8 @@ public class DialogUitl {
|
||||
}
|
||||
return dialog;
|
||||
}
|
||||
public static void showToast(Context context,String content,long delayMillis){
|
||||
|
||||
public static void showToast(Context context, String content, long delayMillis) {
|
||||
Dialog dialog = new Dialog(context, R.style.dialog);
|
||||
dialog.setContentView(R.layout.dialog_toast);
|
||||
dialog.setCancelable(false);
|
||||
@@ -82,7 +83,7 @@ public class DialogUitl {
|
||||
}
|
||||
}
|
||||
dialog.show();
|
||||
new Handler(Looper.getMainLooper()).postDelayed(dialog::dismiss,delayMillis);
|
||||
new Handler(Looper.getMainLooper()).postDelayed(dialog::dismiss, delayMillis);
|
||||
}
|
||||
|
||||
|
||||
@@ -94,6 +95,16 @@ public class DialogUitl {
|
||||
showSimpleTipDialog(context, null, content);
|
||||
}
|
||||
|
||||
public static void showBackDialog(Context context, String content, String cancel, String sure, SimpleCallback callback) {
|
||||
if (context instanceof Activity) {
|
||||
if (((Activity) context).isDestroyed() || ((Activity) context).isFinishing()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
new Builder(context).setTitle(content).setCancelable(true).isShowContent(false).setCancelString(cancel).setConfirmString(sure).setClickCallback(callback).build().show();
|
||||
}
|
||||
|
||||
|
||||
public static void showSimpleTipDialog(Context context, String title, String content) {
|
||||
if (context instanceof Activity) {
|
||||
if (((Activity) context).isDestroyed() || ((Activity) context).isFinishing()) {
|
||||
@@ -121,6 +132,38 @@ public class DialogUitl {
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
|
||||
public static void showDelSysMsg(Context context, String content, SimpleCallback simpleCallback) {
|
||||
if (context instanceof Activity) {
|
||||
if (((Activity) context).isDestroyed() || ((Activity) context).isFinishing()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
final Dialog dialog = new Dialog(context, R.style.dialog2);
|
||||
dialog.setContentView(R.layout.dialog_del_sys_msg);
|
||||
dialog.setCancelable(true);
|
||||
dialog.setCanceledOnTouchOutside(true);
|
||||
if (!TextUtils.isEmpty(content)) {
|
||||
TextView contentTextView = (TextView) dialog.findViewById(R.id.content);
|
||||
contentTextView.setText(content);
|
||||
}
|
||||
dialog.findViewById(R.id.btn_cancel).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
dialog.findViewById(R.id.btn_confirm).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
simpleCallback.onConfirmClick(dialog, "");
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
|
||||
public static void showSimpleDialog(Context context, String content, SimpleCallback callback) {
|
||||
showSimpleDialog(context, content, false, callback);
|
||||
}
|
||||
@@ -135,13 +178,7 @@ public class DialogUitl {
|
||||
return;
|
||||
}
|
||||
}
|
||||
new Builder(context)
|
||||
.setTitle(title)
|
||||
.setContent(content)
|
||||
.setCancelable(cancelable)
|
||||
.setClickCallback(callback)
|
||||
.build()
|
||||
.show();
|
||||
new Builder(context).setTitle(title).setContent(content).setCancelable(cancelable).setClickCallback(callback).build().show();
|
||||
}
|
||||
|
||||
public static void showSimpleDialog(Context context, String title, String content, boolean cancelable, SimpleCallback3 callback) {
|
||||
@@ -150,13 +187,7 @@ public class DialogUitl {
|
||||
return;
|
||||
}
|
||||
}
|
||||
new Builder(context)
|
||||
.setTitle(title)
|
||||
.setContent(content)
|
||||
.setCancelable(cancelable)
|
||||
.setClickCallback3(callback)
|
||||
.build()
|
||||
.show();
|
||||
new Builder(context).setTitle(title).setContent(content).setCancelable(cancelable).setClickCallback3(callback).build().show();
|
||||
}
|
||||
|
||||
public static void showSimpleInputDialog(Context context, String title, String hint, int inputType, int length, SimpleCallback callback) {
|
||||
@@ -165,15 +196,7 @@ public class DialogUitl {
|
||||
return;
|
||||
}
|
||||
}
|
||||
new Builder(context).setTitle(title)
|
||||
.setCancelable(true)
|
||||
.setInput(true)
|
||||
.setHint(hint)
|
||||
.setInputType(inputType)
|
||||
.setLength(length)
|
||||
.setClickCallback(callback)
|
||||
.build()
|
||||
.show();
|
||||
new Builder(context).setTitle(title).setCancelable(true).setInput(true).setHint(hint).setInputType(inputType).setLength(length).setClickCallback(callback).build().show();
|
||||
}
|
||||
|
||||
|
||||
@@ -338,6 +361,7 @@ public class DialogUitl {
|
||||
private String mHint;
|
||||
private int mInputType;
|
||||
private int mLength;
|
||||
boolean isShowContent = true;
|
||||
private SimpleCallback mClickCallback;
|
||||
private SimpleCallback3 mClickCallback3;
|
||||
private SimpleCallbackView mSimpleCallbackView;
|
||||
@@ -380,6 +404,11 @@ public class DialogUitl {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder isShowContent(boolean isShow) {
|
||||
isShowContent = isShow;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setCancelable(boolean cancelable) {
|
||||
mCancelable = cancelable;
|
||||
return this;
|
||||
@@ -458,6 +487,9 @@ public class DialogUitl {
|
||||
if (mLength > 0 && content instanceof EditText) {
|
||||
content.setFilters(new InputFilter[]{new InputFilter.LengthFilter(mLength)});
|
||||
}
|
||||
if (!isShowContent) {
|
||||
content.setVisibility(View.GONE);
|
||||
}
|
||||
TextView btnConfirm = (TextView) dialog.findViewById(R.id.btn_confirm);
|
||||
if (!TextUtils.isEmpty(mConfirmString)) {
|
||||
btnConfirm.setText(mConfirmString);
|
||||
@@ -483,8 +515,8 @@ public class DialogUitl {
|
||||
mClickCallback3.onConfirmClick(dialog);
|
||||
}
|
||||
if (mSimpleCallbackView != null) {
|
||||
mSimpleCallbackView.onConfirmClick(dialog,titleView, content, btnConfirm, btnCancel);
|
||||
}else{
|
||||
mSimpleCallbackView.onConfirmClick(dialog, titleView, content, btnConfirm, btnCancel);
|
||||
} else {
|
||||
dialog.dismiss();
|
||||
}
|
||||
|
||||
@@ -501,8 +533,8 @@ public class DialogUitl {
|
||||
((SimpleCallback2) mClickCallback).onCancelClick();
|
||||
}
|
||||
if (mSimpleCallbackView != null) {
|
||||
mSimpleCallbackView.onCancel(dialog,titleView, content, btnConfirm, btnCancel);
|
||||
}else{
|
||||
mSimpleCallbackView.onCancel(dialog, titleView, content, btnConfirm, btnCancel);
|
||||
} else {
|
||||
dialog.dismiss();
|
||||
}
|
||||
}
|
||||
@@ -510,17 +542,17 @@ public class DialogUitl {
|
||||
}
|
||||
}
|
||||
};
|
||||
if(btnConfirm!=null) {
|
||||
if (btnConfirm != null) {
|
||||
btnConfirm.setOnClickListener(listener);
|
||||
}
|
||||
if(btnCancel!=null) {
|
||||
if (btnCancel != null) {
|
||||
btnCancel.setOnClickListener(listener);
|
||||
}
|
||||
dialog.setOnShowListener(new DialogInterface.OnShowListener() {
|
||||
@Override
|
||||
public void onShow(DialogInterface dialogInterface) {
|
||||
if (mSimpleCallbackView != null) {
|
||||
mSimpleCallbackView.onShow(dialog,titleView, content, btnConfirm, btnCancel);
|
||||
mSimpleCallbackView.onShow(dialog, titleView, content, btnConfirm, btnCancel);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -563,8 +595,7 @@ public class DialogUitl {
|
||||
/**
|
||||
* 城市选择
|
||||
*/
|
||||
public static void showCityChooseDialog(Activity activity, ArrayList<Province> list,
|
||||
String province, String city, String district, AddressPicker.OnAddressPickListener listener) {
|
||||
public static void showCityChooseDialog(Activity activity, ArrayList<Province> list, String province, String city, String district, AddressPicker.OnAddressPickListener listener) {
|
||||
AddressPicker picker = new AddressPicker(activity, list);
|
||||
picker.setTextColor(0xff323232);
|
||||
picker.setDividerColor(0xffdcdcdc);
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.yunbao.common.R;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.Arrays;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
@@ -44,7 +45,7 @@ public class GoogleUtils {
|
||||
|
||||
|
||||
public boolean getGoogleService() {
|
||||
boolean flag;
|
||||
boolean flag = false;
|
||||
try {
|
||||
Class<?> clz = mActivity.getClassLoader().loadClass("com.shayu.lib_google.utils.GoogleBillingManage");
|
||||
googlePay = clz.getConstructor(Activity.class).newInstance(mActivity);
|
||||
@@ -227,6 +228,20 @@ public class GoogleUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public void setFirebaseCrashData(String uid, String userData, String isGoogle, String cpu, String runTime, String enterRoom, String slidingRoom, String playSvga, String ActivitySize) {
|
||||
|
||||
try {
|
||||
Class<?> clz = mContext.getClassLoader().loadClass("com.shayu.lib_google.utils.FirebaseManage");
|
||||
googlePay= clz.getConstructor(Context.class).newInstance(mContext);
|
||||
googlePay.getClass()
|
||||
.getMethod("setFirebaseCrashData", String.class, String.class, String.class, String.class, String.class, String.class, String.class, String.class, String.class)
|
||||
.invoke(googlePay, uid, userData, isGoogle, cpu, runTime, enterRoom, slidingRoom, playSvga, ActivitySize);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void setQueryPurchaseListener(Activity activity, QueryPurchasesListener queryPurchasesListener) {
|
||||
Timer timer = new Timer();
|
||||
TimerTask task = new TimerTask() {
|
||||
|
||||
@@ -8,7 +8,7 @@ import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.util.Log;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.webkit.JavascriptInterface;
|
||||
@@ -17,14 +17,19 @@ import android.webkit.WebView;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonSyntaxException;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.bean.CheckUpgradesModel;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.common.bean.ReportCommunityBean;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.bean.VideoBean;
|
||||
import com.yunbao.common.bean.VideoListBean;
|
||||
import com.yunbao.common.dialog.GuardUpgradePopup;
|
||||
import com.yunbao.common.event.JavascriptInterfaceEvent;
|
||||
import com.yunbao.common.event.LiveRoomChangeEvent;
|
||||
import com.yunbao.common.event.QuickGiftingEvent;
|
||||
@@ -372,6 +377,13 @@ public class JavascriptInterfaceUtils {
|
||||
RouteUtil.forwardZhuangBanActivity(url);
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void openWebViewNew(String url) {
|
||||
Bus.get().post(new JavascriptInterfaceEvent().setMethod("openWebView").setData(url));
|
||||
Constants.isTitle = false;
|
||||
RouteUtil.forwardZhuangBanActivity(CommonAppConfig.HOST + url);
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void openWebViewTitle(String url) {
|
||||
Constants.isTitle = true;
|
||||
@@ -607,7 +619,7 @@ public class JavascriptInterfaceUtils {
|
||||
public void androidClickToTaskPage() {
|
||||
ARouter.getInstance().build(PATH_REWARD).withString("url",
|
||||
CommonAppConfig.HOST + "/index.php?g=Appapi&m=task&a=index" + "&uid=" + CommonAppConfig.getInstance().getUid()
|
||||
+ "&token=" + CommonAppConfig.getInstance().getToken() + "&tabIndex=1"+ "&isZh=" + (WordUtil.isNewZh() ? "1" : "0")).navigation();
|
||||
+ "&token=" + CommonAppConfig.getInstance().getToken() + "&tabIndex=1" + "&isZh=" + (WordUtil.isNewZh() ? "1" : "0")).navigation();
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
@@ -678,4 +690,27 @@ public class JavascriptInterfaceUtils {
|
||||
});
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void androidGotoCustomerService(String url) {
|
||||
ToastUtil.showDebug("网页跳客服页面");
|
||||
RouteUtil.forwardCustomerService(url);
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void androidtoCommunityVideo() {
|
||||
RouteUtil.forwardCommunityActivity();
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void getRewards(String checkUpgradesJson) {
|
||||
try {
|
||||
CheckUpgradesModel upgradesModel = new Gson().fromJson(checkUpgradesJson, CheckUpgradesModel.class);
|
||||
if (!TextUtils.isEmpty(upgradesModel.getLevel()))
|
||||
new XPopup.Builder(mWebView.getContext())
|
||||
.asCustom(new GuardUpgradePopup(mWebView.getContext(), "", upgradesModel,null))
|
||||
.show();
|
||||
} catch (JsonSyntaxException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.yunbao.common.utils;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
@@ -30,6 +31,7 @@ public class RouteUtil {
|
||||
public static final String PATH_LIVEREPORT = "/live/LiveReportActivity";
|
||||
public static final String PATH_MYWEBVIEWACTIVTITY = "/main/MyWebViewActivity";
|
||||
public static final String PATH_ZHUANGBANACTIVITY = "/main/ZhuangBanActivity";
|
||||
public static final String PATH_COMPENSATE_ACTIVITY = "/live/CompensateActivity";
|
||||
public static final String PATH_LiveZHUANGBANACTIVITY = "/live/ZhuangBanActivity";
|
||||
public static final String PATH_FACEBOOKACTIVITY = "/baidu/FacebookLoginActivity";
|
||||
public static final String PATH_MAIN = "/main/MainActivity";
|
||||
@@ -47,7 +49,13 @@ public class RouteUtil {
|
||||
public static final String PATH_SELECT_AVATAR="/main/UserAvatarSelectActivity";
|
||||
public static final String PATH_BattlePassActivity="/main/BattlePassActivity";
|
||||
public static final String PATH_SudGameActivity="/live/SudGameActivity";
|
||||
public static final String PATH_COMMUNITY_Activity="/main/MainHomeCommunityActivity";
|
||||
|
||||
|
||||
public static void forwardCommunityActivity() {
|
||||
ARouter.getInstance().build(PATH_COMMUNITY_Activity)
|
||||
.navigation();
|
||||
}
|
||||
public static void forwardFansActivity(String uid) {
|
||||
ARouter.getInstance().build(PATH_FANSACTIVITY)
|
||||
.withString(Constants.TO_UID, uid)
|
||||
@@ -134,6 +142,23 @@ public class RouteUtil {
|
||||
.navigation();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 跳转到
|
||||
*/
|
||||
public static void forwardLiveCompensateActivity(Context context, String msgid, String banner, String title, String content, String time, String link, boolean receive) {
|
||||
ARouter.getInstance().build(PATH_COMPENSATE_ACTIVITY)
|
||||
.withString("msgid", msgid)
|
||||
.withString("banner", banner)
|
||||
.withString("title", title)
|
||||
.withString("content", content)
|
||||
.withString("time", time)
|
||||
.withString("link", link)
|
||||
.withBoolean("receive", receive)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 跳转到装扮
|
||||
*/
|
||||
@@ -318,7 +343,7 @@ public class RouteUtil {
|
||||
/**
|
||||
* 系统头像选择
|
||||
*/
|
||||
public static void forwardUserAvatarSelect(){
|
||||
public static void forwardUserAvatarSelect() {
|
||||
ARouter.getInstance().build(PATH_SELECT_AVATAR)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
@@ -33,10 +33,12 @@ public class SpUtil {
|
||||
public static final String BEAUTY_SDK_TYPE = "beautySdkType";
|
||||
public static final String TURNTABLE_ENABLE = "turntableEnable";
|
||||
public static final String BEAUTY_360_TIEZHI_URL = "beauty360TiezhiUrl";
|
||||
public static final String BEAUTY_360_TIEZHI_EXIST = "beauty360TiezhiExist";
|
||||
public static final String ANCHOR_PK_TIME = "anchorPkTime";
|
||||
public static final String BEAUTY_360_TIEZHI_EXIST = "beauty360TiezhiExist";
|
||||
public static final String ANCHOR_PK_TIME = "anchorPkTime";
|
||||
//播放短视频上下滑动引导页
|
||||
public static final String READ_VIDEO_GUIDE = "readVideoGuide";
|
||||
public static final String READ_VIDEO_GUIDE = "readVideoGuide";
|
||||
|
||||
public static final String MESSAGE_SYS_DEL = "FIRST_DEL";
|
||||
|
||||
|
||||
public SpUtil() {
|
||||
@@ -73,8 +75,8 @@ public class SpUtil {
|
||||
/**
|
||||
* 判断一个值是否存在
|
||||
*/
|
||||
public boolean isExists(String key){
|
||||
return mSharedPreferences.contains(key);
|
||||
public boolean isExists(String key) {
|
||||
return mSharedPreferences.contains(key);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.yunbao.common.utils;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 时间处理
|
||||
*/
|
||||
@@ -67,4 +70,16 @@ public class TimeUtils {
|
||||
}
|
||||
return hour + minute + ":" + second;
|
||||
}
|
||||
|
||||
/**
|
||||
* 时间戳转换成字符窜
|
||||
* @param milSecond
|
||||
* @param pattern
|
||||
* @return
|
||||
*/
|
||||
public static String getDateToString(long milSecond, String pattern) {
|
||||
Date date = new Date(milSecond);
|
||||
SimpleDateFormat format = new SimpleDateFormat(pattern);
|
||||
return format.format(date);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,9 +97,13 @@ public class APKUpdateCustomPopup extends CenterPopupView {
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == 2 && APKManager.get().getAPKGoogleIsUp() != 1) {
|
||||
dismiss();
|
||||
}
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == 3 && APKManager.get().getAPKGoogleIsUp() != 1) {
|
||||
dismiss();
|
||||
}
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == 0 && APKManager.get().getApkIsUp() != 1) {
|
||||
dismiss();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.yunbao.common.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Paint;
|
||||
import android.text.TextUtils;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
|
||||
public class AutoSplitTextView extends androidx.appcompat.widget.AppCompatTextView {
|
||||
private boolean mEnabled = true;
|
||||
|
||||
public AutoSplitTextView(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public AutoSplitTextView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public AutoSplitTextView(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
}
|
||||
|
||||
public void setAutoSplitEnabled(boolean enabled) {
|
||||
mEnabled = enabled;
|
||||
}
|
||||
|
||||
/* @Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
if (MeasureSpec.getMode(widthMeasureSpec) == MeasureSpec.EXACTLY
|
||||
&& MeasureSpec.getMode(heightMeasureSpec) == MeasureSpec.EXACTLY
|
||||
&& getWidth() > 0
|
||||
&& getHeight() > 0
|
||||
&& mEnabled) {
|
||||
String newText = autoSplitText(this);
|
||||
if (!TextUtils.isEmpty(newText)) {
|
||||
setText(newText);
|
||||
}
|
||||
}
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||
}*/
|
||||
public void setAutoText(CharSequence text) {
|
||||
this.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
||||
|
||||
@Override
|
||||
public void onGlobalLayout() {
|
||||
//String[] split = text.toString().split("\n");
|
||||
setText(text);
|
||||
setText(autoSplitText(AutoSplitTextView.this, text));
|
||||
/*setText("");
|
||||
boolean test=false;
|
||||
if(text.toString().startsWith("累計送出1000鑽石的礼物")){
|
||||
test=true;
|
||||
System.out.println("新字測試");
|
||||
}
|
||||
for (String s : split) {
|
||||
if(StringUtil.isEmpty(getText().toString())){
|
||||
setText(autoSplitText(AutoSplitTextView.this,s));
|
||||
}else{
|
||||
setText(getText() + "\n" + autoSplitText(AutoSplitTextView.this, s));
|
||||
if(test)
|
||||
System.out.println(getText());
|
||||
}
|
||||
}*/
|
||||
AutoSplitTextView.this.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private String autoSplitText(final TextView textView, CharSequence text) {
|
||||
final String originalText = text.toString(); //原始文本
|
||||
final Paint tvPaint = textView.getPaint();//获取TextView的Paint
|
||||
final float tvWidth = textView.getWidth() - textView.getPaddingLeft() - textView.getPaddingRight(); //TextView的可用宽度
|
||||
//将原始文本按行拆分
|
||||
String[] originalTextLines = originalText.replaceAll("\r", "").split("\n");
|
||||
StringBuilder newTextBuilder = new StringBuilder();
|
||||
for (String originalTextLine : originalTextLines) {
|
||||
//文本内容小于TextView宽度,即不换行,不作处理
|
||||
if (tvPaint.measureText(originalTextLine) <= tvWidth) {
|
||||
newTextBuilder.append(originalTextLine);
|
||||
} else {
|
||||
//如果整行宽度超过控件可用宽度,则按字符测量,在超过可用宽度的前一个字符处手动换行
|
||||
float lineWidth = 0;
|
||||
for (int i = 0; i != originalTextLine.length(); ++i) {
|
||||
char charAt = originalTextLine.charAt(i);
|
||||
lineWidth += tvPaint.measureText(String.valueOf(charAt));
|
||||
if (lineWidth <= tvWidth) {
|
||||
newTextBuilder.append(charAt);
|
||||
} else {
|
||||
//单行超过TextView可用宽度,换行
|
||||
newTextBuilder.append("\n");
|
||||
lineWidth = 0;
|
||||
--i;//该代码作用是将本轮循环回滚,在新的一行重新循环判断该字符
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return newTextBuilder.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.yunbao.common.views;
|
||||
|
||||
import android.os.CountDownTimer;
|
||||
import android.os.Handler;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.makeramen.roundedimageview.RoundedImageView;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.sendMoneyLongListModel;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
public class DragonSendMoneyListViewHolder extends RecyclerView.ViewHolder {
|
||||
RoundedImageView live_avatar;
|
||||
TextView user_nicename;
|
||||
TextView gold_num;
|
||||
TextView participate;
|
||||
TextView send_benefits_time;
|
||||
TextView send_benefits;
|
||||
LinearLayout button_participate;
|
||||
long mPkTimeCount2;
|
||||
public CountDownTimer countDownTimer;
|
||||
|
||||
public DragonSendMoneyListViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
live_avatar = itemView.findViewById(R.id.live_avatar);
|
||||
user_nicename = itemView.findViewById(R.id.user_nicename);
|
||||
gold_num = itemView.findViewById(R.id.gold_num);
|
||||
button_participate = itemView.findViewById(R.id.button_participate);
|
||||
participate = itemView.findViewById(R.id.participate);
|
||||
send_benefits_time = itemView.findViewById(R.id.send_benefits_time);
|
||||
send_benefits = itemView.findViewById(R.id.send_benefits);
|
||||
}
|
||||
|
||||
public void setData(sendMoneyLongListModel model, DragonSendMoneyListClicksCallBack callBack,boolean isAnchor, boolean isAttention) {
|
||||
ImgLoader.display(itemView.getContext(), model.getUserAvatar(), live_avatar);
|
||||
user_nicename.setText(String.valueOf(model.getUserNicename()));
|
||||
gold_num.setText(String.valueOf(model.getGoldNum()));
|
||||
|
||||
if (TextUtils.equals("0", model.getParticipate()) && !isAnchor) {
|
||||
participate.setVisibility(View.VISIBLE);
|
||||
send_benefits_time.setVisibility(View.GONE);
|
||||
send_benefits.setVisibility(View.GONE);
|
||||
button_participate.setBackgroundResource(R.mipmap.icon_participate);
|
||||
} else {
|
||||
participate.setVisibility(View.GONE);
|
||||
send_benefits_time.setVisibility(View.VISIBLE);
|
||||
send_benefits.setVisibility(View.VISIBLE);
|
||||
button_participate.setBackgroundResource(R.mipmap.icon_send_benefits);
|
||||
}
|
||||
if (send_benefits_time.getVisibility() == View.VISIBLE) {
|
||||
// handler.removeCallbacks(runnable);
|
||||
mPkTimeCount2 = Long.parseLong(model.getCountdown());
|
||||
String s1 = StringUtil.getDurationText(mPkTimeCount2 * 1000);
|
||||
send_benefits_time.setText(s1);
|
||||
// handler.postDelayed(runnable, 1000);
|
||||
}
|
||||
ViewClicksAntiShake.clicksAntiShake(button_participate, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
if (!isAnchor && callBack != null && TextUtils.equals("0", model.getParticipate())) {
|
||||
callBack.onParticipate(model);
|
||||
// handler.removeCallbacks(runnable);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// Handler handler = new Handler();
|
||||
// Runnable runnable = new Runnable() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
// mPkTimeCount2--;
|
||||
// if (mPkTimeCount2 > 0) {
|
||||
// String s1 = StringUtil.getDurationText(mPkTimeCount2 * 1000);
|
||||
// send_benefits_time.setText(s1);
|
||||
// handler.postDelayed(runnable, 1000);
|
||||
// } else {
|
||||
// handler.removeCallbacks(runnable);
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// };
|
||||
|
||||
public interface DragonSendMoneyListClicksCallBack {
|
||||
void onParticipate(sendMoneyLongListModel moneyLongListModel);
|
||||
}
|
||||
}
|
||||
@@ -22,11 +22,13 @@ import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
public class FunGamesChildViewHolder extends RecyclerView.ViewHolder {
|
||||
private ImageView funGamePic;
|
||||
private TextView funGameName;
|
||||
private View total_image_red_point;
|
||||
|
||||
public FunGamesChildViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
funGamePic = itemView.findViewById(R.id.fun_game_pic);
|
||||
funGameName = itemView.findViewById(R.id.fun_game_name);
|
||||
total_image_red_point = itemView.findViewById(R.id.total_image_red_point);
|
||||
}
|
||||
|
||||
public void setData(CustomSidebarChildModel model, boolean rigts) {
|
||||
@@ -38,7 +40,11 @@ public class FunGamesChildViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
|
||||
funGameName.setText(model.getTitle());
|
||||
|
||||
if (TextUtils.equals(model.getTitle(), WordUtil.getNewString(com.yunbao.common.R.string.guard_guard)) && IMLoginManager.get(itemView.getContext()).getGuardRedPoint()) {
|
||||
total_image_red_point.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
total_image_red_point.setVisibility(View.GONE);
|
||||
}
|
||||
ViewClicksAntiShake.clicksAntiShake(itemView, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
@@ -59,7 +65,7 @@ public class FunGamesChildViewHolder extends RecyclerView.ViewHolder {
|
||||
.append("&uid=")
|
||||
.append(userInfo.getId())
|
||||
.append("&token=")
|
||||
.append(userInfo.getToken()) .append("&isZh=")
|
||||
.append(userInfo.getToken()).append("&isZh=")
|
||||
.append(WordUtil.isNewZh() ? "1" : 0);
|
||||
} else {
|
||||
htmlUrl.append(CommonAppConfig.HOST)
|
||||
@@ -68,7 +74,7 @@ public class FunGamesChildViewHolder extends RecyclerView.ViewHolder {
|
||||
.append("?uid=")
|
||||
.append(userInfo.getId())
|
||||
.append("&token=")
|
||||
.append(userInfo.getToken()) .append("&isZh=")
|
||||
.append(userInfo.getToken()).append("&isZh=")
|
||||
.append(WordUtil.isNewZh() ? "1" : 0);
|
||||
}
|
||||
Bus.get().post(new CustomDrawerPopupEvent()
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.yunbao.common.views;
|
||||
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
|
||||
public class LiveBuyGuardPrivilegeViewHolder extends RecyclerView.ViewHolder {
|
||||
ImageView guard_privilege;
|
||||
|
||||
public LiveBuyGuardPrivilegeViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
guard_privilege = itemView.findViewById(R.id.guard_privilege);
|
||||
}
|
||||
|
||||
public void setData(String url) {
|
||||
Log.e("LiveBuyGuardPrivilege", url);
|
||||
ImgLoader.display(itemView.getContext(), url, guard_privilege);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.yunbao.common.views;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.GuardPriceModel;
|
||||
|
||||
public class LiveBuyGuardSelectViewHolder extends RecyclerView.ViewHolder {
|
||||
TextView opening_time, discount;
|
||||
View layout;
|
||||
|
||||
public LiveBuyGuardSelectViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
opening_time = itemView.findViewById(R.id.opening_time);
|
||||
discount = itemView.findViewById(R.id.discount);
|
||||
layout = itemView.findViewById(R.id.layout);
|
||||
}
|
||||
|
||||
public void setData(GuardPriceModel guardPriceModel, LiveBuyGuardSelectClickListener liveBuyGuardSelectClickListener, GuardPriceModel mModel) {
|
||||
if (mModel != null && TextUtils.equals(String.valueOf(guardPriceModel.getPriceKey()), String.valueOf(mModel.getPriceKey()))) {
|
||||
layout.setSelected(true);
|
||||
}
|
||||
opening_time.setText(String.valueOf(guardPriceModel.getOpeningTime()));
|
||||
discount.setText(String.valueOf(guardPriceModel.getDiscount()));
|
||||
itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (liveBuyGuardSelectClickListener != null) {
|
||||
liveBuyGuardSelectClickListener.onClickListener(guardPriceModel);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public interface LiveBuyGuardSelectClickListener {
|
||||
void onClickListener(GuardPriceModel guardPriceModel);
|
||||
}
|
||||
}
|
||||
@@ -98,8 +98,10 @@ public class LiveSudGamePopup extends BottomPopupView {
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.exit), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
|
||||
gameViewModel.onDestroy();
|
||||
Bus.get().post(new LiveSudGamePopupShowOrHideEvent().setType(2));
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.sud_history), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.yunbao.common.views;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.core.AttachPopupView;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.event.CustomDrawerPopupEvent;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
public class MsgSysDelPopupView extends AttachPopupView {
|
||||
|
||||
ItemDelListener itemDelListener;
|
||||
|
||||
public MsgSysDelPopupView(@NonNull Context context, ItemDelListener itemDelListener) {
|
||||
super(context);
|
||||
this.itemDelListener = itemDelListener;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.view_msg_sys_del;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
//特效设置
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.del), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
dismiss();
|
||||
itemDelListener.onItemDel();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public interface ItemDelListener {
|
||||
void onItemDel();
|
||||
}
|
||||
}
|
||||
@@ -26,13 +26,14 @@ public class NewRoleFunGamesChildViewHolder extends RecyclerView.ViewHolder {
|
||||
private TextView funGameName;
|
||||
private View red_point;
|
||||
private boolean showRed = false;
|
||||
|
||||
private View total_image_red_point;
|
||||
public NewRoleFunGamesChildViewHolder(@NonNull View itemView, boolean showRed) {
|
||||
super(itemView);
|
||||
this.showRed = showRed;
|
||||
funGamePic = itemView.findViewById(R.id.fun_game_pic);
|
||||
funGameName = itemView.findViewById(R.id.fun_game_name);
|
||||
red_point = itemView.findViewById(R.id.red_point);
|
||||
total_image_red_point = itemView.findViewById(R.id.total_image_red_point);
|
||||
}
|
||||
|
||||
public void setData(CustomSidebarChildModel model, boolean rigts) {
|
||||
@@ -49,7 +50,11 @@ public class NewRoleFunGamesChildViewHolder extends RecyclerView.ViewHolder {
|
||||
}
|
||||
|
||||
funGameName.setText(model.getTitle());
|
||||
|
||||
if (TextUtils.equals(model.getTitle(), WordUtil.getNewString(com.yunbao.common.R.string.guard_guard)) && IMLoginManager.get(itemView.getContext()).getGuardRedPoint()) {
|
||||
total_image_red_point.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
total_image_red_point.setVisibility(View.GONE);
|
||||
}
|
||||
ViewClicksAntiShake.clicksAntiShake(itemView, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
|
||||
@@ -32,18 +32,29 @@ public class SudGameChatViewHolder extends RecyclerView.ViewHolder {
|
||||
public void sudGameChat(SudGameChatImModel msgModel) {
|
||||
new LoadDian9TuUtilSud().loadDian9TuAssets(itemView.getContext(), mBg, 1);
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
String userName = msgModel.getNickname() + ":";
|
||||
buffer.append(userName)
|
||||
.append(" ")
|
||||
.append(msgModel.getTextMessage());
|
||||
|
||||
String msg = buffer.toString();
|
||||
|
||||
int unameIndexOf = msg.indexOf(userName);
|
||||
int unameSize = userName.length();
|
||||
SpannableStringBuilder builder = new SpannableStringBuilder();
|
||||
builder.append(msg);
|
||||
builder.setSpan(new ForegroundColorSpan(Color.parseColor("#FFBD0D")), unameIndexOf, unameIndexOf + unameSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
if (msgModel.isWelcomMessage()) {
|
||||
String userName = msgModel.getNickname();
|
||||
buffer.append(msgModel.getTextMessage());
|
||||
String msg = buffer.toString();
|
||||
int unameIndexOf = msg.indexOf(userName);
|
||||
int unameSize = userName.length();
|
||||
builder.append(msg);
|
||||
builder.setSpan(new ForegroundColorSpan(Color.parseColor("#FFBD0D")), unameIndexOf, unameIndexOf + unameSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
} else {
|
||||
|
||||
String userName = msgModel.getNickname() + ":";
|
||||
buffer.append(userName)
|
||||
.append(" ")
|
||||
.append(msgModel.getTextMessage());
|
||||
String msg = buffer.toString();
|
||||
|
||||
int unameIndexOf = msg.indexOf(userName);
|
||||
int unameSize = userName.length();
|
||||
|
||||
builder.append(msg);
|
||||
builder.setSpan(new ForegroundColorSpan(Color.parseColor("#FFBD0D")), unameIndexOf, unameIndexOf + unameSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
}
|
||||
chatMessage.setText(builder);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package com.yunbao.common.views;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
@@ -19,11 +17,11 @@ import com.yunbao.common.bean.SudGameUserModel;
|
||||
import com.yunbao.common.dialog.SudGameSmallPopupPindow;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DeviceUtils;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
public class SudGameUserListViewHolder extends RecyclerView.ViewHolder {
|
||||
private ImageView vacancy_sud_game, mic_status;
|
||||
private ImageView vacancy_sud_game, mic_status, game_status;
|
||||
private FrameLayout user_layout;
|
||||
private RoundedImageView sud_game_user;
|
||||
private LinearLayout layout;
|
||||
@@ -35,6 +33,7 @@ public class SudGameUserListViewHolder extends RecyclerView.ViewHolder {
|
||||
user_layout = itemView.findViewById(R.id.user_layout);
|
||||
mic_status = itemView.findViewById(R.id.mic_status);
|
||||
layout = itemView.findViewById(R.id.layout);
|
||||
game_status = itemView.findViewById(R.id.game_status);
|
||||
}
|
||||
|
||||
public void upData(SudGameUserModel sudGameUserModel, SudGameUserListAdapter.SudGameSmallCallBack sudGameSmallCallBack, int position) {
|
||||
@@ -67,13 +66,19 @@ public class SudGameUserListViewHolder extends RecyclerView.ViewHolder {
|
||||
if (sudGameUserModel.isMute()) {
|
||||
ImgLoader.display2(itemView.getContext(), R.mipmap.icon_game_close_wheat_mute, mic_status);
|
||||
}
|
||||
if (sudGameUserModel.isGameIng()) {
|
||||
game_status.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
game_status.setVisibility(View.GONE);
|
||||
}
|
||||
ViewClicksAntiShake.clicksAntiShake(user_layout, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
XPopup.Builder builder = new XPopup.Builder(itemView.getContext()).atView(user_layout);
|
||||
XPopup.Builder builder = new XPopup.Builder(itemView.getContext()).atView(sud_game_user);
|
||||
builder.hasShadowBg(false)
|
||||
.isDestroyOnDismiss(true)
|
||||
.isLightStatusBar(false)
|
||||
.maxHeight(DpUtil.dp2px(70))
|
||||
.popupPosition(PopupPosition.Bottom)
|
||||
.asCustom(new SudGameSmallPopupPindow(itemView.getContext(),
|
||||
sudGameUserModel,
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="6dp" />
|
||||
<solid android:color="#80000000"/>
|
||||
</shape>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/background_live_buy_guard_slelect_item1" android:state_selected="false" />
|
||||
<item android:drawable="@drawable/background_live_buy_guard_slelect_item2" android:state_selected="true" />
|
||||
</selector>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<solid android:color="#00000000" />
|
||||
</shape>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<solid android:color="#2D3271" />
|
||||
</shape>
|
||||
@@ -1,9 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- <item>
|
||||
<bitmap
|
||||
android:gravity="fill_vertical|fill_horizontal"
|
||||
android:src="@drawable/background_order_dialog_out_layout" />
|
||||
</item>-->
|
||||
<item>
|
||||
<bitmap
|
||||
android:gravity="fill_vertical|fill_horizontal"
|
||||
android:src="@drawable/background_order_dialog_out_layout" />
|
||||
<shape>
|
||||
<stroke
|
||||
android:width="10dp"
|
||||
android:color="#CCBEF3" />
|
||||
<corners android:radius="10dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<item
|
||||
android:bottom="3dp"
|
||||
@@ -11,12 +19,15 @@
|
||||
android:right="4dp"
|
||||
android:top="4dp">
|
||||
<shape>
|
||||
|
||||
<solid android:color="#F5F5FF" />
|
||||
|
||||
<corners android:radius="10dp" />
|
||||
|
||||
<stroke
|
||||
android:width="3dp"
|
||||
android:color="#657FE4" />
|
||||
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
11
common/src/main/res/drawable/bg_god_guard_bottom_panel.xml
Normal file
11
common/src/main/res/drawable/bg_god_guard_bottom_panel.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:endColor="#120C07"
|
||||
android:startColor="#3F2D05"
|
||||
android:type="linear" />
|
||||
<corners
|
||||
android:topLeftRadius="12dp"
|
||||
android:topRightRadius="12dp" />
|
||||
</shape>
|
||||
11
common/src/main/res/drawable/bg_king_guard_bottom_panel.xml
Normal file
11
common/src/main/res/drawable/bg_king_guard_bottom_panel.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:endColor="#09050F"
|
||||
android:startColor="#3F3B34"
|
||||
android:type="linear" />
|
||||
<corners
|
||||
android:topLeftRadius="12dp"
|
||||
android:topRightRadius="12dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="6dp" />
|
||||
<stroke
|
||||
android:width="0.5dp"
|
||||
android:color="#D9D9D9" />
|
||||
<solid android:color="#CC0C0D1A" />
|
||||
</shape>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="90dp" />
|
||||
<gradient
|
||||
android:endColor="#4B4B4B"
|
||||
android:startColor="#4B4B4B" />
|
||||
</shape>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="19dp" />
|
||||
<corners android:radius="360dp" />
|
||||
<solid android:color="#B3414141" />
|
||||
</shape>
|
||||
11
common/src/main/res/drawable/bg_star_guard_bottom_panel.xml
Normal file
11
common/src/main/res/drawable/bg_star_guard_bottom_panel.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:endColor="#110F22"
|
||||
android:startColor="#37398E"
|
||||
android:type="linear" />
|
||||
<corners
|
||||
android:topLeftRadius="12dp"
|
||||
android:topRightRadius="12dp" />
|
||||
</shape>
|
||||
5
common/src/main/res/drawable/bg_sys_svga.xml
Normal file
5
common/src/main/res/drawable/bg_sys_svga.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="6dp" />
|
||||
<solid android:color="#E0E1E6" />
|
||||
</shape>
|
||||
8
common/src/main/res/drawable/button_dragon_expire.xml
Normal file
8
common/src/main/res/drawable/button_dragon_expire.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="18dp" />
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:endColor="#463D32"
|
||||
android:startColor="#342B20" />
|
||||
</shape>
|
||||
8
common/src/main/res/drawable/button_dragon_sure.xml
Normal file
8
common/src/main/res/drawable/button_dragon_sure.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="18dp" />
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:endColor="#FCDEC4"
|
||||
android:startColor="#EEC593" />
|
||||
</shape>
|
||||
8
common/src/main/res/drawable/button_guard_upgrade.xml
Normal file
8
common/src/main/res/drawable/button_guard_upgrade.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="18dp" />
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:endColor="#FCDEC4"
|
||||
android:startColor="#EEC593" />
|
||||
</shape>
|
||||
13
common/src/main/res/drawable/guard_buy_tips_bg.xml
Normal file
13
common/src/main/res/drawable/guard_buy_tips_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="135"
|
||||
android:centerColor="#202020"
|
||||
android:endColor="#535353"
|
||||
android:startColor="#595959" />
|
||||
<corners
|
||||
android:bottomLeftRadius="18dp"
|
||||
android:bottomRightRadius="18dp"
|
||||
android:topLeftRadius="18dp"
|
||||
android:topRightRadius="18dp" />
|
||||
</shape>
|
||||
12
common/src/main/res/drawable/guard_buy_tips_sure_bg.xml
Normal file
12
common/src/main/res/drawable/guard_buy_tips_sure_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="#EEC593"
|
||||
android:startColor="#FCDEC4" />
|
||||
<corners
|
||||
android:bottomLeftRadius="18dp"
|
||||
android:bottomRightRadius="18dp"
|
||||
android:topLeftRadius="18dp"
|
||||
android:topRightRadius="18dp" />
|
||||
</shape>
|
||||
6
common/src/main/res/drawable/input_dragon_money.xml
Normal file
6
common/src/main/res/drawable/input_dragon_money.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="15dp" />
|
||||
<stroke android:width="1dp" android:color="@color/white"/>
|
||||
<solid android:color="#E6454444"/>
|
||||
</shape>
|
||||
@@ -21,22 +21,22 @@
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="23dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginTop="48dp"
|
||||
android:background="@drawable/bg_live_sud_game_top_new"
|
||||
android:gravity="center">
|
||||
android:gravity="start|center_vertical">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_marginStart="10dp"
|
||||
android:gravity="start"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/room_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
@@ -69,34 +69,34 @@
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="29dp"
|
||||
android:layout_marginTop="49dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/sud_history"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:src="@mipmap/icon_sud_history_live_new" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/exit"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="@drawable/bg_live_sud_game_back_new"
|
||||
android:gravity="center"
|
||||
android:text="@string/video_exit"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="8sp" />
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="137dp"
|
||||
android:layout_width="34dp"
|
||||
android:layout_height="34dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginStart="12dp"
|
||||
@@ -106,10 +106,8 @@
|
||||
android:id="@+id/game_review_input"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_live_sud_game_bottom_input"
|
||||
android:background="@mipmap/icon_game_review_input"
|
||||
android:gravity="center"
|
||||
android:text="@string/game_review_input"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -148,14 +146,15 @@
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="80dp"
|
||||
android:gravity="center">
|
||||
android:layout_height="70dp"
|
||||
android:layout_marginTop="98dp">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/user_list"
|
||||
android:layout_marginStart="11dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="50dp" />
|
||||
android:layout_height="match_parent" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
55
common/src/main/res/layout/dialog_del_sys_msg.xml
Normal file
55
common/src/main/res/layout/dialog_del_sys_msg.xml
Normal file
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="280dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_dialog"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="50dp"
|
||||
android:layout_marginBottom="50dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:padding="20dp"
|
||||
android:text="@string/dialog_tip"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_cancel"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="35dp"
|
||||
android:background="@mipmap/icon_del_sys_confirm"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="2dp"
|
||||
android:text="@string/sys_msg_cancel"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_confirm"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:background="@mipmap/icon_del_sys_cancel"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="2dp"
|
||||
android:text="@string/confirm"
|
||||
android:textColor="@color/yellow_ff6c00"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user