Merge branch 'master' into dev_random_pk
# Conflicts: # live/src/main/res/values/strings.xml
@ -118,8 +118,12 @@ public class FaceManager implements SensorEventListener {
|
||||
if ("FilterViewHolder_".equals(key)) {
|
||||
for (FaceBeautyFilterBean filter : faceBeautyDataFactory.getBeautyFilters()) {
|
||||
if (filter.getKey().equals(configMap.get(key)) && !"origin".equals(configMap.get(key))) {
|
||||
faceBeautyDataFactory.onFilterSelected(filter.getKey(), Double.parseDouble((String) Objects.requireNonNull(configMap.get("FilterViewHolder_" + configMap.get(key) + "_val"))) / 100, filter.getDesRes());
|
||||
Log.i(TAG, "test: 设置滤镜 =" + filter.getKey() + " val = " + configMap.get("FilterViewHolder_" + configMap.get(key) + "_val"));
|
||||
try {
|
||||
faceBeautyDataFactory.onFilterSelected(filter.getKey(), Double.parseDouble((String) Objects.requireNonNull(configMap.get("FilterViewHolder_" + configMap.get(key) + "_val"))) / 100, filter.getDesRes());
|
||||
Log.i(TAG, "test: 设置滤镜 =" + filter.getKey() + " val = " + configMap.get("FilterViewHolder_" + configMap.get(key) + "_val"));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -127,8 +131,12 @@ public class FaceManager implements SensorEventListener {
|
||||
String name = key.replace("BeautySkinViewHolder_", "");
|
||||
for (FaceBeautyBean bean : faceBeautyDataFactory.getShapeBeauty()) {
|
||||
if (bean.getKey().equals(name)) {
|
||||
faceBeautyDataFactory.updateParamIntensity(bean.getKey(), Double.parseDouble((String) Objects.requireNonNull(configMap.get(key))));
|
||||
Log.i(TAG, "test: 设置美颜 = " + bean.getKey() + " val = " + configMap.get(key));
|
||||
try {
|
||||
faceBeautyDataFactory.updateParamIntensity(bean.getKey(), Double.parseDouble((String) Objects.requireNonNull(configMap.get(key))));
|
||||
Log.i(TAG, "test: 设置美颜 = " + bean.getKey() + " val = " + configMap.get(key));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -136,8 +144,12 @@ public class FaceManager implements SensorEventListener {
|
||||
String name = key.replace("BeautyShapeViewHolder_", "");
|
||||
for (FaceBeautyBean bean : faceBeautyDataFactory.getShapeBeauty()) {
|
||||
if (bean.getKey().equals(name)) {
|
||||
faceBeautyDataFactory.updateParamIntensity(bean.getKey(), Double.parseDouble((String) Objects.requireNonNull(configMap.get(key))));
|
||||
Log.i(TAG, "test: 设置美肤 = " + bean.getKey() + " val = " + configMap.get(key));
|
||||
try {
|
||||
faceBeautyDataFactory.updateParamIntensity(bean.getKey(), Double.parseDouble((String) Objects.requireNonNull(configMap.get(key))));
|
||||
Log.i(TAG, "test: 设置美肤 = " + bean.getKey() + " val = " + configMap.get(key));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -80,11 +80,11 @@ public class ContainerRecyclerAdapter extends RecyclerView.Adapter<BaseViewHolde
|
||||
}
|
||||
|
||||
public void hideSeekBar() {
|
||||
if (seekBar.getVisibility() == View.GONE) {
|
||||
if (seekBar.getVisibility() == View.INVISIBLE) {
|
||||
return;
|
||||
}
|
||||
seekBar.setOnProgressChangeListener(null);
|
||||
seekBar.setVisibility(View.GONE);
|
||||
seekBar.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -230,6 +230,7 @@ dependencies {
|
||||
annotationProcessor rootProject.ext.dependencies["arouter-compiler"]
|
||||
|
||||
// implementation rootProject.ext.dependencies["leakcanary"]
|
||||
//debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.10'
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,10 +17,6 @@ import android.util.Log;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.adjust.sdk.Adjust;
|
||||
import com.adjust.sdk.AdjustConfig;
|
||||
import com.adjust.sdk.AdjustEvent;
|
||||
import com.adjust.sdk.LogLevel;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.blankj.utilcode.util.Utils;
|
||||
import com.facebook.appevents.AppEventsLogger;
|
||||
@ -38,8 +34,6 @@ import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.bean.CrashSaveBean;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.manager.imrongcloud.InstructorSendReward;
|
||||
import com.yunbao.common.manager.imrongcloud.InstructorSendRewardProvider;
|
||||
import com.yunbao.common.manager.imrongcloud.MessageIMManager;
|
||||
@ -47,7 +41,6 @@ import com.yunbao.common.manager.imrongcloud.RecommendLiveRoom;
|
||||
import com.yunbao.common.manager.imrongcloud.RongcloudIMManager;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.SpUtil;
|
||||
import com.yunbao.faceunity.FaceManager;
|
||||
import com.yunbao.live.socket.SocketRyClient;
|
||||
import com.yunbao.live.utils.LiveImDeletUtil;
|
||||
import com.yunbao.live.views.PortraitLiveManager;
|
||||
@ -87,12 +80,10 @@ public class AppContext extends CommonAppContext {
|
||||
private static final class AdjustLifecycleCallbacks implements ActivityLifecycleCallbacks {
|
||||
@Override
|
||||
public void onActivityResumed(Activity activity) {
|
||||
Adjust.onResume();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityPaused(Activity activity) {
|
||||
Adjust.onPause();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -163,38 +154,8 @@ public class AppContext extends CommonAppContext {
|
||||
OpenInstall.init(this);
|
||||
}
|
||||
|
||||
String environment = AdjustConfig.ENVIRONMENT_PRODUCTION;
|
||||
AdjustConfig config = new AdjustConfig(this, "3om5fbglyqdc", environment);
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == false) {
|
||||
config.setDefaultTracker("xa7k5ut");
|
||||
}
|
||||
Adjust.onCreate(config);
|
||||
|
||||
registerActivityLifecycleCallbacks(new AdjustLifecycleCallbacks());
|
||||
config.setLogLevel(LogLevel.WARN);
|
||||
//激活操作记录
|
||||
AdjustEvent adjustEvent = new AdjustEvent("m7wk0c");
|
||||
Adjust.trackEvent(adjustEvent);
|
||||
|
||||
//谷歌激活
|
||||
mFirebaseAnalytics.logEvent("FS_activation", null);
|
||||
|
||||
//FB激活
|
||||
logger.logEvent("FB_activation");
|
||||
|
||||
AdjustEvent adjustEvent2 = new AdjustEvent("p7igfz");
|
||||
Adjust.trackEvent(adjustEvent2);
|
||||
CommonHttpUtil.setAdvertisingChannels("p7igfz", new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
//谷歌激活
|
||||
mFirebaseAnalytics.logEvent("FS_complete_1st_loading", null);
|
||||
//FB激活
|
||||
logger.logEvent("FB_complete_1st_loading");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//初始化 AndroidUtilCode
|
||||
Utils.init(this);
|
||||
liveImDeletUtil = new LiveImDeletUtil();
|
||||
|
@ -1,10 +1,6 @@
|
||||
package com.shayu.phonelive.activity;
|
||||
|
||||
import static com.yunbao.common.CommonAppContext.logger;
|
||||
import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics;
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Build;
|
||||
@ -25,8 +21,6 @@ import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.app.NotificationManagerCompat;
|
||||
|
||||
import com.adjust.sdk.Adjust;
|
||||
import com.adjust.sdk.AdjustEvent;
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
@ -50,7 +44,6 @@ import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.manager.imrongcloud.RongcloudIMManager;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.DownloadUtil;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.LogUtil;
|
||||
@ -111,14 +104,6 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
|
||||
EventBus.getDefault().register(this);
|
||||
setStatusBar();
|
||||
setContentView(R.layout.activity_launcher);
|
||||
//开屏
|
||||
AdjustEvent adjustEvent = new AdjustEvent("vjqk8g");
|
||||
Adjust.trackEvent(adjustEvent);
|
||||
|
||||
//谷歌激活
|
||||
mFirebaseAnalytics.logEvent("FS_screen", null);
|
||||
//FB激活
|
||||
logger.logEvent("FB_screen");
|
||||
mContext = this;
|
||||
mRoot = findViewById(R.id.root);
|
||||
mCover = findViewById(R.id.cover);
|
||||
|
@ -4,6 +4,7 @@ import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TOP;
|
||||
|
||||
import android.Manifest;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationChannel;
|
||||
@ -34,6 +35,7 @@ import com.bumptech.glide.request.target.SimpleTarget;
|
||||
import com.bumptech.glide.request.target.Target;
|
||||
import com.bumptech.glide.request.transition.Transition;
|
||||
import com.makeramen.roundedimageview.RoundedImageView;
|
||||
import com.shayu.phonelive.AppContext;
|
||||
import com.shayu.phonelive.activity.LauncherActivity;
|
||||
import com.yunbao.common.bean.NotificationMsgBean;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
@ -57,7 +59,7 @@ public class CustomMessageReceiver extends PushMessageReceiver {
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
|
||||
NotificationManager manager = (NotificationManager) context.getSystemService(context.NOTIFICATION_SERVICE);
|
||||
NotificationChannel channel = new NotificationChannel(channelID, channelNAME, level);
|
||||
channel.setSound(Uri.parse("android.resource://" + context.getPackageName() + "/raw/pdlive_sound"),null);
|
||||
channel.setSound(Uri.parse("android.resource://" + context.getPackageName() + "/raw/pdlive_sound"), null);
|
||||
manager.createNotificationChannel(channel);
|
||||
return channelID;
|
||||
} else {
|
||||
@ -86,19 +88,22 @@ public class CustomMessageReceiver extends PushMessageReceiver {
|
||||
@Override
|
||||
public boolean onNotificationMessageArrived(Context context, PushType pushType, PushNotificationMessage notificationMessage) {
|
||||
Log.i("gmc", notificationMessage.getPushContent() + "VVV" + notificationMessage.getPushTitle() + "gmc11112222" + notificationMessage.getExtra());
|
||||
if(!SpUtil.getInstance().getBooleanValue("NOTIFICATION")){
|
||||
DialogUitl.showSimpleDialog(context, "应用需要通知权限", new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
Intent intent = new Intent();
|
||||
intent.setAction("android.settings.APP_NOTIFICATION_SETTINGS");
|
||||
intent.putExtra("app_package", context.getPackageName());
|
||||
intent.putExtra("app_uid", context.getApplicationInfo().uid);
|
||||
// for Android 8 and above
|
||||
intent.putExtra("android.provider.extra.APP_PACKAGE", context.getPackageName());
|
||||
context.startActivity(intent);
|
||||
}
|
||||
});
|
||||
if (!SpUtil.getInstance().getBooleanValue("NOTIFICATION")) {
|
||||
Activity activity = AppContext.activityWeakReference.get();
|
||||
if (activity != null) {
|
||||
DialogUitl.showSimpleDialog(activity, "应用需要通知权限", new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
Intent intent = new Intent();
|
||||
intent.setAction("android.settings.APP_NOTIFICATION_SETTINGS");
|
||||
intent.putExtra("app_package", context.getPackageName());
|
||||
intent.putExtra("app_uid", context.getApplicationInfo().uid);
|
||||
// for Android 8 and above
|
||||
intent.putExtra("android.provider.extra.APP_PACKAGE", context.getPackageName());
|
||||
activity.startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
if (notificationMessage.getExtra() == null) {
|
||||
msg.setImg("" + notificationMessage.getSenderPortrait());
|
||||
@ -218,7 +223,7 @@ public class CustomMessageReceiver extends PushMessageReceiver {
|
||||
PendingIntent pendingIntent;
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S) {
|
||||
pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_IMMUTABLE);
|
||||
}else {
|
||||
} else {
|
||||
pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
}
|
||||
String channelId = createNotificationChannel(context, "my_channel_ID", "my_channel_NAME", NotificationManager.IMPORTANCE_HIGH);
|
||||
@ -252,7 +257,7 @@ public class CustomMessageReceiver extends PushMessageReceiver {
|
||||
PendingIntent pendingIntent;
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S) {
|
||||
pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_IMMUTABLE);
|
||||
}else {
|
||||
} else {
|
||||
pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
}
|
||||
String channelId = createNotificationChannel(context, "my_channel_ID", "my_channel_NAME", NotificationManager.IMPORTANCE_HIGH);
|
||||
@ -295,7 +300,7 @@ public class CustomMessageReceiver extends PushMessageReceiver {
|
||||
PendingIntent pendingIntent;
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S) {
|
||||
pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_IMMUTABLE);
|
||||
}else {
|
||||
} else {
|
||||
pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
}
|
||||
String channelId = createNotificationChannel(context, "my_channel_ID", "my_channel_NAME", NotificationManager.IMPORTANCE_HIGH);
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">PDLIVE</string>
|
||||
<string name="leak_canary_test_class_name">assertk.Assert</string>
|
||||
</resources>
|
@ -147,7 +147,6 @@ dependencies {
|
||||
//谷歌支付
|
||||
//谷歌内购
|
||||
api 'com.android.billingclient:billing:5.0.0'
|
||||
implementation 'com.teprinciple:updateapputils:2.3.0'
|
||||
api 'com.squareup.picasso:picasso:2.5.2'
|
||||
api "com.immomo.cosmos.mediax:beautyutils:2.2.1_01071700"
|
||||
api files('libs/liteavsdk.jar')
|
||||
@ -168,7 +167,6 @@ dependencies {
|
||||
transitive = true
|
||||
}
|
||||
api 'com.linecorp:linesdk:5.0.1'
|
||||
api 'com.adjust.sdk:adjust-android:4.30.1'
|
||||
api 'com.android.installreferrer:installreferrer:2.2'
|
||||
//Retrofit2库
|
||||
api 'com.squareup.retrofit2:retrofit:2.3.0'
|
||||
@ -189,5 +187,8 @@ dependencies {
|
||||
api files('libs/Msc.jar')
|
||||
|
||||
api 'com.github.li-xiaojun:XPopup:2.9.1'
|
||||
|
||||
//app-updater
|
||||
api 'com.github.jenly1314.AppUpdater:app-updater:1.1.3'
|
||||
//app-dialog
|
||||
api 'com.github.jenly1314.AppUpdater:app-dialog:1.1.3'
|
||||
}
|
||||
|
@ -32,8 +32,9 @@
|
||||
android:resource="@xml/file_paths" />
|
||||
</provider>
|
||||
|
||||
<!--
|
||||
|
||||
<!--支付宝-->
|
||||
支付宝
|
||||
<activity
|
||||
android:name="com.alipay.sdk.app.H5PayActivity"
|
||||
android:configChanges="orientation|keyboardHidden|navigation|screenSize"
|
||||
@ -46,7 +47,8 @@
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustResize|stateHidden"></activity>
|
||||
<!--支付宝 end-->
|
||||
支付宝 end
|
||||
-->
|
||||
|
||||
<activity
|
||||
android:name="com.yunbao.common.activity.ErrorActivity"
|
||||
|
@ -1,22 +1,22 @@
|
||||
package com.yunbao.common;
|
||||
|
||||
import static com.facebook.FacebookSdk.setAdvertiserIDCollectionEnabled;
|
||||
import static com.facebook.FacebookSdk.setAutoLogAppEventsEnabled;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.multidex.MultiDex;
|
||||
import androidx.multidex.MultiDexApplication;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.facebook.FacebookSdk;
|
||||
import com.facebook.appevents.AppEventsLogger;
|
||||
import com.google.android.gms.common.api.ApiException;
|
||||
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.utils.L;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.Locale;
|
||||
|
||||
import io.rong.imlib.RongIMClient;
|
||||
@ -24,9 +24,6 @@ import io.rong.push.RongPushClient;
|
||||
import io.rong.push.pushconfig.PushConfig;
|
||||
import me.leolin.shortcutbadger.ShortcutBadger;
|
||||
|
||||
import static com.facebook.FacebookSdk.setAdvertiserIDCollectionEnabled;
|
||||
import static com.facebook.FacebookSdk.setAutoLogAppEventsEnabled;
|
||||
|
||||
|
||||
/**
|
||||
* Created by cxf on 2017/8/3.
|
||||
@ -35,13 +32,12 @@ import static com.facebook.FacebookSdk.setAutoLogAppEventsEnabled;
|
||||
public class CommonAppContext extends MultiDexApplication {
|
||||
|
||||
public static CommonAppContext sInstance;
|
||||
public static WeakReference<Activity> activityWeakReference;
|
||||
private int mCount;
|
||||
private boolean mFront;//是否前台
|
||||
public static int jpushMsgNum;
|
||||
public static int Ingroup = 0;
|
||||
public static String lang = "chinese";
|
||||
public static FirebaseAnalytics mFirebaseAnalytics;
|
||||
public static AppEventsLogger logger;
|
||||
public static boolean isReady = false;
|
||||
public static String home_zdy_img_us = "";
|
||||
public static String home_zdy_img_cn = "";
|
||||
@ -67,30 +63,23 @@ public class CommonAppContext extends MultiDexApplication {
|
||||
//初始化友盟统计
|
||||
// UMConfigure.init(this, UMConfigure.DEVICE_TYPE_PHONE, null);
|
||||
FacebookSdk.sdkInitialize(getApplicationContext());
|
||||
mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
|
||||
mFirebaseAnalytics.setAnalyticsCollectionEnabled(true);
|
||||
mFirebaseAnalytics.setUserProperty("ALLOW_AD_PERSONALIZATION_SIGNALS", "true" );
|
||||
|
||||
|
||||
|
||||
logger = AppEventsLogger.newLogger(this);
|
||||
setAutoLogAppEventsEnabled(true);
|
||||
FacebookSdk.fullyInitialize();
|
||||
setAdvertiserIDCollectionEnabled(true);
|
||||
registerActivityLifecycleCallbacks();
|
||||
|
||||
Locale locale;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
locale = getResources().getConfiguration().getLocales().get(0);
|
||||
} else {
|
||||
locale = getResources().getConfiguration().locale;
|
||||
}
|
||||
if(locale.getLanguage().equals("en")){
|
||||
lang = "english";
|
||||
}else{
|
||||
lang = "chinese";
|
||||
}
|
||||
Log.i("lang",lang);
|
||||
Locale locale;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
locale = getResources().getConfiguration().getLocales().get(0);
|
||||
} else {
|
||||
locale = getResources().getConfiguration().locale;
|
||||
}
|
||||
if (locale.getLanguage().equals("en")) {
|
||||
lang = "english";
|
||||
} else {
|
||||
lang = "chinese";
|
||||
}
|
||||
Log.i("lang", lang);
|
||||
|
||||
}
|
||||
|
||||
@ -111,11 +100,12 @@ public class CommonAppContext extends MultiDexApplication {
|
||||
@Override
|
||||
public void onActivityStarted(Activity activity) {
|
||||
mCount++;
|
||||
activityWeakReference=new WeakReference<>(activity);
|
||||
if (!mFront) {
|
||||
mFront = true;
|
||||
L.e("AppContext------->处于前台");
|
||||
ShortcutBadger.applyCount(activity,0);
|
||||
jpushMsgNum=0;
|
||||
ShortcutBadger.applyCount(activity, 0);
|
||||
jpushMsgNum = 0;
|
||||
CommonAppConfig.getInstance().setFrontGround(true);
|
||||
}
|
||||
}
|
||||
|
@ -10,6 +10,8 @@ import java.util.List;
|
||||
*/
|
||||
|
||||
public class Constants {
|
||||
public static final String NEW_ENTER_ROOM = "enterRoom";
|
||||
|
||||
public static final String URL = "url";
|
||||
public static final String PAYLOAD = "payload";
|
||||
public static final String SEX = "sex";
|
||||
@ -74,7 +76,7 @@ public class Constants {
|
||||
public static final String PAY_BUY_COIN_ALI = "Charge.getAliOrder";
|
||||
public static final String PAY_BUY_COIN_WX = "Charge.getWxOrder";
|
||||
|
||||
public static final String PACKAGE_NAME_ALI = "com.eg.android.AlipayGphone";//支付宝的包名
|
||||
// public static final String PACKAGE_NAME_ALI = "com.eg.android.AlipayGphone";//支付宝的包名
|
||||
public static final String PACKAGE_NAME_WX = "com.tencent.mm";//微信的包名
|
||||
public static final String PACKAGE_NAME_QQ = "com.tencent.mobileqq";//QQ的包名
|
||||
public static final String LAT = "lat";
|
||||
|
@ -27,6 +27,7 @@ import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.event.JavascriptInterfaceEvent;
|
||||
import com.yunbao.common.utils.AndroidBug5497Workaround;
|
||||
import com.yunbao.common.utils.DeviceUtils;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.JavascriptInterfaceUtils;
|
||||
import com.yunbao.common.utils.L;
|
||||
@ -67,14 +68,13 @@ public class WebViewActivity extends AbsActivity {
|
||||
btnEdit = (ImageView) findViewById(R.id.btn_edit);
|
||||
ft_title = (FrameLayout) findViewById(R.id.ft_title);
|
||||
v_spacing = (View) findViewById(R.id.v_spacing);
|
||||
mWebView = findViewById(R.id.webView);
|
||||
AndroidBug5497Workaround.assistActivity(this);
|
||||
|
||||
mWebView = new WebView(mContext);
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
|
||||
params.topMargin = DpUtil.dp2px(1);
|
||||
mWebView.setLayoutParams(params);
|
||||
mWebView.setOverScrollMode(View.OVER_SCROLL_NEVER);
|
||||
rootView.addView(mWebView);
|
||||
// mWebView.setLayoutParams(params);
|
||||
//mWebView.setOverScrollMode(View.OVER_SCROLL_NEVER);
|
||||
mWebView.setWebViewClient(new WebViewClient() {
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
@ -96,6 +96,9 @@ public class WebViewActivity extends AbsActivity {
|
||||
if (url.contains("for")) {
|
||||
mWebView.loadUrl("javascript:goAnchorTab()");
|
||||
}
|
||||
//屏幕高度-ft_title的paddingTop
|
||||
int height = DeviceUtils.getScreenHeight(mContext)-DpUtil.dp2px(24);
|
||||
view.loadUrl("javascript:window.androidObject.setHeight("+height+",0,false)");
|
||||
|
||||
}
|
||||
});
|
||||
|
@ -75,7 +75,7 @@ public class AnchorRecommendItemModel extends BaseModel {
|
||||
private String avatarThumb = "";
|
||||
@SerializedName("avatar2")
|
||||
private String avatar2 = "";
|
||||
@SerializedName("user_nicename")
|
||||
@SerializedName(value = "user_nicename", alternate = "userNiceName")
|
||||
private String userNicename = "";
|
||||
@SerializedName("level")
|
||||
private String level = "";
|
||||
|
@ -0,0 +1,53 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class CheckLiveModel extends BaseModel {
|
||||
|
||||
@SerializedName("type")
|
||||
private int type;
|
||||
@SerializedName("type_val")
|
||||
private String typeVal;
|
||||
@SerializedName("type_msg")
|
||||
private String typeMsg;
|
||||
@SerializedName("live_sdk")
|
||||
private String liveSdk;
|
||||
|
||||
public static CheckLiveModel objectFromData(String str) {
|
||||
|
||||
return new Gson().fromJson(str, CheckLiveModel.class);
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getTypeVal() {
|
||||
return typeVal;
|
||||
}
|
||||
|
||||
public void setTypeVal(String typeVal) {
|
||||
this.typeVal = typeVal;
|
||||
}
|
||||
|
||||
public String getTypeMsg() {
|
||||
return typeMsg;
|
||||
}
|
||||
|
||||
public void setTypeMsg(String typeMsg) {
|
||||
this.typeMsg = typeMsg;
|
||||
}
|
||||
|
||||
public String getLiveSdk() {
|
||||
return liveSdk;
|
||||
}
|
||||
|
||||
public void setLiveSdk(String liveSdk) {
|
||||
this.liveSdk = liveSdk;
|
||||
}
|
||||
}
|
@ -0,0 +1,550 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class EnterRoomInfoModel extends BaseModel {
|
||||
@SerializedName("votestotal")
|
||||
private String votestotal;
|
||||
@SerializedName("medalRankNum")
|
||||
private String medalRankNum;
|
||||
@SerializedName("barrage_fee")
|
||||
private String barrageFee;
|
||||
@SerializedName("userlist_time")
|
||||
private String userlistTime;
|
||||
@SerializedName("chatserver")
|
||||
private String chatserver;
|
||||
@SerializedName("linkmic_uid")
|
||||
private String linkmicUid;
|
||||
@SerializedName("linkmic_pull")
|
||||
private String linkmicPull;
|
||||
@SerializedName("nums")
|
||||
private String nums;
|
||||
@SerializedName("game")
|
||||
private List<?> game;
|
||||
@SerializedName("gamebet")
|
||||
private List<String> gamebet;
|
||||
@SerializedName("gametime")
|
||||
private String gametime;
|
||||
@SerializedName("gameid")
|
||||
private String gameid;
|
||||
@SerializedName("gameaction")
|
||||
private String gameaction;
|
||||
@SerializedName("game_bankerid")
|
||||
private String gameBankerid;
|
||||
@SerializedName("game_banker_name")
|
||||
private String gameBankerName;
|
||||
@SerializedName("game_banker_avatar")
|
||||
private String gameBankerAvatar;
|
||||
@SerializedName("game_banker_coin")
|
||||
private String gameBankerCoin;
|
||||
@SerializedName("game_banker_limit")
|
||||
private String gameBankerLimit;
|
||||
@SerializedName("shut_time")
|
||||
private String shutTime;
|
||||
@SerializedName("kick_time")
|
||||
private String kickTime;
|
||||
@SerializedName("speak_limit")
|
||||
private String speakLimit;
|
||||
@SerializedName("barrage_limit")
|
||||
private String barrageLimit;
|
||||
@SerializedName("coin")
|
||||
private String coin;
|
||||
@SerializedName("vip")
|
||||
private VipModel vip;
|
||||
@SerializedName("liang")
|
||||
private LiangModel liang;
|
||||
@SerializedName("medal_level")
|
||||
private String medalLevel;
|
||||
@SerializedName("medal_name")
|
||||
private String medalName;
|
||||
@SerializedName("issuper")
|
||||
private String issuper;
|
||||
@SerializedName("usertype")
|
||||
private String usertype;
|
||||
@SerializedName("front_task")
|
||||
private String frontTask;
|
||||
@SerializedName("ismic")
|
||||
private String ismic;
|
||||
@SerializedName("isattention")
|
||||
private String isattention;
|
||||
@SerializedName("userlists")
|
||||
private List<LiveUserGiftBean> userlists;
|
||||
@SerializedName("guard")
|
||||
private GuardModel guard;
|
||||
@SerializedName("guard_nums")
|
||||
private String guardNums;
|
||||
@SerializedName("pkinfo")
|
||||
private PkinfoModel pkinfo;
|
||||
@SerializedName("lminfo")
|
||||
private LminfoModel lminfo;
|
||||
@SerializedName("isred")
|
||||
private String isred;
|
||||
@SerializedName("is_fans")
|
||||
private String isFans;
|
||||
@SerializedName("count_fans")
|
||||
private String countFans;
|
||||
@SerializedName("isconnection")
|
||||
private String isconnection;
|
||||
@SerializedName("isleave")
|
||||
private String isleave;
|
||||
@SerializedName("landscape")
|
||||
private String landscape;
|
||||
@SerializedName("un_charge")
|
||||
private String unCharge;
|
||||
@SerializedName("see_time")
|
||||
private String seeTime;
|
||||
@SerializedName("greetings")
|
||||
private List<String> greetings;
|
||||
@SerializedName("live_bg")
|
||||
private String liveBg;
|
||||
@SerializedName("anchor_goodnum")
|
||||
private String anchorGoodnum;
|
||||
@SerializedName("jackpot_level")
|
||||
private String jackpotLevel="-1";
|
||||
|
||||
public String getJackpotLevel() {
|
||||
|
||||
return jackpotLevel;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setJackpotLevel(String jackpotLevel) {
|
||||
this.jackpotLevel = jackpotLevel;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getVotestotal() {
|
||||
return votestotal;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setVotestotal(String votestotal) {
|
||||
this.votestotal = votestotal;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMedalRankNum() {
|
||||
return medalRankNum;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setMedalRankNum(String medalRankNum) {
|
||||
this.medalRankNum = medalRankNum;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getBarrageFee() {
|
||||
return barrageFee;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setBarrageFee(String barrageFee) {
|
||||
this.barrageFee = barrageFee;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserlistTime() {
|
||||
return userlistTime;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setUserlistTime(String userlistTime) {
|
||||
this.userlistTime = userlistTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getChatserver() {
|
||||
return chatserver;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setChatserver(String chatserver) {
|
||||
this.chatserver = chatserver;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLinkmicUid() {
|
||||
return linkmicUid;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setLinkmicUid(String linkmicUid) {
|
||||
this.linkmicUid = linkmicUid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLinkmicPull() {
|
||||
return linkmicPull;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setLinkmicPull(String linkmicPull) {
|
||||
this.linkmicPull = linkmicPull;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNums() {
|
||||
return nums;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setNums(String nums) {
|
||||
this.nums = nums;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<?> getGame() {
|
||||
return game;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setGame(List<?> game) {
|
||||
this.game = game;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<String> getGamebet() {
|
||||
return gamebet;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setGamebet(List<String> gamebet) {
|
||||
this.gamebet = gamebet;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGametime() {
|
||||
return gametime;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setGametime(String gametime) {
|
||||
this.gametime = gametime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGameid() {
|
||||
return gameid;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setGameid(String gameid) {
|
||||
this.gameid = gameid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGameaction() {
|
||||
return gameaction;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setGameaction(String gameaction) {
|
||||
this.gameaction = gameaction;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGameBankerid() {
|
||||
return gameBankerid;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setGameBankerid(String gameBankerid) {
|
||||
this.gameBankerid = gameBankerid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGameBankerName() {
|
||||
return gameBankerName;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setGameBankerName(String gameBankerName) {
|
||||
this.gameBankerName = gameBankerName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGameBankerAvatar() {
|
||||
return gameBankerAvatar;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setGameBankerAvatar(String gameBankerAvatar) {
|
||||
this.gameBankerAvatar = gameBankerAvatar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGameBankerCoin() {
|
||||
return gameBankerCoin;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setGameBankerCoin(String gameBankerCoin) {
|
||||
this.gameBankerCoin = gameBankerCoin;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGameBankerLimit() {
|
||||
return gameBankerLimit;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setGameBankerLimit(String gameBankerLimit) {
|
||||
this.gameBankerLimit = gameBankerLimit;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getShutTime() {
|
||||
return shutTime;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setShutTime(String shutTime) {
|
||||
this.shutTime = shutTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getKickTime() {
|
||||
return kickTime;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setKickTime(String kickTime) {
|
||||
this.kickTime = kickTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSpeakLimit() {
|
||||
return speakLimit;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setSpeakLimit(String speakLimit) {
|
||||
this.speakLimit = speakLimit;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getBarrageLimit() {
|
||||
return barrageLimit;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setBarrageLimit(String barrageLimit) {
|
||||
this.barrageLimit = barrageLimit;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCoin() {
|
||||
return coin;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setCoin(String coin) {
|
||||
this.coin = coin;
|
||||
return this;
|
||||
}
|
||||
|
||||
public VipModel getVip() {
|
||||
return vip;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setVip(VipModel vip) {
|
||||
this.vip = vip;
|
||||
return this;
|
||||
}
|
||||
|
||||
public LiangModel getLiang() {
|
||||
return liang;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setLiang(LiangModel liang) {
|
||||
this.liang = liang;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMedalLevel() {
|
||||
return medalLevel;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setMedalLevel(String medalLevel) {
|
||||
this.medalLevel = medalLevel;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMedalName() {
|
||||
return medalName;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setMedalName(String medalName) {
|
||||
this.medalName = medalName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIssuper() {
|
||||
return issuper;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setIssuper(String issuper) {
|
||||
this.issuper = issuper;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUsertype() {
|
||||
return usertype;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setUsertype(String usertype) {
|
||||
this.usertype = usertype;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getFrontTask() {
|
||||
return frontTask;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setFrontTask(String frontTask) {
|
||||
this.frontTask = frontTask;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIsmic() {
|
||||
return ismic;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setIsmic(String ismic) {
|
||||
this.ismic = ismic;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIsattention() {
|
||||
return isattention;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setIsattention(String isattention) {
|
||||
this.isattention = isattention;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<LiveUserGiftBean> getUserlists() {
|
||||
return userlists;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setUserlists(List<LiveUserGiftBean> userlists) {
|
||||
this.userlists = userlists;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GuardModel getGuard() {
|
||||
return guard;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setGuard(GuardModel guard) {
|
||||
this.guard = guard;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGuardNums() {
|
||||
return guardNums;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setGuardNums(String guardNums) {
|
||||
this.guardNums = guardNums;
|
||||
return this;
|
||||
}
|
||||
|
||||
public PkinfoModel getPkinfo() {
|
||||
return pkinfo;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setPkinfo(PkinfoModel pkinfo) {
|
||||
this.pkinfo = pkinfo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public LminfoModel getLminfo() {
|
||||
return lminfo;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setLminfo(LminfoModel lminfo) {
|
||||
this.lminfo = lminfo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIsred() {
|
||||
return isred;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setIsred(String isred) {
|
||||
this.isred = isred;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIsFans() {
|
||||
return isFans;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setIsFans(String isFans) {
|
||||
this.isFans = isFans;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCountFans() {
|
||||
return countFans;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setCountFans(String countFans) {
|
||||
this.countFans = countFans;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIsconnection() {
|
||||
return isconnection;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setIsconnection(String isconnection) {
|
||||
this.isconnection = isconnection;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIsleave() {
|
||||
return isleave;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setIsleave(String isleave) {
|
||||
this.isleave = isleave;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLandscape() {
|
||||
return landscape;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setLandscape(String landscape) {
|
||||
this.landscape = landscape;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUnCharge() {
|
||||
return unCharge;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setUnCharge(String unCharge) {
|
||||
this.unCharge = unCharge;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSeeTime() {
|
||||
return seeTime;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setSeeTime(String seeTime) {
|
||||
this.seeTime = seeTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<String> getGreetings() {
|
||||
return greetings;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setGreetings(List<String> greetings) {
|
||||
this.greetings = greetings;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLiveBg() {
|
||||
return liveBg;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setLiveBg(String liveBg) {
|
||||
this.liveBg = liveBg;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAnchorGoodnum() {
|
||||
return anchorGoodnum;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setAnchorGoodnum(String anchorGoodnum) {
|
||||
this.anchorGoodnum = anchorGoodnum;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,112 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 整合进入直播间接口
|
||||
*/
|
||||
public class EnterRoomNewModel extends BaseModel {
|
||||
|
||||
@SerializedName("liveInfo")
|
||||
private LiveInfoModel liveInfo = new LiveInfoModel();//直播间信息
|
||||
@SerializedName("enterRoomInfo")
|
||||
private EnterRoomInfoModel enterRoomInfo = new EnterRoomInfoModel();//原接口进入直播间数据返回
|
||||
@SerializedName("rankHour")
|
||||
private RankHourModel rankHour = new RankHourModel();//.热度卡
|
||||
@SerializedName("newPeopleTask")
|
||||
private NewPeopleTaskModel newPeopleTask = new NewPeopleTaskModel();//新人任务
|
||||
@SerializedName("wishList")
|
||||
private WishListModel wishList = new WishListModel();//心愿单
|
||||
@SerializedName("guardUser")
|
||||
private GuardUserModel guardUserAvatar = new GuardUserModel();//守护
|
||||
@SerializedName("activeList")
|
||||
private List<ActiveModel> activeList = new ArrayList<>();//活动列表
|
||||
@SerializedName("isUseHotCard")
|
||||
private String isUseHotCard = "";//是否使用热度卡
|
||||
@SerializedName("liveRoomActivity")
|
||||
private List<LiveRoomActivityModel> liveRoomActivityModels = new ArrayList<>();//活动列表
|
||||
|
||||
public List<LiveRoomActivityModel> getLiveRoomActivityModels() {
|
||||
return liveRoomActivityModels;
|
||||
}
|
||||
|
||||
public EnterRoomNewModel setLiveRoomActivityModels(List<LiveRoomActivityModel> liveRoomActivityModels) {
|
||||
this.liveRoomActivityModels = liveRoomActivityModels;
|
||||
return this;
|
||||
}
|
||||
|
||||
public LiveInfoModel getLiveInfo() {
|
||||
return liveInfo;
|
||||
}
|
||||
|
||||
public EnterRoomNewModel setLiveInfo(LiveInfoModel liveInfo) {
|
||||
this.liveInfo = liveInfo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel getEnterRoomInfo() {
|
||||
return enterRoomInfo;
|
||||
}
|
||||
|
||||
public EnterRoomNewModel setEnterRoomInfo(EnterRoomInfoModel enterRoomInfo) {
|
||||
this.enterRoomInfo = enterRoomInfo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public RankHourModel getRankHour() {
|
||||
return rankHour;
|
||||
}
|
||||
|
||||
public EnterRoomNewModel setRankHour(RankHourModel rankHour) {
|
||||
this.rankHour = rankHour;
|
||||
return this;
|
||||
}
|
||||
|
||||
public NewPeopleTaskModel getNewPeopleTask() {
|
||||
return newPeopleTask;
|
||||
}
|
||||
|
||||
public EnterRoomNewModel setNewPeopleTask(NewPeopleTaskModel newPeopleTask) {
|
||||
this.newPeopleTask = newPeopleTask;
|
||||
return this;
|
||||
}
|
||||
|
||||
public WishListModel getWishList() {
|
||||
return wishList;
|
||||
}
|
||||
|
||||
public EnterRoomNewModel setWishList(WishListModel wishList) {
|
||||
this.wishList = wishList;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GuardUserModel getGuardUserAvatar() {
|
||||
return guardUserAvatar;
|
||||
}
|
||||
|
||||
public EnterRoomNewModel setGuardUserAvatar(GuardUserModel guardUserAvatar) {
|
||||
this.guardUserAvatar = guardUserAvatar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<ActiveModel> getActiveList() {
|
||||
return activeList;
|
||||
}
|
||||
|
||||
public EnterRoomNewModel setActiveList(List<ActiveModel> activeList) {
|
||||
this.activeList = activeList;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIsUseHotCard() {
|
||||
return isUseHotCard;
|
||||
}
|
||||
|
||||
public EnterRoomNewModel setIsUseHotCard(String isUseHotCard) {
|
||||
this.isUseHotCard = isUseHotCard;
|
||||
return this;
|
||||
}
|
||||
}
|
105
common/src/main/java/com/yunbao/common/bean/GiftModel.java
Normal file
@ -0,0 +1,105 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class GiftModel extends BaseModel{
|
||||
@SerializedName("id")
|
||||
private String id;
|
||||
@SerializedName("sendtype")
|
||||
private String sendtype;
|
||||
@SerializedName("type")
|
||||
private String type;
|
||||
@SerializedName("mark")
|
||||
private String mark;
|
||||
@SerializedName("giftname")
|
||||
private String giftname;
|
||||
@SerializedName("needcoin")
|
||||
private String needcoin;
|
||||
@SerializedName("gifticon")
|
||||
private String gifticon;
|
||||
@SerializedName("swf")
|
||||
private String swf;
|
||||
@SerializedName("gift_uid")
|
||||
private String giftUid;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public GiftModel setId(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSendtype() {
|
||||
return sendtype;
|
||||
}
|
||||
|
||||
public GiftModel setSendtype(String sendtype) {
|
||||
this.sendtype = sendtype;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public GiftModel setType(String type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMark() {
|
||||
return mark;
|
||||
}
|
||||
|
||||
public GiftModel setMark(String mark) {
|
||||
this.mark = mark;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGiftname() {
|
||||
return giftname;
|
||||
}
|
||||
|
||||
public GiftModel setGiftname(String giftname) {
|
||||
this.giftname = giftname;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNeedcoin() {
|
||||
return needcoin;
|
||||
}
|
||||
|
||||
public GiftModel setNeedcoin(String needcoin) {
|
||||
this.needcoin = needcoin;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGifticon() {
|
||||
return gifticon;
|
||||
}
|
||||
|
||||
public GiftModel setGifticon(String gifticon) {
|
||||
this.gifticon = gifticon;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSwf() {
|
||||
return swf;
|
||||
}
|
||||
|
||||
public GiftModel setSwf(String swf) {
|
||||
this.swf = swf;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGiftUid() {
|
||||
return giftUid;
|
||||
}
|
||||
|
||||
public GiftModel setGiftUid(String giftUid) {
|
||||
this.giftUid = giftUid;
|
||||
return this;
|
||||
}
|
||||
}
|
29
common/src/main/java/com/yunbao/common/bean/GuardModel.java
Normal file
@ -0,0 +1,29 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class GuardModel extends BaseModel {
|
||||
|
||||
@SerializedName("type")
|
||||
private String type;
|
||||
@SerializedName("endtime")
|
||||
private String endtime;
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public GuardModel setType(String type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getEndtime() {
|
||||
return endtime;
|
||||
}
|
||||
|
||||
public GuardModel setEndtime(String endtime) {
|
||||
this.endtime = endtime;
|
||||
return this;
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class GuardUserModel extends BaseModel{
|
||||
|
||||
@SerializedName("guardUserAvatar")
|
||||
private String guardUserAvatar;
|
||||
@SerializedName("guardType")
|
||||
private String guardType;
|
||||
|
||||
public static GuardUserModel objectFromData(String str) {
|
||||
|
||||
return new Gson().fromJson(str, GuardUserModel.class);
|
||||
}
|
||||
|
||||
public String getGuardUserAvatar() {
|
||||
return guardUserAvatar;
|
||||
}
|
||||
|
||||
public void setGuardUserAvatar(String guardUserAvatar) {
|
||||
this.guardUserAvatar = guardUserAvatar;
|
||||
}
|
||||
|
||||
public String getGuardType() {
|
||||
return guardType;
|
||||
}
|
||||
|
||||
public void setGuardType(String guardType) {
|
||||
this.guardType = guardType;
|
||||
}
|
||||
}
|
@ -66,6 +66,7 @@ public class IMLoginModel extends BaseModel {
|
||||
* noble_name : 贵族
|
||||
* sex : 1
|
||||
* slide : [{"listorder":0,"slide_cid":4,"slide_content":"","slide_des":"首充特惠大禮包","slide_id":91,"slide_name":"首充特惠大禮包","slide_pic":"https://qny.shayucm.com/20220531/90f6942fb928c3034baeb380b9c4003d.gif","slide_status":1,"slide_url":"https://ceshi.yaoulive.com/h5/activity/firstTopUp/newUp.html"},{"listorder":0,"slide_cid":4,"slide_content":"","slide_des":"充值反饋活動","slide_id":88,"slide_name":"充值反饋活動","slide_pic":"https://qny.shayucm.com/20220511/faacb51d5a45f7ff24a6f0314df133fb.gif","slide_status":1,"slide_url":"https://ceshi.yaoulive.com/h5/GuildTournament/202204/Tournament.html"}]
|
||||
* slide : [{"listorder":0,"slide_cid":4,"slide_content":"","slide_des":"首充特惠大禮包","slide_id":91,"slide_name":"首充特惠大禮包","slide_pic":"https://qny.shayucm.com/20220531/90f6942fb928c3034baeb380b9c4003d.gif","slide_status":1,"slide_url":"https://ceshi.yaoulive.com/h5/activity/firstTopUp/newUp.html"},{"listorder":0,"slide_cid":4,"slide_content":"","slide_des":"充值反饋活動","slide_id":88,"slide_name":"充值反饋活動","slide_pic":"https://qny.shayucm.com/20220511/faacb51d5a45f7ff24a6f0314df133fb.gif","slide_status":1,"slide_url":"https://ceshi.yaoulive.com/h5/GuildTournament/202204/Tournament.html"}]
|
||||
* users_type : A
|
||||
* votes : 0.00
|
||||
* votestotal : 0
|
||||
@ -224,6 +225,126 @@ public class IMLoginModel extends BaseModel {
|
||||
//超皇字体颜色
|
||||
@SerializedName("contentColor")
|
||||
private String contentColor = "";
|
||||
//创建时间
|
||||
@SerializedName("create_time")
|
||||
private String createTime = "";
|
||||
|
||||
@SerializedName("is_guess")
|
||||
private String isGuess = "";
|
||||
|
||||
@SerializedName("goodnum_expire_time")
|
||||
private String goodnumExpireTime = "";
|
||||
|
||||
@SerializedName("version")
|
||||
private String version = "";
|
||||
|
||||
@SerializedName("max_noble_end_time")
|
||||
private String maxNobleEndTime = "";
|
||||
|
||||
@SerializedName("custom_color_id")
|
||||
private String customColorId = "";
|
||||
|
||||
@SerializedName("is_chat")
|
||||
private String isChat = "";
|
||||
|
||||
@SerializedName("is_rong")
|
||||
private String isRong = "";
|
||||
|
||||
@SerializedName("contribution")
|
||||
private String contribution = "";
|
||||
|
||||
@SerializedName("guard_type")
|
||||
private String guardType = "";
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public IMLoginModel setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIsGuess() {
|
||||
return isGuess;
|
||||
}
|
||||
|
||||
public IMLoginModel setIsGuess(String isGuess) {
|
||||
this.isGuess = isGuess;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGoodnumExpireTime() {
|
||||
return goodnumExpireTime;
|
||||
}
|
||||
|
||||
public IMLoginModel setGoodnumExpireTime(String goodnumExpireTime) {
|
||||
this.goodnumExpireTime = goodnumExpireTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public IMLoginModel setVersion(String version) {
|
||||
this.version = version;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMaxNobleEndTime() {
|
||||
return maxNobleEndTime;
|
||||
}
|
||||
|
||||
public IMLoginModel setMaxNobleEndTime(String maxNobleEndTime) {
|
||||
this.maxNobleEndTime = maxNobleEndTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCustomColorId() {
|
||||
return customColorId;
|
||||
}
|
||||
|
||||
public IMLoginModel setCustomColorId(String customColorId) {
|
||||
this.customColorId = customColorId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIsChat() {
|
||||
return isChat;
|
||||
}
|
||||
|
||||
public IMLoginModel setIsChat(String isChat) {
|
||||
this.isChat = isChat;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIsRong() {
|
||||
return isRong;
|
||||
}
|
||||
|
||||
public IMLoginModel setIsRong(String isRong) {
|
||||
this.isRong = isRong;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getContribution() {
|
||||
return contribution;
|
||||
}
|
||||
|
||||
public IMLoginModel setContribution(String contribution) {
|
||||
this.contribution = contribution;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGuardType() {
|
||||
return guardType;
|
||||
}
|
||||
|
||||
public IMLoginModel setGuardType(String guardType) {
|
||||
this.guardType = guardType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNobleEndTime() {
|
||||
return nobleEndTime;
|
||||
|
@ -0,0 +1,98 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class LinkMicUserBean extends BaseModel {
|
||||
@SerializedName("user_nicename")
|
||||
private String uname;
|
||||
@SerializedName("avatar")
|
||||
private String avatar;
|
||||
@SerializedName("dress_avatar")
|
||||
private String dress_avatar;
|
||||
private String uid = "";
|
||||
private String action;
|
||||
@SerializedName("id")
|
||||
private String id;//连麦显示右侧头像时要用
|
||||
@SerializedName("level")
|
||||
private int level;
|
||||
@SerializedName("sex")
|
||||
private int sex;
|
||||
|
||||
public String getUname() {
|
||||
return uname;
|
||||
}
|
||||
|
||||
public void setUname(String uname) {
|
||||
this.uname = uname;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(String uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public String getAction() {
|
||||
return action;
|
||||
}
|
||||
|
||||
public void setAction(String action) {
|
||||
this.action = action;
|
||||
}
|
||||
|
||||
public String getDress_avatar() {
|
||||
return dress_avatar;
|
||||
}
|
||||
|
||||
public void setDress_avatar(String dress_avatar) {
|
||||
this.dress_avatar = dress_avatar;
|
||||
}
|
||||
|
||||
public int getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(int level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public int getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(int sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "LinkMicUserBean{" +
|
||||
"uname='" + uname + '\'' +
|
||||
", avatar='" + avatar + '\'' +
|
||||
", dress_avatar='" + dress_avatar + '\'' +
|
||||
", uid='" + uid + '\'' +
|
||||
", action='" + action + '\'' +
|
||||
", id='" + id + '\'' +
|
||||
", level=" + level +
|
||||
", sex=" + sex +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class LinkMicUserBeanV2 extends BaseModel {
|
||||
private String roomuserid;
|
||||
private int status;
|
||||
private List<LinkMicUserBean> userlist;
|
||||
|
||||
public String getRoomuserid() {
|
||||
return roomuserid;
|
||||
}
|
||||
|
||||
public void setRoomuserid(String roomuserid) {
|
||||
this.roomuserid = roomuserid;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public List<LinkMicUserBean> getUserlist() {
|
||||
return userlist;
|
||||
}
|
||||
|
||||
public void setUserlist(List<LinkMicUserBean> userlist) {
|
||||
this.userlist = userlist;
|
||||
}
|
||||
}
|
@ -5,11 +5,10 @@ import android.os.Parcelable;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2017/8/9.
|
||||
@ -53,6 +52,8 @@ public class LiveBean implements Parcelable {
|
||||
private String recommendCardIconSizeTwo = "";
|
||||
private String recommendCardIconSizeThree = "";
|
||||
|
||||
private Map<String,String> params;//用于跳转Activity时扩展参数,例:从首页Banner跳转到直播间时需要根据携带参数判断是否弹出新人特惠对话框
|
||||
|
||||
public String getRecommendCardIconSizeTwo() {
|
||||
return recommendCardIconSizeTwo;
|
||||
}
|
||||
@ -83,6 +84,14 @@ public class LiveBean implements Parcelable {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Map<String, String> getParams() {
|
||||
return params;
|
||||
}
|
||||
|
||||
public void setParams(Map<String, String> params) {
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
public String getRecommendcardtype() {
|
||||
return recommendCardtype;
|
||||
}
|
||||
@ -380,25 +389,26 @@ public class LiveBean implements Parcelable {
|
||||
if (!TextUtils.isEmpty(this.goodNum) && !"0".equals(this.goodNum)) {
|
||||
return this.goodNum;
|
||||
}
|
||||
return this.uid;
|
||||
return this.uid;
|
||||
}
|
||||
|
||||
public LiveBean() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
private LiveBean(Parcel in) {
|
||||
this.uid = in.readString();
|
||||
this.avatar = in.readString();
|
||||
this.avatarThumb = in.readString();
|
||||
this.userNiceName = in.readString();
|
||||
this.sex = in.readInt();
|
||||
this.title = in.readString();
|
||||
this.city = in.readString();
|
||||
this.stream = in.readString();
|
||||
this.pull = in.readString();
|
||||
this.thumb = in.readString();
|
||||
this.nums = in.readString();
|
||||
this.sex = in.readInt();
|
||||
this.distance = in.readString();
|
||||
this.levelAnchor = in.readInt();
|
||||
this.type = in.readInt();
|
||||
@ -406,6 +416,23 @@ public class LiveBean implements Parcelable {
|
||||
this.goodNum = in.readString();
|
||||
this.gameAction = in.readInt();
|
||||
this.game = in.readString();
|
||||
this.islive = in.readString();
|
||||
this.isTop = in.readString();
|
||||
this.pk_avatar_thumb = in.readString();
|
||||
this.landscape = in.readInt();
|
||||
this.hot_num = in.readString();
|
||||
this.content_pic_size_one = in.readString();
|
||||
this.content_pic_size_two = in.readString();
|
||||
this.content_pic_size_three = in.readString();
|
||||
this.is_week = in.readString();
|
||||
this.img = in.readString();
|
||||
this.url = in.readString();
|
||||
this.drpk_status = in.readString();
|
||||
this.is_rong = in.readInt();
|
||||
this.isattention = in.readString();
|
||||
this.recommendCardtype = in.readString();
|
||||
this.recommendCardIconSizeTwo = in.readString();
|
||||
this.recommendCardIconSizeThree = in.readString();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -419,13 +446,13 @@ public class LiveBean implements Parcelable {
|
||||
dest.writeString(this.avatar);
|
||||
dest.writeString(this.avatarThumb);
|
||||
dest.writeString(this.userNiceName);
|
||||
dest.writeInt(this.sex);
|
||||
dest.writeString(this.title);
|
||||
dest.writeString(this.city);
|
||||
dest.writeString(this.stream);
|
||||
dest.writeString(this.pull);
|
||||
dest.writeString(this.thumb);
|
||||
dest.writeString(this.nums);
|
||||
dest.writeInt(this.sex);
|
||||
dest.writeString(this.distance);
|
||||
dest.writeInt(this.levelAnchor);
|
||||
dest.writeInt(this.type);
|
||||
@ -433,6 +460,23 @@ public class LiveBean implements Parcelable {
|
||||
dest.writeString(this.goodNum);
|
||||
dest.writeInt(this.gameAction);
|
||||
dest.writeString(this.game);
|
||||
dest.writeString(this.islive);
|
||||
dest.writeString(this.isTop);
|
||||
dest.writeString(this.pk_avatar_thumb);
|
||||
dest.writeInt(this.landscape);
|
||||
dest.writeString(this.hot_num);
|
||||
dest.writeString(this.content_pic_size_one);
|
||||
dest.writeString(this.content_pic_size_two);
|
||||
dest.writeString(this.content_pic_size_three);
|
||||
dest.writeString(this.is_week);
|
||||
dest.writeString(this.img);
|
||||
dest.writeString(this.url);
|
||||
dest.writeString(this.drpk_status);
|
||||
dest.writeInt(this.is_rong);
|
||||
dest.writeString(this.isattention);
|
||||
dest.writeString(this.recommendCardtype);
|
||||
dest.writeString(this.recommendCardIconSizeTwo);
|
||||
dest.writeString(this.recommendCardIconSizeThree);
|
||||
}
|
||||
|
||||
public static final Creator<LiveBean> CREATOR = new Creator<LiveBean>() {
|
||||
|
@ -62,7 +62,7 @@ public class LiveInfoModel extends BaseModel {
|
||||
@SerializedName("islive")
|
||||
private long islive;
|
||||
@SerializedName("landscape")
|
||||
private long landscape = 0;
|
||||
private int landscape = 0;
|
||||
@SerializedName("is_rong")
|
||||
private long isRong = 0;
|
||||
@SerializedName("nums")
|
||||
@ -208,11 +208,11 @@ public class LiveInfoModel extends BaseModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public long getLandscape() {
|
||||
public int getLandscape() {
|
||||
return landscape;
|
||||
}
|
||||
|
||||
public LiveInfoModel setLandscape(long landscape) {
|
||||
public LiveInfoModel setLandscape(int landscape) {
|
||||
this.landscape = landscape;
|
||||
return this;
|
||||
}
|
||||
|
@ -0,0 +1,66 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
/**
|
||||
* 活动列表
|
||||
*/
|
||||
public class LiveRoomActivityModel extends BaseModel {
|
||||
|
||||
@SerializedName("name")
|
||||
private String name;
|
||||
@SerializedName("img")
|
||||
private String img;
|
||||
@SerializedName("link")
|
||||
private String link;
|
||||
@SerializedName("is_hidden")
|
||||
private String isHidden;
|
||||
@SerializedName("show_type")
|
||||
private String showType;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public LiveRoomActivityModel setName(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getImg() {
|
||||
return img;
|
||||
}
|
||||
|
||||
public LiveRoomActivityModel setImg(String img) {
|
||||
this.img = img;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLink() {
|
||||
return link;
|
||||
}
|
||||
|
||||
public LiveRoomActivityModel setLink(String link) {
|
||||
this.link = link;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIsHidden() {
|
||||
return isHidden;
|
||||
}
|
||||
|
||||
public LiveRoomActivityModel setIsHidden(String isHidden) {
|
||||
this.isHidden = isHidden;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getShowType() {
|
||||
return showType;
|
||||
}
|
||||
|
||||
public LiveRoomActivityModel setShowType(String showType) {
|
||||
this.showType = showType;
|
||||
return this;
|
||||
}
|
||||
}
|
@ -0,0 +1,102 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/10/27.
|
||||
* 直播间用户列表实体类
|
||||
*/
|
||||
|
||||
public class LiveUserGiftBean extends UserBean {
|
||||
|
||||
private String contribution;
|
||||
private int guardType;
|
||||
private int nub;
|
||||
|
||||
public LiveUserGiftBean() {
|
||||
}
|
||||
|
||||
public int getNub() {
|
||||
return nub;
|
||||
}
|
||||
|
||||
public void setNub(int nub) {
|
||||
this.nub = nub;
|
||||
}
|
||||
|
||||
public String getContribution() {
|
||||
return contribution;
|
||||
}
|
||||
|
||||
public void setContribution(String contribution) {
|
||||
this.contribution = contribution;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否送过礼物
|
||||
*/
|
||||
public boolean hasContribution() {
|
||||
return !TextUtils.isEmpty(this.contribution) && !"0".equals(this.contribution);
|
||||
}
|
||||
|
||||
@JSONField(name = "guard_type")
|
||||
public int getGuardType() {
|
||||
return guardType;
|
||||
}
|
||||
|
||||
@JSONField(name = "guard_type")
|
||||
public void setGuardType(int guardType) {
|
||||
this.guardType = guardType;
|
||||
}
|
||||
|
||||
public LiveUserGiftBean(Parcel in) {
|
||||
super(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
super.writeToParcel(dest, flags);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "LiveUserGiftBean{" +
|
||||
"contribution='" + contribution + '\'' +
|
||||
", guardType=" + guardType +
|
||||
", nub=" + nub +
|
||||
", id='" + id + '\'' +
|
||||
", userNiceName='" + userNiceName + '\'' +
|
||||
", avatar='" + avatar + '\'' +
|
||||
", avatarThumb='" + avatarThumb + '\'' +
|
||||
", sex=" + sex +
|
||||
", signature='" + signature + '\'' +
|
||||
", coin='" + coin + '\'' +
|
||||
", gold='" + gold + '\'' +
|
||||
", votes='" + votes + '\'' +
|
||||
", consumption='" + consumption + '\'' +
|
||||
", votestotal='" + votestotal + '\'' +
|
||||
", province='" + province + '\'' +
|
||||
", city='" + city + '\'' +
|
||||
", location='" + location + '\'' +
|
||||
", birthday='" + birthday + '\'' +
|
||||
", level=" + level +
|
||||
", levelAnchor=" + levelAnchor +
|
||||
", lives=" + lives +
|
||||
", follows=" + follows +
|
||||
", fans=" + fans +
|
||||
", vip=" + vip +
|
||||
", liang=" + liang +
|
||||
", car=" + car +
|
||||
", medal_level=" + medal_level +
|
||||
", medal_name='" + medal_name + '\'' +
|
||||
", Dress=" + Dress +
|
||||
", noble_id='" + noble_id + '\'' +
|
||||
", yuanbao='" + yuanbao + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
23
common/src/main/java/com/yunbao/common/bean/LminfoModel.java
Normal file
@ -0,0 +1,23 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class LminfoModel extends BaseModel{
|
||||
|
||||
@SerializedName("status")
|
||||
private int status;
|
||||
|
||||
public static LminfoModel objectFromData(String str) {
|
||||
|
||||
return new Gson().fromJson(str, LminfoModel.class);
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
}
|
@ -1,14 +1,15 @@
|
||||
package com.yunbao.live.bean;
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
|
||||
public class MicUserBean {
|
||||
public class MicUserBean extends BaseModel{
|
||||
protected String id;
|
||||
protected String userNiceName;
|
||||
protected String avatar;
|
||||
protected int level;
|
||||
protected int sex;
|
||||
protected String dress_avatar;
|
||||
protected int type;
|
||||
|
||||
@JSONField(name = "dress_avatar")
|
||||
public String getDress_avatar() {
|
||||
@ -65,4 +66,12 @@ public class MicUserBean {
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class NewPeopleTaskModel extends BaseModel {
|
||||
|
||||
@SerializedName("task")
|
||||
private TaskModel task = new TaskModel();
|
||||
@SerializedName("gift")
|
||||
private GiftModel gift = new GiftModel();
|
||||
@SerializedName("reward_all")
|
||||
private RewardAllModel rewardAll = new RewardAllModel();
|
||||
@SerializedName("reward_one")
|
||||
private RewardAllModel rewardOne = new RewardAllModel();
|
||||
|
||||
public TaskModel getTask() {
|
||||
return task;
|
||||
}
|
||||
|
||||
public NewPeopleTaskModel setTask(TaskModel task) {
|
||||
this.task = task;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GiftModel getGift() {
|
||||
return gift;
|
||||
}
|
||||
|
||||
public NewPeopleTaskModel setGift(GiftModel gift) {
|
||||
this.gift = gift;
|
||||
return this;
|
||||
}
|
||||
|
||||
public RewardAllModel getRewardAll() {
|
||||
return rewardAll;
|
||||
}
|
||||
|
||||
public NewPeopleTaskModel setRewardAll(RewardAllModel rewardAll) {
|
||||
this.rewardAll = rewardAll;
|
||||
return this;
|
||||
}
|
||||
|
||||
public RewardAllModel getRewardOne() {
|
||||
return rewardOne;
|
||||
}
|
||||
|
||||
public NewPeopleTaskModel setRewardOne(RewardAllModel rewardOne) {
|
||||
this.rewardOne = rewardOne;
|
||||
return this;
|
||||
}
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class PKTopThreeModel extends BaseModel {
|
||||
@SerializedName("uid")
|
||||
private String uid;
|
||||
@SerializedName("img")
|
||||
private String img;
|
||||
@SerializedName("liveuid")
|
||||
private String liveuid;
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public PKTopThreeModel setUid(String uid) {
|
||||
this.uid = uid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getImg() {
|
||||
return img;
|
||||
}
|
||||
|
||||
public PKTopThreeModel setImg(String img) {
|
||||
this.img = img;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLiveuid() {
|
||||
return liveuid;
|
||||
}
|
||||
|
||||
public PKTopThreeModel setLiveuid(String liveuid) {
|
||||
this.liveuid = liveuid;
|
||||
return this;
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class PkTopUsersModel extends BaseModel {
|
||||
@SerializedName("red_one")
|
||||
private PKTopThreeModel redOne;
|
||||
@SerializedName("red_two")
|
||||
private PKTopThreeModel redTwo;
|
||||
@SerializedName("red_three")
|
||||
private PKTopThreeModel redThree;
|
||||
@SerializedName("blue_one")
|
||||
private PKTopThreeModel blueOne;
|
||||
@SerializedName("blue_two")
|
||||
private PKTopThreeModel blueTwo;
|
||||
@SerializedName("blue_three")
|
||||
private PKTopThreeModel blueThree;
|
||||
}
|
172
common/src/main/java/com/yunbao/common/bean/PkinfoModel.java
Normal file
@ -0,0 +1,172 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class PkinfoModel extends BaseModel {
|
||||
|
||||
@SerializedName("pkuid")
|
||||
private String pkuid;
|
||||
@SerializedName("pkuname")
|
||||
private String pkuname;
|
||||
@SerializedName("pkuimg")
|
||||
private String pkuimg;
|
||||
@SerializedName("pkpull")
|
||||
private String pkpull;
|
||||
@SerializedName("ifpk")
|
||||
private String ifpk;
|
||||
@SerializedName("pk_time")
|
||||
private String pkTime;
|
||||
@SerializedName("end_pk_time")
|
||||
private String endPkTime;
|
||||
@SerializedName("pk_gift_liveuid")
|
||||
private String pkGiftLiveuid;
|
||||
@SerializedName("pk_gift_pkuid")
|
||||
private String pkGiftPkuid;
|
||||
@SerializedName("anyway")
|
||||
private String anyway;
|
||||
@SerializedName("drpk_status")
|
||||
private String drpkStatus;
|
||||
@SerializedName("drpk_roomid")
|
||||
private String drpkRoomid;
|
||||
@SerializedName("drpk_time")
|
||||
private String drpkTime;
|
||||
@SerializedName("pk_top_users")
|
||||
private PkTopUsersModel pkTopUsers;
|
||||
@SerializedName("userlist")
|
||||
private JsonArray userlist;
|
||||
|
||||
public JsonArray getUserlist() {
|
||||
return userlist;
|
||||
}
|
||||
|
||||
public void setUserlist(JsonArray userlist) {
|
||||
this.userlist = userlist;
|
||||
}
|
||||
|
||||
public String getPkuid() {
|
||||
return pkuid;
|
||||
}
|
||||
|
||||
public PkinfoModel setPkuid(String pkuid) {
|
||||
this.pkuid = pkuid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPkuname() {
|
||||
return pkuname;
|
||||
}
|
||||
|
||||
public PkinfoModel setPkuname(String pkuname) {
|
||||
this.pkuname = pkuname;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPkuimg() {
|
||||
return pkuimg;
|
||||
}
|
||||
|
||||
public PkinfoModel setPkuimg(String pkuimg) {
|
||||
this.pkuimg = pkuimg;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPkpull() {
|
||||
return pkpull;
|
||||
}
|
||||
|
||||
public PkinfoModel setPkpull(String pkpull) {
|
||||
this.pkpull = pkpull;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIfpk() {
|
||||
return ifpk;
|
||||
}
|
||||
|
||||
public PkinfoModel setIfpk(String ifpk) {
|
||||
this.ifpk = ifpk;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPkTime() {
|
||||
return pkTime;
|
||||
}
|
||||
|
||||
public PkinfoModel setPkTime(String pkTime) {
|
||||
this.pkTime = pkTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getEndPkTime() {
|
||||
return endPkTime;
|
||||
}
|
||||
|
||||
public PkinfoModel setEndPkTime(String endPkTime) {
|
||||
this.endPkTime = endPkTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPkGiftLiveuid() {
|
||||
return pkGiftLiveuid;
|
||||
}
|
||||
|
||||
public PkinfoModel setPkGiftLiveuid(String pkGiftLiveuid) {
|
||||
this.pkGiftLiveuid = pkGiftLiveuid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPkGiftPkuid() {
|
||||
return pkGiftPkuid;
|
||||
}
|
||||
|
||||
public PkinfoModel setPkGiftPkuid(String pkGiftPkuid) {
|
||||
this.pkGiftPkuid = pkGiftPkuid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAnyway() {
|
||||
return anyway;
|
||||
}
|
||||
|
||||
public PkinfoModel setAnyway(String anyway) {
|
||||
this.anyway = anyway;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDrpkStatus() {
|
||||
return drpkStatus;
|
||||
}
|
||||
|
||||
public PkinfoModel setDrpkStatus(String drpkStatus) {
|
||||
this.drpkStatus = drpkStatus;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDrpkRoomid() {
|
||||
return drpkRoomid;
|
||||
}
|
||||
|
||||
public PkinfoModel setDrpkRoomid(String drpkRoomid) {
|
||||
this.drpkRoomid = drpkRoomid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDrpkTime() {
|
||||
return drpkTime;
|
||||
}
|
||||
|
||||
public PkinfoModel setDrpkTime(String drpkTime) {
|
||||
this.drpkTime = drpkTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public PkTopUsersModel getPkTopUsers() {
|
||||
return pkTopUsers;
|
||||
}
|
||||
|
||||
public PkinfoModel setPkTopUsers(PkTopUsersModel pkTopUsers) {
|
||||
this.pkTopUsers = pkTopUsers;
|
||||
return this;
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class RankHourModel extends BaseModel {
|
||||
@SerializedName("liveuid")
|
||||
private String liveuid;
|
||||
@SerializedName("hourchart_h5_url")
|
||||
private String hourchartH5Url;
|
||||
@SerializedName("rank")
|
||||
private String rank;
|
||||
@SerializedName("starlightVal")
|
||||
private String starlightVal;
|
||||
@SerializedName("isshow")
|
||||
private String isshow;
|
||||
|
||||
public String getLiveuid() {
|
||||
return liveuid;
|
||||
}
|
||||
|
||||
public RankHourModel setLiveuid(String liveuid) {
|
||||
this.liveuid = liveuid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getHourchartH5Url() {
|
||||
return hourchartH5Url;
|
||||
}
|
||||
|
||||
public RankHourModel setHourchartH5Url(String hourchartH5Url) {
|
||||
this.hourchartH5Url = hourchartH5Url;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getRank() {
|
||||
return rank;
|
||||
}
|
||||
|
||||
public RankHourModel setRank(String rank) {
|
||||
this.rank = rank;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getStarlightVal() {
|
||||
return starlightVal;
|
||||
}
|
||||
|
||||
public RankHourModel setStarlightVal(String starlightVal) {
|
||||
this.starlightVal = starlightVal;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIsshow() {
|
||||
return isshow;
|
||||
}
|
||||
|
||||
public RankHourModel setIsshow(String isshow) {
|
||||
this.isshow = isshow;
|
||||
return this;
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class RewardAllModel extends BaseModel{
|
||||
@SerializedName("gold")
|
||||
private String gold;
|
||||
@SerializedName("experience")
|
||||
private String experience;
|
||||
|
||||
public String getGold() {
|
||||
return gold;
|
||||
}
|
||||
|
||||
public RewardAllModel setGold(String gold) {
|
||||
this.gold = gold;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getExperience() {
|
||||
return experience;
|
||||
}
|
||||
|
||||
public RewardAllModel setExperience(String experience) {
|
||||
this.experience = experience;
|
||||
return this;
|
||||
}
|
||||
}
|
50
common/src/main/java/com/yunbao/common/bean/TaskModel.java
Normal file
@ -0,0 +1,50 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class TaskModel extends BaseModel{
|
||||
@SerializedName("uid")
|
||||
private String uid;
|
||||
@SerializedName("attent")
|
||||
private String attent;
|
||||
@SerializedName("illumine")
|
||||
private String illumine;
|
||||
@SerializedName("sendgift")
|
||||
private String sendgift;
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public TaskModel setUid(String uid) {
|
||||
this.uid = uid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAttent() {
|
||||
return attent;
|
||||
}
|
||||
|
||||
public TaskModel setAttent(String attent) {
|
||||
this.attent = attent;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIllumine() {
|
||||
return illumine;
|
||||
}
|
||||
|
||||
public TaskModel setIllumine(String illumine) {
|
||||
this.illumine = illumine;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSendgift() {
|
||||
return sendgift;
|
||||
}
|
||||
|
||||
public TaskModel setSendgift(String sendgift) {
|
||||
this.sendgift = sendgift;
|
||||
return this;
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class WishListModel extends BaseModel {
|
||||
@SerializedName("wishList")
|
||||
private List<WishModel> wishList;
|
||||
@SerializedName("img")
|
||||
private String img;
|
||||
|
||||
public List<WishModel> getWishList() {
|
||||
return wishList;
|
||||
}
|
||||
|
||||
public WishListModel setWishList(List<WishModel> wishList) {
|
||||
this.wishList = wishList;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getImg() {
|
||||
return img;
|
||||
}
|
||||
|
||||
public WishListModel setImg(String img) {
|
||||
this.img = img;
|
||||
return this;
|
||||
}
|
||||
}
|
106
common/src/main/java/com/yunbao/common/bean/WishModel.java
Normal file
@ -0,0 +1,106 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class WishModel extends BaseModel {
|
||||
|
||||
@SerializedName("id")
|
||||
private String id;
|
||||
@SerializedName("dtime")
|
||||
private String dtime;
|
||||
@SerializedName("luid")
|
||||
private String luid;
|
||||
@SerializedName("lid")
|
||||
private String lid;
|
||||
@SerializedName("wishlist_icon")
|
||||
private String wishlistIcon;
|
||||
@SerializedName("wishlist_num")
|
||||
private String wishlistNum;
|
||||
@SerializedName("wishlist_progress")
|
||||
private String wishlistProgress;
|
||||
@SerializedName("wishlist_name")
|
||||
private String wishlistName;
|
||||
@SerializedName("create_time")
|
||||
private String createTime;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public WishModel setId(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDtime() {
|
||||
return dtime;
|
||||
}
|
||||
|
||||
public WishModel setDtime(String dtime) {
|
||||
this.dtime = dtime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLuid() {
|
||||
return luid;
|
||||
}
|
||||
|
||||
public WishModel setLuid(String luid) {
|
||||
this.luid = luid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLid() {
|
||||
return lid;
|
||||
}
|
||||
|
||||
public WishModel setLid(String lid) {
|
||||
this.lid = lid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getWishlistIcon() {
|
||||
return wishlistIcon;
|
||||
}
|
||||
|
||||
public WishModel setWishlistIcon(String wishlistIcon) {
|
||||
this.wishlistIcon = wishlistIcon;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getWishlistNum() {
|
||||
return wishlistNum;
|
||||
}
|
||||
|
||||
public WishModel setWishlistNum(String wishlistNum) {
|
||||
this.wishlistNum = wishlistNum;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getWishlistProgress() {
|
||||
return wishlistProgress;
|
||||
}
|
||||
|
||||
public WishModel setWishlistProgress(String wishlistProgress) {
|
||||
this.wishlistProgress = wishlistProgress;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getWishlistName() {
|
||||
return wishlistName;
|
||||
}
|
||||
|
||||
public WishModel setWishlistName(String wishlistName) {
|
||||
this.wishlistName = wishlistName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public WishModel setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
return this;
|
||||
}
|
||||
}
|
@ -4,13 +4,16 @@ import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
|
||||
import com.yunbao.common.utils.ClickUtil;
|
||||
|
||||
@ -34,7 +37,7 @@ public abstract class AbsDialogFragment extends DialogFragment {
|
||||
} else {
|
||||
mRootView = LayoutInflater.from(mContext).inflate(getLayoutId(), null);
|
||||
}
|
||||
final Dialog dialog = new Dialog(mContext, getDialogStyle());
|
||||
Dialog dialog = new Dialog(mContext, getDialogStyle());
|
||||
dialog.setContentView(mRootView);
|
||||
dialog.setCancelable(canCancel());
|
||||
dialog.setCanceledOnTouchOutside(canCancel());
|
||||
@ -74,4 +77,12 @@ public abstract class AbsDialogFragment extends DialogFragment {
|
||||
return ClickUtil.canClick();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void show(@NonNull FragmentManager manager, @Nullable String tag) {
|
||||
try {
|
||||
super.show(manager, tag);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,9 @@
|
||||
package com.yunbao.common.dialog;
|
||||
|
||||
import static com.yunbao.common.CommonAppContext.home_zdy_img_cn;
|
||||
import static com.yunbao.common.CommonAppContext.home_zdy_img_us;
|
||||
import static com.yunbao.common.CommonAppContext.lang;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
@ -12,30 +16,14 @@ import androidx.fragment.app.DialogFragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
|
||||
import com.adjust.sdk.Adjust;
|
||||
import com.adjust.sdk.AdjustEvent;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.facebook.appevents.AppEventsLogger;
|
||||
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.event.InstructorOperationEvent;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.HttpClient;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.manager.NoviceInstructorManager;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import static com.yunbao.common.CommonAppContext.home_zdy_img_cn;
|
||||
import static com.yunbao.common.CommonAppContext.home_zdy_img_us;
|
||||
import static com.yunbao.common.CommonAppContext.lang;
|
||||
|
||||
public class InstructorOperationDialog extends AbsDialogFragment {
|
||||
|
||||
@Override
|
||||
@ -96,40 +84,16 @@ public class InstructorOperationDialog extends AbsDialogFragment {
|
||||
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
ImageView to_msg = mRootView.findViewById(R.id.to_msg);
|
||||
if(lang.equals("english")){
|
||||
ImgLoader.display(mContext,home_zdy_img_us, to_msg);
|
||||
}else{
|
||||
ImgLoader.display(mContext,home_zdy_img_cn, to_msg);
|
||||
if (lang.equals("english")) {
|
||||
ImgLoader.display(mContext, home_zdy_img_us, to_msg);
|
||||
} else {
|
||||
ImgLoader.display(mContext, home_zdy_img_cn, to_msg);
|
||||
}
|
||||
|
||||
|
||||
mRootView.findViewById(R.id.to_msg).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
AdjustEvent adjustEvent1 = new AdjustEvent("82nzkz");
|
||||
Adjust.trackEvent(adjustEvent1);
|
||||
CommonHttpUtil.setAdvertisingChannels("82nzkz", new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
FirebaseAnalytics.getInstance(mContext).logEvent("FS_director_enter", null);
|
||||
AppEventsLogger.newLogger(mContext).logEvent("FB_director_enter");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
AdjustEvent adjustEvent2 = new AdjustEvent("ykpmj8");
|
||||
Adjust.trackEvent(adjustEvent2);
|
||||
CommonHttpUtil.setAdvertisingChannels("ykpmj8", new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
FirebaseAnalytics.getInstance(mContext).logEvent("FS_director_message_box", null);
|
||||
AppEventsLogger.newLogger(mContext).logEvent("FB_director_message_box");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
EventBus.getDefault().post(new InstructorOperationEvent());
|
||||
dismiss();
|
||||
}
|
||||
|
@ -63,9 +63,9 @@ public class API extends BaseApi {
|
||||
loggingInterceptor.setPrintLevel(HttpLoggingInterceptor.Level.BODY);
|
||||
OkHttpClient.Builder builder = new OkHttpClient()
|
||||
.newBuilder()
|
||||
|
||||
.addInterceptor(initQuery(isNeedUid,CommonAppContext.sInstance.getApplicationContext()))
|
||||
.addInterceptor(loggingInterceptor);
|
||||
|
||||
return create(builder.build(),
|
||||
GsonConverterFactory.create(gson), RxJava2CallAdapterFactory.create(), CommonAppConfig.HOST, PDLiveApi.class);
|
||||
}
|
||||
|
@ -4,7 +4,6 @@ import android.content.Context;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
|
||||
import com.adjust.sdk.Adjust;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
@ -196,6 +195,10 @@ public class CommonHttpUtil {
|
||||
JSONArray levelArray = obj.getJSONArray("level_new");
|
||||
new NewLevelManager(context).UpDataLevel(levelArray.toJSONString());
|
||||
}
|
||||
if (obj.containsKey("levelanchor_new")) {//缓存等级数据
|
||||
JSONArray levelArray = obj.getJSONArray("levelanchor_new");
|
||||
new NewLevelManager(context).UpAnchorDataLevel(levelArray.toJSONString());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
String error = "info[0]:" + info[0] + "\n\n\n" + "Exception:" + e.getClass() + "---message--->" + e.getMessage();
|
||||
ErrorActivity.forward("GetConfig接口返回数据异常", error);
|
||||
@ -417,14 +420,14 @@ public class CommonHttpUtil {
|
||||
.params("touid", touid)
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
//埋点唯一性
|
||||
public static void setAdvertisingChannels(String operation, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Tx.setAdvertisingChannels", CommonHttpConsts.GET_USER_BASEINFO)
|
||||
.params("operation", operation)
|
||||
.params("marking", Adjust.getAdid())
|
||||
.execute(callback);
|
||||
}
|
||||
//
|
||||
// //埋点唯一性
|
||||
// public static void setAdvertisingChannels(String operation, HttpCallback callback) {
|
||||
// HttpClient.getInstance().get("Tx.setAdvertisingChannels", CommonHttpConsts.GET_USER_BASEINFO)
|
||||
// .params("operation", operation)
|
||||
// .params("marking", Adjust.getAdid())
|
||||
// .execute(callback);
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
@ -3,11 +3,14 @@ package com.yunbao.common.http;
|
||||
import com.yunbao.common.bean.ActiveModel;
|
||||
import com.yunbao.common.bean.AnchorRecommendModel;
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
import com.yunbao.common.bean.CheckLiveModel;
|
||||
import com.yunbao.common.bean.ContributeModel;
|
||||
import com.yunbao.common.bean.CustomSidebarInfoModel;
|
||||
import com.yunbao.common.bean.EnterRoomNewModel;
|
||||
import com.yunbao.common.bean.FaceBookUpModel;
|
||||
import com.yunbao.common.bean.HourRank;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.bean.LinkMicUserBeanV2;
|
||||
import com.yunbao.common.bean.LiveInfoModel;
|
||||
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
||||
import com.yunbao.common.bean.MsgSwitchDetailModel;
|
||||
@ -171,10 +174,10 @@ public interface PDLiveApi {
|
||||
Observable<ResponseModel<List<ActiveModel>>> getActiveList();
|
||||
|
||||
/**
|
||||
* 获取活动
|
||||
* 获取多人连麦列表
|
||||
*/
|
||||
@GET("/api/public/?service=live.getDrLm")
|
||||
Observable<ResponseModel<List<ActiveModel>>> getDrLm();
|
||||
Observable<ResponseModel<List<LinkMicUserBeanV2>>> getDrLm(@Query("uid")String uid);
|
||||
|
||||
/**
|
||||
* 获取日榜、周榜数据
|
||||
@ -268,5 +271,71 @@ public interface PDLiveApi {
|
||||
* PK排位赛接口
|
||||
*/
|
||||
@GET("/api/public/?service=Ranking.getAnchorRankData")
|
||||
Observable<ResponseModel<PkRankBean>> getPkRanksList(@Query("anchor_id") String anchorId,@Query("anchor_id2")String pkUid);
|
||||
Observable<ResponseModel<PkRankBean>> getPkRanksList(@Query("anchor_id") String anchorId, @Query("anchor_id2") String pkUid);
|
||||
|
||||
/**
|
||||
* 多人连麦-创建房间
|
||||
*/
|
||||
@GET("/api/public/?service=Live.createDrLm")
|
||||
Observable<ResponseModel<BaseModel>> createDrLm();
|
||||
|
||||
/**
|
||||
* 多人连麦-关闭房间
|
||||
*/
|
||||
@GET("/api/public/?service=Live.delDrLm")
|
||||
Observable<ResponseModel<BaseModel>> delDrLm();
|
||||
|
||||
/**
|
||||
* 多人连麦-踢出用户
|
||||
* @param uid 对方uid
|
||||
* @param roomId 当前房间号
|
||||
*/
|
||||
@GET("/api/public/?service=Live.killDrLm")
|
||||
Observable<ResponseModel<BaseModel>> killDrLm(@Query("uid") String uid, @Query("roomid") String roomId);
|
||||
|
||||
/**
|
||||
* 新进入房间接口
|
||||
*
|
||||
* @param groupId 房间名 g+liveUid
|
||||
* @param stream
|
||||
* @param liveUid
|
||||
* @param city
|
||||
* @return
|
||||
*/
|
||||
@GET("/api/public/?service=Live.enterRoomNew")
|
||||
Observable<ResponseModel<EnterRoomNewModel>> enterRoomNew(
|
||||
@Query("GroupId") String groupId,
|
||||
@Query("stream") String stream,
|
||||
@Query("liveuid") String liveUid,
|
||||
@Query("city") String city
|
||||
);
|
||||
|
||||
/**
|
||||
* 检查直播间状态
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GET("/api/public/?service=Live.checkLive")
|
||||
Observable<ResponseModel<List<CheckLiveModel>>> checkLive(
|
||||
@Query("liveuid") String liveUid,
|
||||
@Query("stream") String stream
|
||||
);
|
||||
|
||||
/**
|
||||
* 加入房间推送Im欢迎语
|
||||
*/
|
||||
@GET("/api/public/?service=Tx.userJoinRoomNew")
|
||||
Observable<ResponseModel<String>> userJoinRoomNew(
|
||||
@Query("GroupId") String GroupId,
|
||||
@Query("stream") String stream
|
||||
);
|
||||
|
||||
/**
|
||||
* 加入房间推送Im欢迎语
|
||||
*/
|
||||
@GET("/api/public/?service=Tx.leaveRoomNew")
|
||||
Observable<ResponseModel<List<Object>>> leaveRoomNew(
|
||||
@Query("GroupId") String GroupId,
|
||||
@Query("stream") String stream
|
||||
);
|
||||
}
|
||||
|
@ -0,0 +1,30 @@
|
||||
package com.yunbao.common.http.base;
|
||||
|
||||
import com.yunbao.common.bean.CheckLiveModel;
|
||||
|
||||
/**
|
||||
* 直播间类型返回
|
||||
*/
|
||||
public interface CheckLiveCallBack {
|
||||
/**
|
||||
* ;普通房
|
||||
*/
|
||||
void forwardNormalRoom(CheckLiveModel model);
|
||||
|
||||
/**
|
||||
* 密码房
|
||||
*/
|
||||
void forwardPwdRoom(CheckLiveModel model);
|
||||
|
||||
/**
|
||||
* 收费房
|
||||
*/
|
||||
void forwardPayRoom(CheckLiveModel model);
|
||||
|
||||
/**
|
||||
* 请求失败
|
||||
*
|
||||
* @param error
|
||||
*/
|
||||
void onError(String error);
|
||||
}
|
@ -2,26 +2,35 @@ package com.yunbao.common.http.live;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.ActiveModel;
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
import com.yunbao.common.bean.CheckLiveModel;
|
||||
import com.yunbao.common.bean.CustomSidebarInfoModel;
|
||||
import com.yunbao.common.bean.EnterRoomNewModel;
|
||||
import com.yunbao.common.bean.LinkMicUserBean;
|
||||
import com.yunbao.common.bean.LinkMicUserBeanV2;
|
||||
import com.yunbao.common.bean.LiveInfoModel;
|
||||
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
||||
import com.yunbao.common.bean.NobleRankHideUserListModel;
|
||||
import com.yunbao.common.bean.NobleTrumpetModel;
|
||||
import com.yunbao.common.bean.PkRankBean;
|
||||
import com.yunbao.common.bean.SetAttentsModel;
|
||||
import com.yunbao.common.bean.StarChallengeStatusModel;
|
||||
import com.yunbao.common.bean.VipModel;
|
||||
import com.yunbao.common.http.API;
|
||||
import com.yunbao.common.http.ResponseModel;
|
||||
import com.yunbao.common.http.base.CheckLiveCallBack;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.Observable;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
import io.reactivex.functions.Consumer;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
@ -291,4 +300,219 @@ public class LiveNetManager {
|
||||
}
|
||||
}, throwable -> callback.onError(throwable.getMessage())).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查直播间状态
|
||||
*
|
||||
* @param liveUid
|
||||
* @param stream
|
||||
* @param callBack
|
||||
*/
|
||||
public void checkLive(String liveUid, String stream, CheckLiveCallBack callBack) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.checkLive(liveUid, stream)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<List<CheckLiveModel>>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<List<CheckLiveModel>> listResponseModel) throws Exception {
|
||||
if (listResponseModel.getData().getCode() == 0) {
|
||||
List<CheckLiveModel> checkLiveModels = listResponseModel.getData().getInfo();
|
||||
if (checkLiveModels.size() > 0) {
|
||||
CheckLiveModel liveModel = checkLiveModels.get(0);
|
||||
switch (liveModel.getType()) {
|
||||
case Constants.LIVE_TYPE_NORMAL:
|
||||
if (callBack != null) {
|
||||
callBack.forwardNormalRoom(liveModel);
|
||||
}
|
||||
break;
|
||||
case Constants.LIVE_TYPE_PWD:
|
||||
if (callBack != null) {
|
||||
callBack.forwardPwdRoom(liveModel);
|
||||
}
|
||||
break;
|
||||
case Constants.LIVE_TYPE_PAY:
|
||||
case Constants.LIVE_TYPE_TIME:
|
||||
if (callBack != null) {
|
||||
callBack.forwardPayRoom(liveModel);
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (callBack != null) {
|
||||
callBack.onError(listResponseModel.getData().getMsg());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (callBack != null) {
|
||||
callBack.onError(listResponseModel.getData().getMsg());
|
||||
}
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callBack != null) {
|
||||
callBack.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新进入直播间接口
|
||||
*
|
||||
* @param stream
|
||||
* @param liveUid
|
||||
* @param city
|
||||
* @param callback
|
||||
*/
|
||||
private Disposable enterRoomDisposable = null;
|
||||
|
||||
public void enterRoomNew(String stream, String liveUid, String city, HttpCallback<EnterRoomNewModel> callback) {
|
||||
enterRoomDisposable = API.get().pdLiveApi(mContext)
|
||||
.enterRoomNew("g" + liveUid, stream, liveUid, city)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<EnterRoomNewModel>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<EnterRoomNewModel> enterRoomNewModelResponseModel) throws Exception {
|
||||
Log.e("进入房间", "enterRoomNew--------------------------------------------");
|
||||
enterRoomDisposable = null;
|
||||
if (callback != null) {
|
||||
callback.onSuccess(enterRoomNewModelResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
enterRoomDisposable = null;
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 加入房间推送IM消息
|
||||
*
|
||||
* @param stream
|
||||
* @param liveUid
|
||||
*/
|
||||
private Disposable userJoinDisposable = null;
|
||||
|
||||
public void userJoinRoomNew(String stream, String liveUid) {
|
||||
userJoinDisposable = API.get().pdLiveApi(mContext)
|
||||
.userJoinRoomNew("g" + liveUid, stream)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<String>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<String> stringResponseModel) throws Exception {
|
||||
Log.e("进入房间", "userJoinRoomNew--------------------------------------------");
|
||||
userJoinDisposable = null;
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
userJoinDisposable = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 离开直播间
|
||||
*
|
||||
* @param stream
|
||||
* @param liveUid
|
||||
*/
|
||||
public void leaveRoomNew(String stream, String liveUid, HttpCallback<String> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.leaveRoomNew("g" + liveUid, stream)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<List<Object>>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<List<Object>> listResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(null);
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取多人连麦用户列表
|
||||
*/
|
||||
public void getDRMicUserList(String uid, HttpCallback<List<LinkMicUserBean>> callback) {
|
||||
API.get().createPDLiveApi(false)
|
||||
.getDrLm(uid)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<List<LinkMicUserBeanV2>>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<List<LinkMicUserBeanV2>> listResponseModel) throws Exception {
|
||||
List<LinkMicUserBean> list = new ArrayList<>();
|
||||
for (LinkMicUserBeanV2 bean : listResponseModel.getData().getInfo()) {
|
||||
list.addAll(bean.getUserlist());
|
||||
for (LinkMicUserBean userBean : bean.getUserlist()) {
|
||||
Log.i("多人连麦", "list: " + userBean.toString());
|
||||
}
|
||||
}
|
||||
Log.i("多人连麦", "accept: " + list.size());
|
||||
if (callback != null) {
|
||||
callback.onSuccess(list);
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
private Disposable randomPkApi;
|
||||
|
||||
public void getRandomPk(String mLiveUid, String pkUid, HttpCallback<PkRankBean> callback) {
|
||||
randomPkApi = API.get().pdLiveApi(mContext)
|
||||
.getPkRanksList(mLiveUid, pkUid)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.subscribe(listResponseModel -> {
|
||||
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 直播间取消网络请求
|
||||
*/
|
||||
public void cancelLive() {
|
||||
if (userJoinDisposable != null) {
|
||||
userJoinDisposable.dispose();
|
||||
}
|
||||
if (enterRoomDisposable != null) {
|
||||
enterRoomDisposable.dispose();
|
||||
}
|
||||
if (randomPkApi != null) {
|
||||
randomPkApi.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,9 @@ import java.util.List;
|
||||
*/
|
||||
public class NewLevelManager extends BaseCacheManager {
|
||||
private final String KEY_USER_LEVEL = "keyUserLevel";
|
||||
private final String KEY_ANCHOR_LEVEL = "keyAnchorLevel";
|
||||
private List<NewLevelModel> newLevelModels = new ArrayList<>();
|
||||
private List<NewLevelModel> keyAnchorLevel = new ArrayList<>();
|
||||
|
||||
public NewLevelManager(Context context) {
|
||||
super(context);
|
||||
@ -41,5 +43,24 @@ public class NewLevelManager extends BaseCacheManager {
|
||||
return getList(KEY_USER_LEVEL, new TypeToken<List<NewLevelModel>>() {
|
||||
}.getType());
|
||||
}
|
||||
/**
|
||||
* 缓存等级图标
|
||||
*
|
||||
* @param json
|
||||
*/
|
||||
public void UpAnchorDataLevel(String json) {
|
||||
newLevelModels = new Gson().fromJson(json, new TypeToken<List<NewLevelModel>>() {
|
||||
}.getType());
|
||||
put(KEY_ANCHOR_LEVEL, newLevelModels);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取等级数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public List<NewLevelModel> getNewAnchorLevelModels() {
|
||||
return getList(KEY_ANCHOR_LEVEL, new TypeToken<List<NewLevelModel>>() {
|
||||
}.getType());
|
||||
}
|
||||
}
|
||||
|
@ -3,16 +3,8 @@ package com.yunbao.common.manager.imrongcloud;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.adjust.sdk.Adjust;
|
||||
import com.adjust.sdk.AdjustEvent;
|
||||
import com.facebook.appevents.AppEventsLogger;
|
||||
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||
import com.google.gson.Gson;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -41,7 +33,7 @@ public class PDMessageInterceptor implements MessageInterceptor {
|
||||
Log.e("PDMessageInterceptor", textMessage.getContent());
|
||||
//删除消息
|
||||
IMCenter.getInstance().deleteRemoteMessages(Conversation.ConversationType.PRIVATE, message.getTargetId(), messages, null);
|
||||
IMCenter.getInstance().clearMessagesUnreadStatus(Conversation.ConversationType.PRIVATE, message.getTargetId(), null);
|
||||
IMCenter.getInstance().clearMessagesUnreadStatus(Conversation.ConversationType.PRIVATE, message.getTargetId(), null);
|
||||
|
||||
// return true;
|
||||
}
|
||||
@ -53,7 +45,7 @@ public class PDMessageInterceptor implements MessageInterceptor {
|
||||
IMLoginModel userBean = new Gson().fromJson(userInfo.getExtra(), IMLoginModel.class);
|
||||
//新手指导员
|
||||
if (!TextUtils.isEmpty(userBean.getIsAdmin()) && TextUtils.equals(userBean.getIsAdmin(), "1")) {
|
||||
//wow
|
||||
//wow
|
||||
|
||||
} else {//非指导员
|
||||
|
||||
@ -71,7 +63,7 @@ public class PDMessageInterceptor implements MessageInterceptor {
|
||||
*/
|
||||
@Override
|
||||
public void onSuccess(List<Message> messages) {
|
||||
if (messages.size() == 0||(messages.size()==1&&((TextMessage) messages.get(0).getContent()).getContent().contains("LivePK"))) {
|
||||
if (messages.size() == 0 || (messages.size() == 1 && ((TextMessage) messages.get(0).getContent()).getContent().contains("LivePK"))) {
|
||||
IMCenter.getInstance().removeConversation(Conversation.ConversationType.PRIVATE, message.getTargetId(), null);
|
||||
}
|
||||
}
|
||||
|
@ -295,21 +295,21 @@ public class PayPresenter {
|
||||
if (mActivity == null || TextUtils.isEmpty(mServiceNameAli)|| TextUtils.isEmpty(mAliCallbackUrl)) {
|
||||
return;
|
||||
}
|
||||
if (!CommonAppConfig.isAppExist(Constants.PACKAGE_NAME_ALI)) {
|
||||
ToastUtil.show(R.string.coin_ali_not_install);
|
||||
return;
|
||||
}
|
||||
// if (!CommonAppConfig.isAppExist(Constants.PACKAGE_NAME_ALI)) {
|
||||
// ToastUtil.show(R.string.coin_ali_not_install);
|
||||
// return;
|
||||
// }
|
||||
if (TextUtils.isEmpty(mAliPartner) || TextUtils.isEmpty(mAliSellerId) || TextUtils.isEmpty(mAliPrivateKey)) {
|
||||
ToastUtil.show(Constants.PAY_ALI_NOT_ENABLE);
|
||||
return;
|
||||
}
|
||||
AliPayBuilder builder = new AliPayBuilder(mActivity, mAliPartner, mAliSellerId, mAliPrivateKey);
|
||||
builder.setMoney(money);
|
||||
builder.setGoodsName(goodsName);
|
||||
builder.setCallbackUrl(mAliCallbackUrl);
|
||||
builder.setOrderParams(StringUtil.contact(mServiceNameAli, orderParams));
|
||||
builder.setPayCallback(mPayCallback);
|
||||
builder.pay();
|
||||
// AliPayBuilder builder = new AliPayBuilder(mActivity, mAliPartner, mAliSellerId, mAliPrivateKey);
|
||||
// builder.setMoney(money);
|
||||
// builder.setGoodsName(goodsName);
|
||||
// builder.setCallbackUrl(mAliCallbackUrl);
|
||||
// builder.setOrderParams(StringUtil.contact(mServiceNameAli, orderParams));
|
||||
// builder.setPayCallback(mPayCallback);
|
||||
// builder.pay();
|
||||
}
|
||||
|
||||
|
||||
|
@ -22,213 +22,214 @@ import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2017/9/21.
|
||||
* 禁用支付宝
|
||||
*/
|
||||
|
||||
@Deprecated
|
||||
public class AliPayBuilder {
|
||||
|
||||
private Activity mActivity;
|
||||
private String mPartner;// 商户ID
|
||||
private String mSellerId; // 商户收款账号
|
||||
private String mPrivateKey; // 商户私钥,pkcs8格式
|
||||
private String mPayInfo;//支付宝订单信息 包括 商品信息,订单签名,签名类型
|
||||
private String mGoodsName;//商品名称
|
||||
private String mMoney;//要支付的金额
|
||||
private String mOrderParams;//订单获取订单需要的参数
|
||||
private String mCallbackUrl;//支付宝充值回调地址
|
||||
private PayHandler mPayHandler;
|
||||
|
||||
public AliPayBuilder(Activity activity, String partner, String sellerId, String privateKey) {
|
||||
mActivity = new WeakReference<>(activity).get();
|
||||
mPartner = partner;
|
||||
mSellerId = sellerId;
|
||||
mPrivateKey = privateKey;
|
||||
}
|
||||
|
||||
public AliPayBuilder setMoney(String money) {
|
||||
mMoney = money;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AliPayBuilder setGoodsName(String goodsName) {
|
||||
mGoodsName = goodsName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AliPayBuilder setOrderParams(String orderParams) {
|
||||
mOrderParams = orderParams;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public AliPayBuilder setPayCallback(PayCallback callback) {
|
||||
mPayHandler = new PayHandler(callback);
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setCallbackUrl(String callbackUrl) {
|
||||
mCallbackUrl = callbackUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* 从服务器端获取订单号,即下单
|
||||
*/
|
||||
public void pay() {
|
||||
if (TextUtils.isEmpty(mOrderParams) || TextUtils.isEmpty(mMoney) || TextUtils.isEmpty(mGoodsName)|| TextUtils.isEmpty(mCallbackUrl)) {
|
||||
return;
|
||||
}
|
||||
CommonHttpUtil.getAliOrder(mOrderParams, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
JSONObject obj = JSON.parseObject(info[0]);
|
||||
String orderInfo = createAliOrder(obj.getString("orderid"));//商品信息
|
||||
String sign = getOrderSign(orderInfo);//订单签名
|
||||
if (TextUtils.isEmpty(sign)) {
|
||||
ToastUtil.show("商户私钥错误,订单签名失败");
|
||||
return;
|
||||
}
|
||||
sign = urlEncode(sign);
|
||||
String signType = "sign_type=\"RSA\"";//签名类型
|
||||
mPayInfo = orderInfo + "&sign=\"" + sign + "\"&" + signType;
|
||||
L.e("支付宝订单信息----->" + mPayInfo);
|
||||
invokeAliPay();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean showLoadingDialog() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dialog createLoadingDialog() {
|
||||
return DialogUitl.loadingDialog(mActivity);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据订单号和商品信息生成支付宝格式的订单信息
|
||||
*
|
||||
* @param orderId 服务器返回的订单号
|
||||
* @return
|
||||
*/
|
||||
private String createAliOrder(String orderId) {
|
||||
// 合作者身份ID
|
||||
String orderInfo = "partner=" + "\"" + mPartner + "\"";
|
||||
|
||||
// 卖家支付宝账号
|
||||
orderInfo += "&seller_id=" + "\"" + mSellerId + "\"";
|
||||
|
||||
// 商户网站唯一订单号
|
||||
orderInfo += "&out_trade_no=" + "\"" + orderId + "\"";
|
||||
|
||||
// 商品名称
|
||||
orderInfo += "&subject=" + "\"" + mGoodsName + "\"";
|
||||
|
||||
// 商品详情
|
||||
orderInfo += "&body=" + "\"" + mGoodsName + "\"";
|
||||
|
||||
// 商品金额
|
||||
orderInfo += "&total_fee=" + "\"" + mMoney + "\"";
|
||||
|
||||
// 服务器异步通知页面路径 //服务器异步通知页面路径 参数 notify_url,如果商户没设定,则不会进行该操作
|
||||
orderInfo += "¬ify_url=" + "\"" + mCallbackUrl + "\"";
|
||||
|
||||
// 接口名称, 固定值
|
||||
orderInfo += "&service=\"mobile.securitypay.pay\"";
|
||||
|
||||
// 支付类型, 固定值
|
||||
orderInfo += "&payment_type=\"1\"";
|
||||
|
||||
// 参数编码, 固定值
|
||||
orderInfo += "&_input_charset=\"utf-8\"";
|
||||
|
||||
// 设置未付款交易的超时时间
|
||||
// 默认30分钟,一旦超时,该笔交易就会自动被关闭。
|
||||
// 取值范围:1m〜15d。
|
||||
// m-分钟,h-小时,d-天,1c-当天(无论交易何时创建,都在0点关闭)。
|
||||
// 该参数数值不接受小数点,如1.5h,可转换为90m。
|
||||
orderInfo += "&it_b_pay=\"30m\"";
|
||||
|
||||
// 支付宝处理完请求后,当前页面跳转到商户指定页面的路径,可空
|
||||
orderInfo += "&return_url=\"m.alipay.com\"";
|
||||
|
||||
// 调用银行卡支付,需配置此参数,参与签名, 固定值
|
||||
// orderInfo += "&paymethod=\"expressGateway\"";
|
||||
|
||||
return orderInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据订单信息生成订单的签名
|
||||
*
|
||||
* @param orderInfo 订单信息
|
||||
* @return
|
||||
*/
|
||||
private String getOrderSign(String orderInfo) {
|
||||
return SignUtils.sign(orderInfo, mPrivateKey);
|
||||
}
|
||||
|
||||
/**
|
||||
* 对订单签名进行urlencode转码
|
||||
*
|
||||
* @param sign 签名
|
||||
* @return
|
||||
*/
|
||||
private String urlEncode(String sign) {
|
||||
try {
|
||||
sign = URLEncoder.encode(sign, "UTF-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return sign;
|
||||
}
|
||||
|
||||
/**
|
||||
* 调用支付宝sdk
|
||||
*/
|
||||
private void invokeAliPay() {
|
||||
// new Thread(new Runnable() {
|
||||
//
|
||||
// private Activity mActivity;
|
||||
// private String mPartner;// 商户ID
|
||||
// private String mSellerId; // 商户收款账号
|
||||
// private String mPrivateKey; // 商户私钥,pkcs8格式
|
||||
// private String mPayInfo;//支付宝订单信息 包括 商品信息,订单签名,签名类型
|
||||
// private String mGoodsName;//商品名称
|
||||
// private String mMoney;//要支付的金额
|
||||
// private String mOrderParams;//订单获取订单需要的参数
|
||||
// private String mCallbackUrl;//支付宝充值回调地址
|
||||
// private PayHandler mPayHandler;
|
||||
//
|
||||
// public AliPayBuilder(Activity activity, String partner, String sellerId, String privateKey) {
|
||||
// mActivity = new WeakReference<>(activity).get();
|
||||
// mPartner = partner;
|
||||
// mSellerId = sellerId;
|
||||
// mPrivateKey = privateKey;
|
||||
// }
|
||||
//
|
||||
// public AliPayBuilder setMoney(String money) {
|
||||
// mMoney = money;
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
// public AliPayBuilder setGoodsName(String goodsName) {
|
||||
// mGoodsName = goodsName;
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
// public AliPayBuilder setOrderParams(String orderParams) {
|
||||
// mOrderParams = orderParams;
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
//
|
||||
// public AliPayBuilder setPayCallback(PayCallback callback) {
|
||||
// mPayHandler = new PayHandler(callback);
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
// public void setCallbackUrl(String callbackUrl) {
|
||||
// mCallbackUrl = callbackUrl;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 从服务器端获取订单号,即下单
|
||||
// */
|
||||
// public void pay() {
|
||||
// if (TextUtils.isEmpty(mOrderParams) || TextUtils.isEmpty(mMoney) || TextUtils.isEmpty(mGoodsName)|| TextUtils.isEmpty(mCallbackUrl)) {
|
||||
// return;
|
||||
// }
|
||||
// CommonHttpUtil.getAliOrder(mOrderParams, new HttpCallback() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
//// PayTask alipay = new PayTask(mActivity);
|
||||
// //执行支付,这是一个耗时操作,最后返回支付的结果,用handler发送到主线程
|
||||
//// Map<String, String> result = alipay.payV2(mPayInfo, true);
|
||||
//// L.e("支付宝返回结果----->" + result);
|
||||
//// if (mPayHandler != null) {
|
||||
//// Message msg = Message.obtain();
|
||||
//// msg.obj = result;
|
||||
//// mPayHandler.sendMessage(msg);
|
||||
//// }
|
||||
//// }
|
||||
// }).start();
|
||||
}
|
||||
|
||||
|
||||
private static class PayHandler extends Handler {
|
||||
|
||||
private PayCallback mPayCallback;
|
||||
|
||||
public PayHandler(PayCallback payCallback) {
|
||||
mPayCallback = new WeakReference<>(payCallback).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleMessage(Message msg) {
|
||||
if (mPayCallback != null) {
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, String> result = (Map<String, String>) msg.obj;
|
||||
if ("9000".equals(result.get("resultStatus"))) {
|
||||
mPayCallback.onSuccess();
|
||||
} else {
|
||||
mPayCallback.onFailed();
|
||||
}
|
||||
}
|
||||
mPayCallback = null;
|
||||
}
|
||||
}
|
||||
// public void onSuccess(int code, String msg, String[] info) {
|
||||
// if (code == 0 && info.length > 0) {
|
||||
// JSONObject obj = JSON.parseObject(info[0]);
|
||||
// String orderInfo = createAliOrder(obj.getString("orderid"));//商品信息
|
||||
// String sign = getOrderSign(orderInfo);//订单签名
|
||||
// if (TextUtils.isEmpty(sign)) {
|
||||
// ToastUtil.show("商户私钥错误,订单签名失败");
|
||||
// return;
|
||||
// }
|
||||
// sign = urlEncode(sign);
|
||||
// String signType = "sign_type=\"RSA\"";//签名类型
|
||||
// mPayInfo = orderInfo + "&sign=\"" + sign + "\"&" + signType;
|
||||
// L.e("支付宝订单信息----->" + mPayInfo);
|
||||
// invokeAliPay();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean showLoadingDialog() {
|
||||
// return true;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public Dialog createLoadingDialog() {
|
||||
// return DialogUitl.loadingDialog(mActivity);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// });
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 根据订单号和商品信息生成支付宝格式的订单信息
|
||||
// *
|
||||
// * @param orderId 服务器返回的订单号
|
||||
// * @return
|
||||
// */
|
||||
// private String createAliOrder(String orderId) {
|
||||
// // 合作者身份ID
|
||||
// String orderInfo = "partner=" + "\"" + mPartner + "\"";
|
||||
//
|
||||
// // 卖家支付宝账号
|
||||
// orderInfo += "&seller_id=" + "\"" + mSellerId + "\"";
|
||||
//
|
||||
// // 商户网站唯一订单号
|
||||
// orderInfo += "&out_trade_no=" + "\"" + orderId + "\"";
|
||||
//
|
||||
// // 商品名称
|
||||
// orderInfo += "&subject=" + "\"" + mGoodsName + "\"";
|
||||
//
|
||||
// // 商品详情
|
||||
// orderInfo += "&body=" + "\"" + mGoodsName + "\"";
|
||||
//
|
||||
// // 商品金额
|
||||
// orderInfo += "&total_fee=" + "\"" + mMoney + "\"";
|
||||
//
|
||||
// // 服务器异步通知页面路径 //服务器异步通知页面路径 参数 notify_url,如果商户没设定,则不会进行该操作
|
||||
// orderInfo += "¬ify_url=" + "\"" + mCallbackUrl + "\"";
|
||||
//
|
||||
// // 接口名称, 固定值
|
||||
// orderInfo += "&service=\"mobile.securitypay.pay\"";
|
||||
//
|
||||
// // 支付类型, 固定值
|
||||
// orderInfo += "&payment_type=\"1\"";
|
||||
//
|
||||
// // 参数编码, 固定值
|
||||
// orderInfo += "&_input_charset=\"utf-8\"";
|
||||
//
|
||||
// // 设置未付款交易的超时时间
|
||||
// // 默认30分钟,一旦超时,该笔交易就会自动被关闭。
|
||||
// // 取值范围:1m〜15d。
|
||||
// // m-分钟,h-小时,d-天,1c-当天(无论交易何时创建,都在0点关闭)。
|
||||
// // 该参数数值不接受小数点,如1.5h,可转换为90m。
|
||||
// orderInfo += "&it_b_pay=\"30m\"";
|
||||
//
|
||||
// // 支付宝处理完请求后,当前页面跳转到商户指定页面的路径,可空
|
||||
// orderInfo += "&return_url=\"m.alipay.com\"";
|
||||
//
|
||||
// // 调用银行卡支付,需配置此参数,参与签名, 固定值
|
||||
// // orderInfo += "&paymethod=\"expressGateway\"";
|
||||
//
|
||||
// return orderInfo;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 根据订单信息生成订单的签名
|
||||
// *
|
||||
// * @param orderInfo 订单信息
|
||||
// * @return
|
||||
// */
|
||||
// private String getOrderSign(String orderInfo) {
|
||||
// return SignUtils.sign(orderInfo, mPrivateKey);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 对订单签名进行urlencode转码
|
||||
// *
|
||||
// * @param sign 签名
|
||||
// * @return
|
||||
// */
|
||||
// private String urlEncode(String sign) {
|
||||
// try {
|
||||
// sign = URLEncoder.encode(sign, "UTF-8");
|
||||
// } catch (UnsupportedEncodingException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// return sign;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 调用支付宝sdk
|
||||
// */
|
||||
// private void invokeAliPay() {
|
||||
//// new Thread(new Runnable() {
|
||||
//// @Override
|
||||
//// public void run() {
|
||||
////// PayTask alipay = new PayTask(mActivity);
|
||||
//// //执行支付,这是一个耗时操作,最后返回支付的结果,用handler发送到主线程
|
||||
////// Map<String, String> result = alipay.payV2(mPayInfo, true);
|
||||
////// L.e("支付宝返回结果----->" + result);
|
||||
////// if (mPayHandler != null) {
|
||||
////// Message msg = Message.obtain();
|
||||
////// msg.obj = result;
|
||||
////// mPayHandler.sendMessage(msg);
|
||||
////// }
|
||||
////// }
|
||||
//// }).start();
|
||||
// }
|
||||
//
|
||||
//
|
||||
// private static class PayHandler extends Handler {
|
||||
//
|
||||
// private PayCallback mPayCallback;
|
||||
//
|
||||
// public PayHandler(PayCallback payCallback) {
|
||||
// mPayCallback = new WeakReference<>(payCallback).get();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void handleMessage(Message msg) {
|
||||
// if (mPayCallback != null) {
|
||||
// @SuppressWarnings("unchecked")
|
||||
// Map<String, String> result = (Map<String, String>) msg.obj;
|
||||
// if ("9000".equals(result.get("resultStatus"))) {
|
||||
// mPayCallback.onSuccess();
|
||||
// } else {
|
||||
// mPayCallback.onFailed();
|
||||
// }
|
||||
// }
|
||||
// mPayCallback = null;
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import android.util.Log;
|
||||
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.LiveGiftBean;
|
||||
import com.yunbao.common.http.CommonHttpConsts;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
@ -59,7 +60,7 @@ public class GiftCacheUtil {
|
||||
} else {
|
||||
DownloadUtil downloadUtil = new DownloadUtil();
|
||||
if (forwhat.equals("1")) {
|
||||
ToastUtil.show("礼物正在获取中...");
|
||||
ToastUtil.show(R.string.gift_way);
|
||||
}
|
||||
downloadUtil.download(CommonHttpConsts.DOWNLOAD_GIF, dir, fileName, url, new DownloadUtil.Callback() {
|
||||
String TAG="下载";
|
||||
|
@ -64,14 +64,13 @@ public class JavascriptInterfaceUtils {
|
||||
}
|
||||
|
||||
public static JavascriptInterfaceUtils getInstance() {
|
||||
if (sInstance == null) {
|
||||
synchronized (CityUtil.class) {
|
||||
if (sInstance == null) {
|
||||
sInstance = new JavascriptInterfaceUtils();
|
||||
}
|
||||
}
|
||||
|
||||
synchronized (JavascriptInterfaceUtils.class) {
|
||||
|
||||
sInstance = new JavascriptInterfaceUtils();
|
||||
|
||||
return sInstance;
|
||||
}
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
|
||||
@ -117,8 +116,13 @@ public class JavascriptInterfaceUtils {
|
||||
@JavascriptInterface
|
||||
public void androidClickToNewH5PageView(String url) {
|
||||
url = CommonAppConfig.HOST + url;
|
||||
url += "?uid=" + CommonAppConfig.getInstance().getUid() + "&token="
|
||||
+ CommonAppConfig.getInstance().getToken();
|
||||
if (url.contains("?")) {
|
||||
url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token="
|
||||
+ CommonAppConfig.getInstance().getToken();
|
||||
} else {
|
||||
url += "?uid=" + CommonAppConfig.getInstance().getUid() + "&token="
|
||||
+ CommonAppConfig.getInstance().getToken();
|
||||
}
|
||||
if (LiveZhuangBana) {
|
||||
RouteUtil.forwardLiveZhuangBanActivity(url, false);
|
||||
} else {
|
||||
@ -135,8 +139,13 @@ public class JavascriptInterfaceUtils {
|
||||
@JavascriptInterface
|
||||
public void androidClickToNewH5PageView(String url, String title) {
|
||||
url = CommonAppConfig.HOST + url;
|
||||
url += "?uid=" + CommonAppConfig.getInstance().getUid() + "&token="
|
||||
+ CommonAppConfig.getInstance().getToken();
|
||||
if (url.contains("?")) {
|
||||
url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token="
|
||||
+ CommonAppConfig.getInstance().getToken();
|
||||
} else {
|
||||
url += "?uid=" + CommonAppConfig.getInstance().getUid() + "&token="
|
||||
+ CommonAppConfig.getInstance().getToken();
|
||||
}
|
||||
if (LiveZhuangBana) {
|
||||
RouteUtil.forwardLiveZhuangBanActivity(url, title);
|
||||
} else {
|
||||
@ -467,15 +476,23 @@ public class JavascriptInterfaceUtils {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置webView高度
|
||||
* @param useDp 是否用dp换算
|
||||
*/
|
||||
@JavascriptInterface
|
||||
public void setHeight(String height, String width) {
|
||||
public void setHeight(String height, String width,boolean useDp) {
|
||||
if ("0".equals(height)) {
|
||||
return;
|
||||
}
|
||||
Handler handler = new Handler(Looper.getMainLooper());
|
||||
handler.post(() -> {
|
||||
ViewGroup.LayoutParams params = mWebView.getLayoutParams();
|
||||
params.height = DpUtil.dp2px(Integer.parseInt(height));
|
||||
if("-1".equals(height)){
|
||||
params.height=ViewGroup.LayoutParams.MATCH_PARENT;
|
||||
}else {
|
||||
params.height = useDp?DpUtil.dp2px(Integer.parseInt(height)):Integer.parseInt(height);
|
||||
}
|
||||
mWebView.setLayoutParams(params);
|
||||
mWebView.setVisibility(View.VISIBLE);
|
||||
});
|
||||
|
@ -0,0 +1,209 @@
|
||||
package com.yunbao.common.utils;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.util.Log;
|
||||
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
import com.yunbao.common.http.API;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.HttpClient;
|
||||
import com.yunbao.common.http.ResponseModel;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import cn.rongcloud.rtc.api.RCRTCEngine;
|
||||
import cn.rongcloud.rtc.api.callback.IRCRTCResultCallback;
|
||||
import cn.rongcloud.rtc.api.callback.IRCRTCSwitchRoleCallback;
|
||||
import cn.rongcloud.rtc.base.RTCErrorCode;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.functions.Consumer;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
/**
|
||||
* 统一管理连麦状态
|
||||
*/
|
||||
public class MicStatusManager {
|
||||
public static final int MIC_TYPE_DEFAULT = 0;//默认状态,未连麦
|
||||
public static final int MIC_TYPE_REQUEST = 1;//请求连麦中
|
||||
public static final int MIC_TYPE_OPEN = 2;//连麦中
|
||||
private static MicStatusManager manager;
|
||||
private int micStatus;//连麦状态
|
||||
private String micLiveId;//主播uid
|
||||
private boolean anchorOpenRoom = false;//主播是否开启连麦房
|
||||
private List<OnMicStatusListener> listeners;
|
||||
|
||||
public static MicStatusManager getInstance() {
|
||||
if (manager == null) {
|
||||
manager = new MicStatusManager();
|
||||
}
|
||||
return manager;
|
||||
}
|
||||
|
||||
private MicStatusManager() {
|
||||
listeners = new ArrayList<>();
|
||||
}
|
||||
|
||||
/**
|
||||
* 连麦状态监听器,申请、连麦中触发onStart,退出连麦触发onClose
|
||||
*/
|
||||
public void addOnMicListener(OnMicStatusListener listener) {
|
||||
listeners.add(listener);
|
||||
}
|
||||
|
||||
public void removeOnMicListener(OnMicStatusListener listener) {
|
||||
listeners.remove(listener);
|
||||
}
|
||||
|
||||
public void setMicData(int micStatus, String micLiveId) {
|
||||
this.micLiveId = micLiveId;
|
||||
this.micStatus = micStatus;
|
||||
|
||||
for (OnMicStatusListener listener : listeners) {
|
||||
listener.onStart();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isAnchorOpenRoom() {
|
||||
return anchorOpenRoom;
|
||||
}
|
||||
|
||||
public void setAnchorOpenRoom(boolean anchorOpenRoom) {
|
||||
this.anchorOpenRoom = anchorOpenRoom;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
micStatus = 0;
|
||||
micLiveId = "";
|
||||
for (OnMicStatusListener listener : listeners) {
|
||||
listener.onClose();
|
||||
}
|
||||
}
|
||||
|
||||
public int getMicStatus() {
|
||||
return micStatus;
|
||||
}
|
||||
|
||||
public String getMicLiveId() {
|
||||
return micLiveId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MicStatusManager{" +
|
||||
"micStatus=" + micStatus +
|
||||
", micLiveId='" + micLiveId + '\'' +
|
||||
'}';
|
||||
}
|
||||
|
||||
/**
|
||||
* 断开连麦
|
||||
*/
|
||||
public void downMic() {
|
||||
HttpClient.getInstance().get("live.leaveDrLm", "live.leaveDrLm")
|
||||
.params("roomid", micLiveId)
|
||||
.params("uid", CommonAppConfig.getInstance().getUid())
|
||||
.execute(new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
Log.e("ry", code + "退出多人");
|
||||
RCRTCEngine.getInstance().getRoom().getLocalUser().switchToAudience(new IRCRTCSwitchRoleCallback() {
|
||||
|
||||
/**
|
||||
* 当切换失败且SDK处于无法回退状态时回调,该角色已经无法使用当前角色继续进行音视频。
|
||||
* SDK内部会退出房间并清理所有资源,该用户只能重新加入房间才能继续音视频。
|
||||
*/
|
||||
@Override
|
||||
public void onKicked() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
Log.e("ry", "下麦成功");
|
||||
// 该用户切换为观众成功,可以以观众身份进行音视频
|
||||
//退出rtc播放
|
||||
RCRTCEngine.getInstance().leaveRoom(new IRCRTCResultCallback() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
Log.e("ry", "退出多人房间成功");
|
||||
new Handler(Looper.getMainLooper()).post(new Runnable() {
|
||||
public void run() {
|
||||
MicStatusManager.getInstance().clear();
|
||||
ToastUtil.show("已成功退出語音連麥");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(RTCErrorCode errorCode) {
|
||||
Log.e("ry", errorCode + "退出多人房间成功");
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 当切换失败且不影响当前角色继续音视频时回调
|
||||
* @param errorCode 失败错误码
|
||||
*/
|
||||
@Override
|
||||
public void onFailed(RTCErrorCode errorCode) {
|
||||
Log.e("ry", "下麦失败" + errorCode);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 主播关闭连麦权限
|
||||
*/
|
||||
public void closeMic(Context mContext) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.delDrLm()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<BaseModel>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<BaseModel> stringResponseModel) throws Exception {
|
||||
System.out.println("stringResponseModel.getData() = " + stringResponseModel.getData());
|
||||
anchorOpenRoom = false;
|
||||
}
|
||||
}, Throwable::printStackTrace)
|
||||
.isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否在连麦中
|
||||
*
|
||||
* @param toUid 目标uid
|
||||
*/
|
||||
public boolean isMic(String toUid) {
|
||||
return micStatus == MIC_TYPE_OPEN && !micLiveId.equals(toUid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示退出连麦状态对话框
|
||||
*/
|
||||
public void showDownMicDialog(Context context) {
|
||||
DialogUitl.showSimpleDialog(context, "當前正在連麥中", new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
// downMic(); //不做下麦跳转
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public interface OnMicStatusListener {
|
||||
void onStart();
|
||||
|
||||
void onClose();
|
||||
}
|
||||
}
|
@ -3,8 +3,10 @@ package com.yunbao.common.utils;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
import com.alibaba.android.arouter.facade.Postcard;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.HtmlConfig;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
@ -100,7 +102,7 @@ public class RouteUtil {
|
||||
}
|
||||
Constants.myUrl = url + "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&t=" + System.currentTimeMillis();
|
||||
ARouter.getInstance().build(PATH_MYWEBVIEWACTIVTITY)
|
||||
.withString(Constants.URL,url)
|
||||
.withString(Constants.URL, url)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
@ -185,14 +187,25 @@ public class RouteUtil {
|
||||
* 打开直播页面
|
||||
*/
|
||||
public static void forwardLiveAudienceActivity(LiveBean mLiveBean, int mLiveType, int mLiveSDK, int mLiveTypeVal) {
|
||||
ARouter.getInstance().build(PATH_LIVE_AUDIENCE)
|
||||
if (MicStatusManager.getInstance().isMic(mLiveBean.getUid())) {
|
||||
MicStatusManager.getInstance().showDownMicDialog(CommonAppContext.activityWeakReference.get());
|
||||
return;
|
||||
}
|
||||
Postcard postcard = ARouter.getInstance().build(PATH_LIVE_AUDIENCE)
|
||||
.withBoolean(Constants.NEW_ENTER_ROOM, false)
|
||||
.withParcelable(Constants.LIVE_BEAN, mLiveBean)
|
||||
.withInt(Constants.LIVE_TYPE, mLiveType)
|
||||
.withInt(Constants.LIVE_SDK, mLiveSDK)
|
||||
.withInt(Constants.LIVE_TYPE_VAL, mLiveTypeVal)
|
||||
.navigation();
|
||||
.withInt(Constants.LIVE_TYPE_VAL, mLiveTypeVal);
|
||||
if (mLiveBean.getParams() != null) {
|
||||
for (String key : mLiveBean.getParams().keySet()) {
|
||||
postcard.withString(key, mLiveBean.getParams().get(key));
|
||||
}
|
||||
}
|
||||
postcard.navigation();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 举报个人
|
||||
*/
|
||||
|
@ -10,26 +10,29 @@ import android.net.Uri;
|
||||
import android.os.Handler;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.king.app.dialog.AppDialog;
|
||||
import com.king.app.updater.AppUpdater;
|
||||
import com.king.app.updater.UpdateConfig;
|
||||
import com.king.app.updater.callback.UpdateCallback;
|
||||
import com.king.app.updater.http.OkHttpManager;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.ConfigBean;
|
||||
|
||||
import constant.UiType;
|
||||
import model.UiConfig;
|
||||
import model.UpdateConfig;
|
||||
import update.UpdateAppUtils;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2017/10/9.
|
||||
*/
|
||||
import java.io.File;
|
||||
|
||||
public class VersionUtil {
|
||||
|
||||
private static String sVersion;
|
||||
|
||||
|
||||
public TextView tvProgress;
|
||||
public ProgressBar progressBar;
|
||||
/**
|
||||
* 是否是最新版本
|
||||
*/
|
||||
@ -46,170 +49,171 @@ public class VersionUtil {
|
||||
else return false;
|
||||
// return curVersion.equal(version);
|
||||
}
|
||||
|
||||
|
||||
//是否是谷歌版本
|
||||
public static void showDialog(final Activity context, ConfigBean configBean, final String downloadUrl) {
|
||||
if (configBean.getForceUpdate() != 0) {
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == false) {
|
||||
if (!TextUtils.isEmpty(downloadUrl)) {
|
||||
try {
|
||||
UpdateAppUtils.init(context);
|
||||
UpdateConfig updateConfig = new UpdateConfig();
|
||||
updateConfig.setForce(true);
|
||||
updateConfig.setShowNotification(true);
|
||||
updateConfig.setAlwaysShowDownLoadDialog(true);
|
||||
|
||||
//UI
|
||||
UiConfig uiConfig = new UiConfig();
|
||||
uiConfig.setUiType(UiType.PLENTIFUL);
|
||||
UpdateAppUtils
|
||||
.getInstance()
|
||||
.uiConfig(uiConfig)
|
||||
.apkUrl(downloadUrl)
|
||||
.updateConfig(updateConfig)
|
||||
.updateTitle("发现新版本")
|
||||
.updateContent(configBean.getUpdateDes())
|
||||
.update();
|
||||
|
||||
} catch (Exception e) {
|
||||
ToastUtil.show(R.string.version_download_url_error);
|
||||
}
|
||||
} else {
|
||||
ToastUtil.show(R.string.version_download_url_error);
|
||||
}
|
||||
|
||||
//谷歌更新
|
||||
} else if (CommonAppConfig.IS_GOOGLE_PLAY == true) {
|
||||
if ("0".equals(configBean.getGoogle_isup())) {
|
||||
DialogUitl.Builder builder = new DialogUitl.Builder(context);
|
||||
builder.setTitle(WordUtil.getString(R.string.version_update))
|
||||
.setContent(configBean.getUpdateDes())
|
||||
.setConfrimString(WordUtil.getString(R.string.version_immediate_use))
|
||||
.setCancelString(WordUtil.getString(R.string.version_not_update))
|
||||
.setCancelable(true)
|
||||
.setClickCallback(new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
try {
|
||||
Intent i = new Intent(android.content.Intent.ACTION_VIEW);
|
||||
i.setData(Uri.parse("https://play.google.com/store/apps/details?id=com.pdlive.shayu"));
|
||||
context.startActivity(i);
|
||||
} catch (Exception e) {
|
||||
ToastUtil.show(R.string.version_download_url_error);
|
||||
}
|
||||
}
|
||||
})
|
||||
.build()
|
||||
.show();
|
||||
} else {
|
||||
DialogUitl.Builder builder = new DialogUitl.Builder(context);
|
||||
builder.setTitle(WordUtil.getString(R.string.version_update))
|
||||
.setContent(configBean.getUpdateDes())
|
||||
.setConfrimString(WordUtil.getString(R.string.version_immediate_use))
|
||||
.setCancelString(WordUtil.getString(R.string.version_not_update))
|
||||
.setCancelable(false)
|
||||
.setClickCallback(new DialogUitl.SimpleCallback2() {
|
||||
public void onCancelClick() {
|
||||
context.finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
Intent i = new Intent(android.content.Intent.ACTION_VIEW);
|
||||
i.setData(Uri.parse("https://play.google.com/store/apps/details?id=com.pdlive.shayu"));
|
||||
context.startActivity(i);
|
||||
context.finish();
|
||||
}
|
||||
})
|
||||
.build()
|
||||
.show();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == false) {
|
||||
if (!TextUtils.isEmpty(downloadUrl)) {
|
||||
try {
|
||||
UpdateAppUtils.init(context);
|
||||
UpdateConfig updateConfig = new UpdateConfig();
|
||||
updateConfig.setShowNotification(true);
|
||||
updateConfig.setAlwaysShowDownLoadDialog(true);
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
//UI
|
||||
UiConfig uiConfig = new UiConfig();
|
||||
uiConfig.setUiType(UiType.PLENTIFUL);
|
||||
UpdateAppUtils
|
||||
.getInstance()
|
||||
.uiConfig(uiConfig)
|
||||
.apkUrl(downloadUrl)
|
||||
.updateConfig(updateConfig)
|
||||
.updateTitle("新版本更新")
|
||||
.updateContent(configBean.getUpdateDes())
|
||||
.update();
|
||||
}
|
||||
}, 2000);
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
ToastUtil.show(R.string.version_download_url_error);
|
||||
}
|
||||
} else {
|
||||
ToastUtil.show(R.string.version_download_url_error);
|
||||
}
|
||||
} else if (CommonAppConfig.IS_GOOGLE_PLAY) {
|
||||
if ( "0".equals(configBean.getGoogle_isup())) {
|
||||
Log.e("tagg", "111111");
|
||||
DialogUitl.Builder builder = new DialogUitl.Builder(context);
|
||||
builder.setTitle(WordUtil.getString(R.string.version_update))
|
||||
.setContent(configBean.getUpdateDes())
|
||||
.setConfrimString(WordUtil.getString(R.string.version_immediate_use))
|
||||
.setCancelString(WordUtil.getString(R.string.version_not_update))
|
||||
.setCancelable(true)
|
||||
.setClickCallback(new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
try {
|
||||
Intent i = new Intent(android.content.Intent.ACTION_VIEW);
|
||||
i.setData(Uri.parse("https://play.google.com/store/apps/details?id=com.pdlive.shayu"));
|
||||
context.startActivity(i);
|
||||
} catch (Exception e) {
|
||||
ToastUtil.show(R.string.version_download_url_error);
|
||||
}
|
||||
}
|
||||
})
|
||||
.build()
|
||||
.show();
|
||||
} else {
|
||||
DialogUitl.Builder builder = new DialogUitl.Builder(context);
|
||||
builder.setTitle(WordUtil.getString(R.string.version_update))
|
||||
.setContent(configBean.getUpdateDes())
|
||||
.setConfrimString(WordUtil.getString(R.string.version_immediate_use))
|
||||
.setCancelString(WordUtil.getString(R.string.version_not_update))
|
||||
.setCancelable(false)
|
||||
.setClickCallback(new DialogUitl.SimpleCallback2() {
|
||||
public void onCancelClick() {
|
||||
context.finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
Intent i = new Intent(android.content.Intent.ACTION_VIEW);
|
||||
i.setData(Uri.parse("https://play.google.com/store/apps/details?id=com.pdlive.shayu"));
|
||||
context.startActivity(i);
|
||||
context.finish();
|
||||
}
|
||||
})
|
||||
.build()
|
||||
.show();
|
||||
}
|
||||
|
||||
}
|
||||
public void updateProgress(long progress, long total){
|
||||
if(tvProgress == null || progressBar == null){
|
||||
return;
|
||||
}
|
||||
if(progress > 0){
|
||||
int currProgress = (int)(progress * 1.0f / total * 100.0f);
|
||||
tvProgress.setText(currProgress + "%");
|
||||
progressBar.setProgress(currProgress);
|
||||
}else{
|
||||
tvProgress.setText("稍等");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void upd( Activity context, ConfigBean configBean, String downloadUrl){
|
||||
UpdateConfig config = new UpdateConfig();
|
||||
config.setUrl(downloadUrl);
|
||||
config.addHeader("token","xxxxxx");
|
||||
AppUpdater mAppUpdater = new AppUpdater(context,config)
|
||||
.setHttpManager(OkHttpManager.getInstance())
|
||||
.setUpdateCallback(new UpdateCallback() {
|
||||
|
||||
@Override
|
||||
public void onDownloading(boolean isDownloading) {
|
||||
if(isDownloading){
|
||||
ToastUtil.show("已经在下载中,请勿重复下载。");
|
||||
}else{
|
||||
// showToast("开始下载…");
|
||||
View view = LayoutInflater.from(context).inflate(R.layout.dialog_progress,null);
|
||||
tvProgress = view.findViewById(R.id.tvProgress);
|
||||
progressBar = view.findViewById(R.id.progressBar);
|
||||
AppDialog.INSTANCE.showDialog(context,view,false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart(String url) {
|
||||
updateProgress(0,100);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProgress(long progress, long total, boolean isChange) {
|
||||
if(isChange){
|
||||
updateProgress(progress,total);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish(File file) {
|
||||
AppDialog.INSTANCE.dismissDialog();
|
||||
ToastUtil.show("下载完成");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Exception e) {
|
||||
AppDialog.INSTANCE.dismissDialog();
|
||||
ToastUtil.show("下载失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancel() {
|
||||
AppDialog.INSTANCE.dismissDialog();
|
||||
ToastUtil.show("取消下载");
|
||||
}
|
||||
});
|
||||
mAppUpdater.start();
|
||||
}
|
||||
//是否是谷歌版本
|
||||
public void showDialog( Activity context, ConfigBean configBean, String downloadUrl) {
|
||||
//不是谷歌
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == false) {
|
||||
//不强更
|
||||
if(configBean.getForceUpdate()!=1){
|
||||
DialogUitl.Builder builder = new DialogUitl.Builder(context);
|
||||
builder.setTitle(WordUtil.getString(R.string.version_update))
|
||||
.setContent(configBean.getUpdateDes())
|
||||
.setConfrimString(WordUtil.getString(R.string.version_immediate_use))
|
||||
.setCancelString(WordUtil.getString(R.string.version_not_update))
|
||||
.setCancelable(false)
|
||||
.setClickCallback(new DialogUitl.SimpleCallback2() {
|
||||
public void onCancelClick() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
upd(context,configBean,downloadUrl);
|
||||
}
|
||||
})
|
||||
.build()
|
||||
.show();
|
||||
}else{
|
||||
DialogUitl.Builder builder = new DialogUitl.Builder(context);
|
||||
builder.setTitle(WordUtil.getString(R.string.version_update))
|
||||
.setContent(configBean.getUpdateDes())
|
||||
.setConfrimString(WordUtil.getString(R.string.version_immediate_use))
|
||||
.setCancelString(WordUtil.getString(R.string.version_not_update))
|
||||
.setCancelable(false)
|
||||
.setClickCallback(new DialogUitl.SimpleCallback2() {
|
||||
public void onCancelClick() {
|
||||
context.finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
upd(context,configBean,downloadUrl);
|
||||
}
|
||||
})
|
||||
.build()
|
||||
.show();
|
||||
}
|
||||
|
||||
//谷歌版本
|
||||
} else if (CommonAppConfig.IS_GOOGLE_PLAY == true) {
|
||||
//谷歌强制更新
|
||||
if(configBean.getGoogle_isup().equals("1")) {
|
||||
DialogUitl.Builder builder = new DialogUitl.Builder(context);
|
||||
builder.setTitle(WordUtil.getString(R.string.version_update))
|
||||
.setContent(configBean.getUpdateDes())
|
||||
.setConfrimString(WordUtil.getString(R.string.version_immediate_use))
|
||||
.setCancelString(WordUtil.getString(R.string.version_not_update))
|
||||
.setCancelable(false)
|
||||
.setClickCallback(new DialogUitl.SimpleCallback2() {
|
||||
public void onCancelClick() {
|
||||
context.finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
Intent i = new Intent(android.content.Intent.ACTION_VIEW);
|
||||
i.setData(Uri.parse("https://play.google.com/store/apps/details?id=com.pdlive.shayu"));
|
||||
context.startActivity(i);
|
||||
context.finish();
|
||||
}
|
||||
})
|
||||
.build()
|
||||
.show();
|
||||
//谷歌不强制
|
||||
}else {
|
||||
DialogUitl.Builder builder = new DialogUitl.Builder(context);
|
||||
builder.setTitle(WordUtil.getString(R.string.version_update))
|
||||
.setContent(configBean.getUpdateDes())
|
||||
.setConfrimString(WordUtil.getString(R.string.version_immediate_use))
|
||||
.setCancelString(WordUtil.getString(R.string.version_not_update))
|
||||
.setCancelable(false)
|
||||
.setClickCallback(new DialogUitl.SimpleCallback2() {
|
||||
public void onCancelClick() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
Intent i = new Intent(android.content.Intent.ACTION_VIEW);
|
||||
i.setData(Uri.parse("https://play.google.com/store/apps/details?id=com.pdlive.shayu"));
|
||||
context.startActivity(i);
|
||||
context.finish();
|
||||
}
|
||||
})
|
||||
.build()
|
||||
.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取版本号
|
||||
|
@ -59,7 +59,7 @@ public class CustomDrawerPopupView extends DrawerPopupView {
|
||||
Bus.getOn(this);
|
||||
super.onCreate();
|
||||
initView();
|
||||
initData();
|
||||
initData(null);
|
||||
|
||||
}
|
||||
|
||||
@ -148,19 +148,24 @@ public class CustomDrawerPopupView extends DrawerPopupView {
|
||||
});
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
LiveNetManager.get(mContext)
|
||||
.getCustomSidebarInfo(new com.yunbao.common.http.base.HttpCallback<List<CustomSidebarInfoModel>>() {
|
||||
@Override
|
||||
public void onSuccess(List<CustomSidebarInfoModel> data) {
|
||||
adapter.updateData(data);
|
||||
}
|
||||
public void initData(List<CustomSidebarInfoModel> data) {
|
||||
if (data != null) {
|
||||
adapter.updateData(data);
|
||||
} else {
|
||||
LiveNetManager.get(mContext)
|
||||
.getCustomSidebarInfo(new com.yunbao.common.http.base.HttpCallback<List<CustomSidebarInfoModel>>() {
|
||||
@Override
|
||||
public void onSuccess(List<CustomSidebarInfoModel> data) {
|
||||
adapter.updateData(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private CustomDrawerPopupCallBack callBack;
|
||||
@ -226,7 +231,7 @@ public class CustomDrawerPopupView extends DrawerPopupView {
|
||||
|
||||
}
|
||||
if (event.isRefresh()) {
|
||||
initData();
|
||||
initData(null);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -73,8 +73,8 @@ public class LiveFloatView implements Function1<FloatCallbacks.Builder, Unit> {
|
||||
CardView layout = magnetView.findViewById(R.id.layout);
|
||||
RelativeLayout.LayoutParams cardParams = (RelativeLayout.LayoutParams) layout.getLayoutParams();
|
||||
if (mLiveBean.getLandscape() == 1) {
|
||||
cardParams.height = DpUtil.dp2px(130);
|
||||
cardParams.width = DpUtil.dp2px(230);
|
||||
cardParams.height = DpUtil.dp2px(190);
|
||||
cardParams.width = DpUtil.dp2px(255);
|
||||
} else {
|
||||
cardParams.height = DpUtil.dp2px(224);
|
||||
cardParams.width = DpUtil.dp2px(126);
|
||||
@ -91,8 +91,8 @@ public class LiveFloatView implements Function1<FloatCallbacks.Builder, Unit> {
|
||||
Log.e("视频流有", "videoWidth:" + videoWidth + " videoHeight:" + videoHeight);
|
||||
if (mLiveBean.getLandscape() != 1){
|
||||
if (videoWidth > 720) {
|
||||
cardParams.height = DpUtil.dp2px(130);
|
||||
cardParams.width = DpUtil.dp2px(230);
|
||||
cardParams.height = DpUtil.dp2px(190);
|
||||
cardParams.width = DpUtil.dp2px(255);
|
||||
} else {
|
||||
cardParams.height = DpUtil.dp2px(224);
|
||||
cardParams.width = DpUtil.dp2px(126);
|
||||
@ -206,8 +206,8 @@ public class LiveFloatView implements Function1<FloatCallbacks.Builder, Unit> {
|
||||
CardView layout = view.findViewById(R.id.layout);
|
||||
RelativeLayout.LayoutParams cardParams = (RelativeLayout.LayoutParams) layout.getLayoutParams();
|
||||
if (mLiveBean.getLandscape() == 1) {
|
||||
cardParams.height = DpUtil.dp2px(130);
|
||||
cardParams.width = DpUtil.dp2px(230);
|
||||
cardParams.height = DpUtil.dp2px(190);
|
||||
cardParams.width = DpUtil.dp2px(255);
|
||||
} else {
|
||||
cardParams.height = DpUtil.dp2px(224);
|
||||
cardParams.width = DpUtil.dp2px(126);
|
||||
@ -224,8 +224,8 @@ public class LiveFloatView implements Function1<FloatCallbacks.Builder, Unit> {
|
||||
Log.e("视频流有", "videoWidth:" + videoWidth + " videoHeight:" + videoHeight);
|
||||
if (mLiveBean.getLandscape() != 1){
|
||||
if (videoWidth > 720) {
|
||||
cardParams.height = DpUtil.dp2px(130);
|
||||
cardParams.width = DpUtil.dp2px(230);
|
||||
cardParams.height = DpUtil.dp2px(190);
|
||||
cardParams.width = DpUtil.dp2px(255);
|
||||
} else {
|
||||
cardParams.height = DpUtil.dp2px(224);
|
||||
cardParams.width = DpUtil.dp2px(126);
|
||||
|
@ -0,0 +1,68 @@
|
||||
package com.yunbao.common.views.weight;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.graphics.drawable.AnimationDrawable;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
import com.lzf.easyfloat.EasyFloat;
|
||||
import com.lzf.easyfloat.enums.ShowPattern;
|
||||
import com.lzf.easyfloat.interfaces.FloatCallbacks;
|
||||
import com.lzf.easyfloat.interfaces.OnInvokeView;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.utils.DeviceUtils;
|
||||
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
|
||||
public class LiveLoadingViewHolder implements Function1<FloatCallbacks.Builder, Unit> {
|
||||
private String TAG = "LiveLoadingViewHolder";
|
||||
private Activity mContext;
|
||||
private String url;
|
||||
|
||||
public void builderSystemFloat(Activity mContext, String url) {
|
||||
this.mContext = mContext;
|
||||
this.url = url;
|
||||
EasyFloat.with(mContext)
|
||||
.setTag(TAG)
|
||||
.setLayout(R.layout.layout_portrait_live_item, new LiveOnInvokeView())
|
||||
.setShowPattern(ShowPattern.CURRENT_ACTIVITY)
|
||||
.setFilter()
|
||||
.setGravity(Gravity.CENTER)
|
||||
.setAnimator(null)
|
||||
.setMatchParent(true,true)
|
||||
.registerCallback(this)
|
||||
.show();
|
||||
}
|
||||
|
||||
/**
|
||||
* loading
|
||||
*/
|
||||
private class LiveOnInvokeView implements OnInvokeView {
|
||||
|
||||
@Override
|
||||
public void invoke(View view) {
|
||||
|
||||
RelativeLayout layout = view.findViewById(R.id.layout);
|
||||
FrameLayout.LayoutParams cardParams = (FrameLayout.LayoutParams) layout.getLayoutParams();
|
||||
cardParams.width = DeviceUtils.getScreenWidth(mContext);
|
||||
cardParams.height = DeviceUtils.getScreenHeight(mContext);
|
||||
layout.setLayoutParams(cardParams);
|
||||
ImageView ivBg = view.findViewById(R.id.iv_bg);
|
||||
ImgLoader.displayBlurLive(mContext, url, ivBg);
|
||||
// 加载动画
|
||||
ImageView ivLoading = view.findViewById(R.id.iv_loading);
|
||||
AnimationDrawable frameAnimation = (AnimationDrawable) ivLoading.getBackground();
|
||||
frameAnimation.start();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Unit invoke(FloatCallbacks.Builder builder) {
|
||||
return null;
|
||||
}
|
||||
}
|
@ -1,6 +1,5 @@
|
||||
package com.yunbao.common.views.weight;
|
||||
|
||||
import android.animation.ValueAnimator;
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.text.TextUtils;
|
||||
@ -32,8 +31,6 @@ import com.yunbao.common.utils.SVGAViewUtils;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import io.reactivex.Observable;
|
||||
import io.reactivex.ObservableEmitter;
|
||||
import io.reactivex.ObservableOnSubscribe;
|
||||
@ -80,7 +77,7 @@ public class NobleNoticeView extends FrameLayout {
|
||||
rootView = LayoutInflater.from(mContext).inflate(R.layout.view_noble_notice, this, true);
|
||||
svagaBc = rootView.findViewById(R.id.svaga_bc);
|
||||
rootLayout = rootView.findViewById(R.id.root_layout);
|
||||
gotoRoomView = rootView.findViewById(R.id.goto_room_view);
|
||||
gotoRoomView = rootView.findViewById(R.id.got_room_view);
|
||||
contextLayout = rootView.findViewById(R.id.context_layout);
|
||||
scrollLayout = rootView.findViewById(R.id.scroll_layout);
|
||||
nobleIcon = rootView.findViewById(R.id.noble_icon);
|
||||
@ -111,7 +108,6 @@ public class NobleNoticeView extends FrameLayout {
|
||||
findViewById(R.id.anchor_nickname).setVisibility(GONE);
|
||||
openNoble.setText(mContext.getString(R.string.open_noble2));
|
||||
}else {
|
||||
gotoRoomView.setVisibility(VISIBLE);
|
||||
findViewById(R.id.in).setVisibility(VISIBLE);
|
||||
findViewById(R.id.anchor_nickname).setVisibility(VISIBLE);
|
||||
openNoble.setText(mContext.getString(R.string.open_noble));
|
||||
@ -254,7 +250,7 @@ public class NobleNoticeView extends FrameLayout {
|
||||
@Override
|
||||
public void onStep(int frame, double v) {
|
||||
System.out.println("frame = " + frame);
|
||||
if (frame == 10) {
|
||||
if (frame == 20) {
|
||||
setButtonPosition(roleType);
|
||||
observable.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(bitmap -> {
|
||||
@ -270,7 +266,7 @@ public class NobleNoticeView extends FrameLayout {
|
||||
}).isDisposed();
|
||||
|
||||
}
|
||||
if (frame == 150) {
|
||||
if (frame == 135) {
|
||||
contextLayout.setVisibility(GONE);
|
||||
gotoRoomView.setVisibility(GONE);
|
||||
scrollLayout.clearAnimation();
|
||||
|
7
common/src/main/res/anim/in_from_right.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<translate
|
||||
android:duration="300"
|
||||
android:fromXDelta="100%"
|
||||
android:toXDelta="0%" />
|
||||
</set>
|
7
common/src/main/res/anim/in_from_right_abit.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<translate
|
||||
android:duration="300"
|
||||
android:fromXDelta="0"
|
||||
android:toXDelta="-15%" />
|
||||
</set>
|
7
common/src/main/res/anim/out_from_right.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<translate
|
||||
android:duration="3000"
|
||||
android:fromXDelta="-15%"
|
||||
android:toXDelta="0%" />
|
||||
</set>
|
7
common/src/main/res/anim/out_to_right.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<translate
|
||||
android:duration="300"
|
||||
android:fromXDelta="0%"
|
||||
android:toXDelta="100%" />
|
||||
</set>
|
7
common/src/main/res/anim/out_to_right_abit.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<translate
|
||||
android:duration="300"
|
||||
android:fromXDelta="-15%"
|
||||
android:toXDelta="0%" />
|
||||
</set>
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:width="76dp" android:height="27dp">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#ff40beff" />
|
||||
<corners android:topLeftRadius="13dp" android:topRightRadius="13dp" android:bottomLeftRadius="13dp" android:bottomRightRadius="13dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:width="76dp" android:height="27dp">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#ff0fdab8" />
|
||||
<corners android:topLeftRadius="13dp" android:topRightRadius="13dp" android:bottomLeftRadius="13dp" android:bottomRightRadius="13dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
54
common/src/main/res/drawable/loading_animation.xml
Normal file
@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<animation-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item
|
||||
android:drawable="@drawable/loading_00000"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/loading_00001"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/loading_00002"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/loading_00003"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/loading_00004"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/loading_00005"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/loading_00006"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/loading_00007"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/loading_00008"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/loading_00009"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/loading_00010"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/loading_00011"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/loading_00012"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/loading_00013"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/loading_00014"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/loading_00015"
|
||||
android:duration="100" />
|
||||
|
||||
|
||||
</animation-list>
|
@ -63,4 +63,9 @@
|
||||
android:layout_height="3dp"
|
||||
android:progressDrawable="@drawable/bg_horizontal_progressbar"
|
||||
android:visibility="gone" />
|
||||
|
||||
<WebView
|
||||
android:id="@+id/webView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
@ -108,6 +108,7 @@
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="gone"
|
||||
android:id="@+id/system_notice"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
85
common/src/main/res/layout/dialog_live_mic_invite.xml
Normal file
@ -0,0 +1,85 @@
|
||||
<?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"
|
||||
>
|
||||
<LinearLayout
|
||||
android:layout_marginBottom="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="主播:"
|
||||
android:textColor="#161616"
|
||||
android:textStyle="bold"
|
||||
android:textSize="16sp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textColor="#EB6877"
|
||||
android:textStyle="bold"
|
||||
android:textSize="16sp"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:textColor="#161616"
|
||||
android:textSize="14sp"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:gravity="center"
|
||||
android:layout_marginBottom="22dp"
|
||||
android:layout_height="40dp">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_cancel"
|
||||
android:layout_width="87dp"
|
||||
android:layout_height="33dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/cancel"
|
||||
android:textColor="#FFC621"
|
||||
android:layout_marginRight="7dp"
|
||||
android:textSize="14sp"
|
||||
android:background="@drawable/bg_dialog_unfollow_cancel"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_confirm"
|
||||
|
||||
android:layout_width="87dp"
|
||||
android:layout_height="33dp"
|
||||
android:gravity="center"
|
||||
android:layout_marginLeft="7dp"
|
||||
android:text="@string/confirm"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp"
|
||||
android:background="@mipmap/tipbox_btn_orange"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
45
common/src/main/res/layout/dialog_progress.xml
Normal file
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:gravity="center_vertical"
|
||||
android:background="@drawable/app_dialog_bg">
|
||||
<ImageView
|
||||
android:id="@+id/ivIcon"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@mipmap/ic_launcher"
|
||||
android:layout_marginRight="4dp"/>
|
||||
<TextView
|
||||
android:id="@+id/tvDialogTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toRightOf="@+id/ivIcon"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/app_dialog_title_color"
|
||||
android:text="更新中"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvProgress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/tvDialogTitle"
|
||||
android:layout_marginTop="10dp"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
android:text="正在下載中......"
|
||||
android:textColor="@color/app_dialog_content_color"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="6dp"
|
||||
android:layout_below="@+id/tvProgress"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:max="100" />
|
||||
</RelativeLayout>
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
|
||||
android:id="@+id/layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/goto_room_view"
|
||||
android:id="@+id/got_room_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
@ -33,7 +33,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="42dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_toStartOf="@id/goto_room_view"
|
||||
android:layout_toStartOf="@id/got_room_view"
|
||||
android:scrollbars="none">
|
||||
|
||||
<RelativeLayout
|
||||
|
BIN
common/src/main/res/mipmap-mdpi/ic_guard_not.png
Normal file
After Width: | Height: | Size: 177 KiB |
BIN
common/src/main/res/mipmap-mdpi/screen.png
Normal file
After Width: | Height: | Size: 586 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/btn_icon_quit.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
@ -78,6 +78,7 @@
|
||||
|
||||
<string name="apply_for_lianmai">ApplyMic</string>
|
||||
<string name="cancel_application">Cancel Mic</string>
|
||||
<string name="close_mic">Close Mic</string>
|
||||
<string name="quit_mic">Quit Mic</string>
|
||||
<string name="edit_profile_birthday">Birthday</string>
|
||||
<string name="edit_profile_sex">Gender</string>
|
||||
|
@ -70,6 +70,7 @@
|
||||
<string name="edit_profile_sex">性別</string>
|
||||
<string name="apply_for_lianmai">申请連麥</string>
|
||||
<string name="cancel_application">取消申請</string>
|
||||
<string name="close_mic">關閉連麥</string>
|
||||
<string name="quit_mic">退出連麥</string>
|
||||
<string name="edit_profile_city">所在地</string>
|
||||
<string name="edit_one_1">編輯個人資料</string>
|
||||
@ -617,6 +618,7 @@
|
||||
<string name="glamour_list">魅力榜</string>
|
||||
<string name="magnificent_list">豪氣榜</string>
|
||||
<string name="no_more_mic">當前沒有人在語音連麥中</string>
|
||||
<string name="live_anchor_open_mic">語音連麥未開啟</string>
|
||||
<string name="load_failure">網絡請求失敗</string>
|
||||
<string name="load_failure_2">請檢查網絡連接後重試~</string>
|
||||
<string name="loading">加載中</string>
|
||||
@ -963,4 +965,5 @@
|
||||
<string name="image_quality_selection" translatable="false">畫質選擇</string>
|
||||
<string name="more_settings" translatable="false">更多設置</string>
|
||||
<string name="moer">查看更多</string>
|
||||
<string name="gift_way">礼物正在获取中...</string>
|
||||
</resources>
|
||||
|
@ -6,9 +6,9 @@
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
<item name="android:colorBackground">@color/background</item>
|
||||
<item name="android:windowAnimationStyle">@style/Animation</item>
|
||||
<item name="android:windowAnimationStyle">@style/AnimationActivity</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor" >@color/colorPrimary</item>
|
||||
<item name="android:statusBarColor">@color/colorPrimary</item>
|
||||
</style>
|
||||
|
||||
<style name="dialog" parent="AppTheme">
|
||||
@ -35,6 +35,7 @@
|
||||
<!--显示区域以外是否使用黑色半透明背景-->
|
||||
<item name="android:backgroundDimEnabled">true</item>
|
||||
</style>
|
||||
|
||||
<style name="dialog4" parent="AppTheme">
|
||||
<item name="android:windowFrame">@null</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
@ -44,6 +45,7 @@
|
||||
<!--显示区域以外是否使用黑色半透明背景-->
|
||||
<item name="android:backgroundDimEnabled">false</item>
|
||||
</style>
|
||||
|
||||
<style name="dialog3" parent="AppTheme">
|
||||
<item name="android:windowFrame">@null</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
@ -69,10 +71,12 @@
|
||||
<item name="android:windowEnterAnimation">@anim/left_anim_enter</item>
|
||||
<item name="android:windowExitAnimation">@anim/left_anim_exit</item>
|
||||
</style>
|
||||
|
||||
<style name="RightLeftToAnim" parent="android:Animation">
|
||||
<item name="android:windowEnterAnimation">@anim/right_anim_enter</item>
|
||||
<item name="android:windowExitAnimation">@anim/right_anim_exit</item>
|
||||
</style>
|
||||
|
||||
<style name="groupLast" parent="AppTheme">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">1dp</item>
|
||||
@ -93,6 +97,7 @@
|
||||
<item name="android:paddingLeft">15dp</item>
|
||||
<item name="android:paddingRight">15dp</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.PayssionTrans" parent="Theme.AppCompat.Light">
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
@ -107,15 +112,22 @@
|
||||
<style name="Animation">
|
||||
<item name="android:activityOpenEnterAnimation">@null</item>
|
||||
<item name="android:activityOpenExitAnimation">@null</item>
|
||||
<item name="android:activityCloseEnterAnimation">@null</item>
|
||||
<item name="android:activityCloseExitAnimation">@null</item>
|
||||
<item name="android:activityCloseEnterAnimation">@anim/out_from_right</item>
|
||||
<item name="android:activityCloseExitAnimation">@anim/out_from_right</item>
|
||||
<item name="android:taskOpenEnterAnimation">@null</item>
|
||||
<item name="android:taskOpenExitAnimation">@null</item>
|
||||
<item name="android:taskCloseEnterAnimation">@null</item>
|
||||
<item name="android:taskCloseExitAnimation">@null</item>
|
||||
<item name="android:taskCloseEnterAnimation">@anim/out_from_right</item>
|
||||
<item name="android:taskCloseExitAnimation">@anim/out_from_right</item>
|
||||
<item name="android:taskToFrontEnterAnimation">@null</item>
|
||||
<item name="android:taskToFrontExitAnimation">@null</item>
|
||||
<item name="android:taskToBackEnterAnimation">@null</item>
|
||||
<item name="android:taskToBackExitAnimation">@null</item>
|
||||
<item name="android:taskToBackEnterAnimation">@anim/out_from_right</item>
|
||||
<item name="android:taskToBackExitAnimation">@anim/out_from_right</item>
|
||||
</style>
|
||||
<!-- 页面弹出(入场出场)动画 -->
|
||||
<style name="AnimationActivity" parent="@android:style/Animation">
|
||||
<item name="android:activityOpenEnterAnimation">@anim/in_from_right</item>
|
||||
<item name="android:activityOpenExitAnimation">@anim/in_from_right_abit</item>
|
||||
<item name="android:activityCloseEnterAnimation">@anim/out_to_right_abit</item>
|
||||
<item name="android:activityCloseExitAnimation">@anim/out_to_right</item>
|
||||
</style>
|
||||
</resources>
|