Commit 1c2147fd authored by mengcuiguang's avatar mengcuiguang

代码优化

parent f6e61c37
...@@ -252,7 +252,7 @@ dependencies { ...@@ -252,7 +252,7 @@ dependencies {
// implementation(name: 'ks_3.3.5.3', ext: 'aar') // implementation(name: 'ks_3.3.5.3', ext: 'aar')
// 聚乐云 // 聚乐云
implementation(name: 'okgo-4.0', ext: 'aar') implementation(name: 'okgo-4.0', ext: 'aar')
implementation(name: 'scenemodule-4.0-hzq', ext: 'aar') implementation(name: 'scenemodule-4.1-hzq', ext: 'aar')
implementation(name: 'scenead-4.0', ext: 'aar') implementation(name: 'scenead-4.0', ext: 'aar')
implementation 'com.just.agentweb:agentweb:4.1.2' implementation 'com.just.agentweb:agentweb:4.1.2'
// 喜马拉雅 已集成 // 喜马拉雅 已集成
......
package com.mints.goodmoney.ad.video
import android.app.Activity
import android.content.DialogInterface
import android.text.TextUtils
import android.view.KeyEvent
import com.mints.goodmoney.MintsApplication
import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.mvp.views.BaseView
import com.mints.goodmoney.ui.widgets.dialog.LoadingDialog
import com.mints.goodmoney.utils.ToastUtil
import java.util.HashMap
open class BaseVideoAd(activity: Activity) : BaseView {
open var activity: Activity? = null
var progressDialog: LoadingDialog? = null
init {
this.activity = activity
}
override fun getBaseApplication(): MintsApplication {
return activity?.getApplication() as MintsApplication
}
/**
* 显示加载进度条(自定义message)
*
* @param message
*/
override fun showLoading(message: String?) {
if (activity != null) {
if (activity!!.getWindow() != null && !activity!!.isFinishing()) {
if (progressDialog == null) {
progressDialog = LoadingDialog(activity)
progressDialog!!.setLoadText(message)
}
progressDialog?.show()
setProgressOnTouchOutside(false)
setProgressNoDismiss()
}
}
}
/**
* 设置Progress是否手触消失
*
* @param onTouchOutside
*/
open fun setProgressOnTouchOutside(onTouchOutside: Boolean) {
if (progressDialog != null) progressDialog!!.setCanceledOnTouchOutside(onTouchOutside)
}
/**
* 设置点击返回是否消失加载进度条
*/
fun setProgressNoDismiss() {
if (progressDialog != null && progressDialog!!.isShowing()) {
progressDialog!!.setOnKeyListener(DialogInterface.OnKeyListener { dialog, keyCode, event ->
keyCode == KeyEvent.KEYCODE_BACK
})
}
}
/**
* 消失加载进度条
*/
override fun hideLoading() {
try {
if (activity != null) {
if (activity!!.getWindow() != null && !activity!!.isFinishing()) {
if (progressDialog != null && progressDialog!!.isShowing()) {
progressDialog!!.dismiss()
progressDialog = null
}
}
}
} catch (e: Exception) {
e.printStackTrace()
} finally {
progressDialog = null
}
}
override fun showToast(msg: String?) {
if (!TextUtils.isEmpty(msg)) ToastUtil.show(MintsApplication.getContext(), msg)
}
/**
* 激励视频请求接口封装
*/
fun getAdMapVO(carrierType: String, adsource: String, extraId: String?, curCoin: Int): HashMap<String, Any> {
val vo = HashMap<String, Any>()
vo["carrierType"] = carrierType
vo["adtype"] = Constant.ADTYPE_VEDIO
vo["adsource"] = adsource
var tempExtraId = ""
if (extraId != null) {
tempExtraId = extraId
}
when (carrierType) {
Constant.CARRIER_VERSUS_VIDEO -> vo["coin"] = curCoin
Constant.CARRIER_HOMEWATER -> vo["waterCoin"] = curCoin
Constant.CARRIER_OFFLINE_DOUBLE -> vo["offline_income"] = curCoin
Constant.CARRIER_CHALLENGE_TURN, Constant.CARRIER_CHALLENGE_CARD -> vo["turntableKey"] = tempExtraId
}
return vo
}
open fun loadAd(activity: Activity, curCoin: Int, carrierType: String, extraId: String?) {}
open fun onDestroy() {}
}
\ No newline at end of file
...@@ -7,19 +7,20 @@ import com.bytedance.sdk.openadsdk.TTAdConstant; ...@@ -7,19 +7,20 @@ import com.bytedance.sdk.openadsdk.TTAdConstant;
import com.bytedance.sdk.openadsdk.TTAdNative; import com.bytedance.sdk.openadsdk.TTAdNative;
import com.bytedance.sdk.openadsdk.TTAdSdk; import com.bytedance.sdk.openadsdk.TTAdSdk;
import com.bytedance.sdk.openadsdk.TTFullScreenVideoAd; import com.bytedance.sdk.openadsdk.TTFullScreenVideoAd;
import com.mints.goodmoney.ad.video.base.BaseVideoAd;
import com.mints.goodmoney.ad.video.base.VedioAdStatusListener;
import com.mints.goodmoney.common.Constant; import com.mints.goodmoney.common.Constant;
import com.mints.goodmoney.manager.TrackManager; import com.mints.goodmoney.manager.TrackManager;
import com.mints.goodmoney.manager.TtCsjAdManager; import com.mints.goodmoney.manager.TtCsjAdManager;
import com.mints.goodmoney.mvp.views.VideoAdManagerView;
/** /**
* 穿山甲全屏广告 * 穿山甲全屏广告
*/ */
public class CsjFullVideoAdManager extends BaseVideoAd implements VideoAdManagerView { public class CsjFullVideoAdManager extends BaseVideoAd {
private static CsjFullVideoAdManager _inst; private static CsjFullVideoAdManager _inst;
private CsjFullVedioAdListener csjFullVedioAdListener; private VedioAdStatusListener vedioAdStatusListener;
Activity activity; Activity activity;
private TTAdNative ttAdNative; private TTAdNative ttAdNative;
...@@ -37,7 +38,6 @@ public class CsjFullVideoAdManager extends BaseVideoAd implements VideoAdManager ...@@ -37,7 +38,6 @@ public class CsjFullVideoAdManager extends BaseVideoAd implements VideoAdManager
} }
private CsjFullVideoAdManager(Activity activity) { private CsjFullVideoAdManager(Activity activity) {
super(activity);
init(activity); init(activity);
} }
...@@ -68,8 +68,8 @@ public class CsjFullVideoAdManager extends BaseVideoAd implements VideoAdManager ...@@ -68,8 +68,8 @@ public class CsjFullVideoAdManager extends BaseVideoAd implements VideoAdManager
public void onError(int code, String message) { public void onError(int code, String message) {
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJFULL, Constant.EVENT_TYPE_ONE, String.valueOf(code), message); TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJFULL, Constant.EVENT_TYPE_ONE, String.valueOf(code), message);
if (csjFullVedioAdListener != null) { if (vedioAdStatusListener != null) {
csjFullVedioAdListener.csjFullVedioAdFail(); vedioAdStatusListener.adFail();
} }
} }
...@@ -92,16 +92,16 @@ public class CsjFullVideoAdManager extends BaseVideoAd implements VideoAdManager ...@@ -92,16 +92,16 @@ public class CsjFullVideoAdManager extends BaseVideoAd implements VideoAdManager
} }
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJFULL, Constant.EVENT_TYPE_TWO, "", ""); TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJFULL, Constant.EVENT_TYPE_TWO, "", "");
if (csjFullVedioAdListener != null) { if (vedioAdStatusListener != null) {
csjFullVedioAdListener.csjFullVedioDownload(); vedioAdStatusListener.adDownload();
} }
} }
@Override @Override
public void onAdClose() { public void onAdClose() {
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJFULL, Constant.EVENT_TYPE_THREE, "", ""); TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJFULL, Constant.EVENT_TYPE_THREE, "", "");
if (csjFullVedioAdListener != null) { if (vedioAdStatusListener != null) {
csjFullVedioAdListener.csjFullVedioAdSuccess(); vedioAdStatusListener.adSuccess();
} }
if (activity != null) { if (activity != null) {
TrackManager.getInstance().reportAddCoinMsg(activity, getAdMapVO(carrierType, Constant.AD_SOURCE_CSJFULL, extraId, curCoin)); TrackManager.getInstance().reportAddCoinMsg(activity, getAdMapVO(carrierType, Constant.AD_SOURCE_CSJFULL, extraId, curCoin));
...@@ -129,8 +129,8 @@ public class CsjFullVideoAdManager extends BaseVideoAd implements VideoAdManager ...@@ -129,8 +129,8 @@ public class CsjFullVideoAdManager extends BaseVideoAd implements VideoAdManager
} else { } else {
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJFULL, Constant.EVENT_TYPE_ONE, "999999", "Cached Fail"); TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJFULL, Constant.EVENT_TYPE_ONE, "999999", "Cached Fail");
if (csjFullVedioAdListener != null) { if (vedioAdStatusListener != null) {
csjFullVedioAdListener.csjFullVedioAdFail(); vedioAdStatusListener.adFail();
} }
} }
} }
...@@ -146,15 +146,8 @@ public class CsjFullVideoAdManager extends BaseVideoAd implements VideoAdManager ...@@ -146,15 +146,8 @@ public class CsjFullVideoAdManager extends BaseVideoAd implements VideoAdManager
activity = null; activity = null;
} }
public void setCsjFullVedioAdListener(CsjFullVedioAdListener csjFullVedioAdListener) { public void setVedioAdStatusListener(VedioAdStatusListener vedioAdStatusListener) {
this.csjFullVedioAdListener = csjFullVedioAdListener; this.vedioAdStatusListener = vedioAdStatusListener;
} }
public interface CsjFullVedioAdListener {
void csjFullVedioAdFail();
void csjFullVedioAdSuccess();
void csjFullVedioDownload();
}
} }
...@@ -8,6 +8,8 @@ import com.bytedance.sdk.openadsdk.TTAdNative; ...@@ -8,6 +8,8 @@ import com.bytedance.sdk.openadsdk.TTAdNative;
import com.bytedance.sdk.openadsdk.TTAppDownloadListener; import com.bytedance.sdk.openadsdk.TTAppDownloadListener;
import com.bytedance.sdk.openadsdk.TTRewardVideoAd; import com.bytedance.sdk.openadsdk.TTRewardVideoAd;
import com.mints.goodmoney.BuildConfig; import com.mints.goodmoney.BuildConfig;
import com.mints.goodmoney.ad.video.base.BaseVideoAd;
import com.mints.goodmoney.ad.video.base.VedioAdStatusListener;
import com.mints.goodmoney.common.AppConfig; import com.mints.goodmoney.common.AppConfig;
import com.mints.goodmoney.common.Constant; import com.mints.goodmoney.common.Constant;
import com.mints.goodmoney.manager.TTNativeExpressManager; import com.mints.goodmoney.manager.TTNativeExpressManager;
...@@ -31,7 +33,7 @@ public class CsjVideoAdManager extends BaseVideoAd { ...@@ -31,7 +33,7 @@ public class CsjVideoAdManager extends BaseVideoAd {
private AppPreferences ps; private AppPreferences ps;
private int curCoin; private int curCoin;
private String extraId; private String extraId;
private CsjVideoAdListener csjVideoAdListener; private VedioAdStatusListener vedioAdStatusListener;
Activity activity; Activity activity;
private TTAdNative ttAdNative; private TTAdNative ttAdNative;
...@@ -48,7 +50,6 @@ public class CsjVideoAdManager extends BaseVideoAd { ...@@ -48,7 +50,6 @@ public class CsjVideoAdManager extends BaseVideoAd {
} }
private CsjVideoAdManager(Activity activity) { private CsjVideoAdManager(Activity activity) {
super(activity);
init(activity); init(activity);
} }
...@@ -66,7 +67,7 @@ public class CsjVideoAdManager extends BaseVideoAd { ...@@ -66,7 +67,7 @@ public class CsjVideoAdManager extends BaseVideoAd {
if (mttRewardVideoAd != null) { if (mttRewardVideoAd != null) {
mttRewardVideoAd.setRewardAdInteractionListener(null); mttRewardVideoAd.setRewardAdInteractionListener(null);
} }
ps=null;
activity = null; activity = null;
} }
...@@ -81,7 +82,6 @@ public class CsjVideoAdManager extends BaseVideoAd { ...@@ -81,7 +82,6 @@ public class CsjVideoAdManager extends BaseVideoAd {
isClickScreen = true; isClickScreen = true;
this.curCoin = curCoin; this.curCoin = curCoin;
this.extraId = extraId; this.extraId = extraId;
String codeId = TtCsjAdManager.TT_AD_VEDIO_MAIN_DEV; String codeId = TtCsjAdManager.TT_AD_VEDIO_MAIN_DEV;
if (!BuildConfig.DEBUG) { if (!BuildConfig.DEBUG) {
switch (carrierType) { switch (carrierType) {
...@@ -150,9 +150,9 @@ public class CsjVideoAdManager extends BaseVideoAd { ...@@ -150,9 +150,9 @@ public class CsjVideoAdManager extends BaseVideoAd {
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJ, Constant.EVENT_TYPE_ONE, String.valueOf(code), message); TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJ, Constant.EVENT_TYPE_ONE, String.valueOf(code), message);
LogUtil.d("csjVideoAdListener", "onError " + code + message); LogUtil.d("vedioAdStatusListener", "onError " + code + message);
if (csjVideoAdListener != null) { if (vedioAdStatusListener != null) {
csjVideoAdListener.csjVideoAdFail(); vedioAdStatusListener.adFail();
} }
} }
...@@ -165,8 +165,8 @@ public class CsjVideoAdManager extends BaseVideoAd { ...@@ -165,8 +165,8 @@ public class CsjVideoAdManager extends BaseVideoAd {
} else { } else {
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJ, Constant.EVENT_TYPE_ONE, "999999", "Cached Fail"); TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJ, Constant.EVENT_TYPE_ONE, "999999", "Cached Fail");
if (csjVideoAdListener != null) { if (vedioAdStatusListener != null) {
csjVideoAdListener.csjVideoAdFail(); vedioAdStatusListener.adFail();
} }
} }
} }
...@@ -197,8 +197,8 @@ public class CsjVideoAdManager extends BaseVideoAd { ...@@ -197,8 +197,8 @@ public class CsjVideoAdManager extends BaseVideoAd {
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJ, Constant.EVENT_TYPE_FOUR, "", ""); TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJ, Constant.EVENT_TYPE_FOUR, "", "");
isClickScreen = false; isClickScreen = false;
} }
if (csjVideoAdListener != null) { if (vedioAdStatusListener != null) {
csjVideoAdListener.csjVideoDownload(); vedioAdStatusListener.adDownload();
} }
} }
...@@ -206,8 +206,8 @@ public class CsjVideoAdManager extends BaseVideoAd { ...@@ -206,8 +206,8 @@ public class CsjVideoAdManager extends BaseVideoAd {
public void onAdClose() { public void onAdClose() {
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJ, Constant.EVENT_TYPE_THREE, "", ""); TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJ, Constant.EVENT_TYPE_THREE, "", "");
if (csjVideoAdListener != null) { if (vedioAdStatusListener != null) {
csjVideoAdListener.csjVideoAdSuccess(); vedioAdStatusListener.adSuccess();
} }
} }
...@@ -219,8 +219,8 @@ public class CsjVideoAdManager extends BaseVideoAd { ...@@ -219,8 +219,8 @@ public class CsjVideoAdManager extends BaseVideoAd {
public void onVideoError() { public void onVideoError() {
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJ, Constant.EVENT_TYPE_ONE, "999999", "VideoError"); TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJ, Constant.EVENT_TYPE_ONE, "999999", "VideoError");
if (csjVideoAdListener != null) { if (vedioAdStatusListener != null) {
csjVideoAdListener.csjVideoAdFail(); vedioAdStatusListener.adFail();
} }
} }
...@@ -299,15 +299,8 @@ public class CsjVideoAdManager extends BaseVideoAd { ...@@ -299,15 +299,8 @@ public class CsjVideoAdManager extends BaseVideoAd {
return vo; return vo;
} }
public void setCsjVideoAdListener(CsjVideoAdListener csjVideoAdListener) { public void setVedioAdStatusListener(VedioAdStatusListener vedioAdStatusListener) {
this.csjVideoAdListener = csjVideoAdListener; this.vedioAdStatusListener = vedioAdStatusListener;
} }
public interface CsjVideoAdListener {
void csjVideoAdFail();
void csjVideoAdSuccess();
void csjVideoDownload();
}
} }
...@@ -5,13 +5,13 @@ import com.kwad.sdk.api.KsAdSDK ...@@ -5,13 +5,13 @@ import com.kwad.sdk.api.KsAdSDK
import com.kwad.sdk.api.KsLoadManager import com.kwad.sdk.api.KsLoadManager
import com.kwad.sdk.api.KsRewardVideoAd import com.kwad.sdk.api.KsRewardVideoAd
import com.kwad.sdk.api.KsScene import com.kwad.sdk.api.KsScene
import com.mints.goodmoney.ad.video.base.BaseVideoAd
import com.mints.goodmoney.ad.video.base.VedioAdStatusListener
import com.mints.goodmoney.common.AppConfig import com.mints.goodmoney.common.AppConfig
import com.mints.goodmoney.common.Constant import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.manager.KsManager import com.mints.goodmoney.manager.KsManager
import com.mints.goodmoney.manager.TrackManager import com.mints.goodmoney.manager.TrackManager
import com.mints.goodmoney.mvp.views.VideoAdManagerView
import com.mints.goodmoney.utils.LogUtil import com.mints.goodmoney.utils.LogUtil
import com.mints.goodmoney.utils.ToastUtil
private val TAG = KsVideoAdManager::class.java.simpleName private val TAG = KsVideoAdManager::class.java.simpleName
...@@ -20,13 +20,13 @@ private val TAG = KsVideoAdManager::class.java.simpleName ...@@ -20,13 +20,13 @@ private val TAG = KsVideoAdManager::class.java.simpleName
* 快手广告视频 * 快手广告视频
*/ */
class KsVideoAdManager private constructor(activity: Activity) : class KsVideoAdManager private constructor(activity: Activity) :
BaseVideoAd(activity), VideoAdManagerView { BaseVideoAd() {
private var ksVideoAdListener: KsVideoAdListener? = null private var vedioAdStatusListener: VedioAdStatusListener? = null
private var mRewardVideoAd: KsRewardVideoAd? = null private var mRewardVideoAd: KsRewardVideoAd? = null
private var isClickScreen: Boolean = true private var isClickScreen: Boolean = true
override var activity: Activity? = null var activity: Activity? = null
companion object { companion object {
private var _inst: KsVideoAdManager? = null private var _inst: KsVideoAdManager? = null
...@@ -55,8 +55,8 @@ class KsVideoAdManager private constructor(activity: Activity) : ...@@ -55,8 +55,8 @@ class KsVideoAdManager private constructor(activity: Activity) :
val scene = KsScene.Builder(KsManager.KS_AD_VEDIO_POSTID).build() val scene = KsScene.Builder(KsManager.KS_AD_VEDIO_POSTID).build()
KsAdSDK.getLoadManager().loadRewardVideoAd(scene, object : KsLoadManager.RewardVideoAdListener { KsAdSDK.getLoadManager().loadRewardVideoAd(scene, object : KsLoadManager.RewardVideoAdListener {
override fun onError(p0: Int, p1: String?) { override fun onError(p0: Int, p1: String?) {
if (ksVideoAdListener != null) { if (vedioAdStatusListener != null) {
ksVideoAdListener?.ksVideoAdFail() vedioAdStatusListener?.adFail()
} }
} }
...@@ -79,8 +79,8 @@ class KsVideoAdManager private constructor(activity: Activity) : ...@@ -79,8 +79,8 @@ class KsVideoAdManager private constructor(activity: Activity) :
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_KS, Constant.EVENT_TYPE_FOUR, "", "") TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_KS, Constant.EVENT_TYPE_FOUR, "", "")
isClickScreen = false isClickScreen = false
} }
if (ksVideoAdListener != null) { if (vedioAdStatusListener != null) {
ksVideoAdListener?.ksVideoAdDownload() vedioAdStatusListener?.adDownload()
} }
} }
...@@ -91,8 +91,8 @@ class KsVideoAdManager private constructor(activity: Activity) : ...@@ -91,8 +91,8 @@ class KsVideoAdManager private constructor(activity: Activity) :
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_KS, Constant.EVENT_TYPE_THREE, "", "") TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_KS, Constant.EVENT_TYPE_THREE, "", "")
if (ksVideoAdListener != null) { if (vedioAdStatusListener != null) {
ksVideoAdListener?.ksVideoAdSuccess() vedioAdStatusListener?.adSuccess()
} }
} }
...@@ -101,8 +101,8 @@ class KsVideoAdManager private constructor(activity: Activity) : ...@@ -101,8 +101,8 @@ class KsVideoAdManager private constructor(activity: Activity) :
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_KS, Constant.EVENT_TYPE_ONE, (p0).toString(), "") TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_KS, Constant.EVENT_TYPE_ONE, (p0).toString(), "")
if (ksVideoAdListener != null) { if (vedioAdStatusListener != null) {
ksVideoAdListener?.ksVideoAdFail() vedioAdStatusListener?.adFail()
} }
} }
...@@ -131,15 +131,10 @@ class KsVideoAdManager private constructor(activity: Activity) : ...@@ -131,15 +131,10 @@ class KsVideoAdManager private constructor(activity: Activity) :
} }
fun setKsVideoAdListener(ksVideoAdListener: KsVideoAdListener?) { fun setVedioAdStatusListener(vedioAdStatusListener: VedioAdStatusListener?) {
this.ksVideoAdListener = ksVideoAdListener this.vedioAdStatusListener = vedioAdStatusListener
} }
interface KsVideoAdListener {
fun ksVideoAdSuccess()
fun ksVideoAdFail()
fun ksVideoAdDownload()
}
override fun onDestroy() { override fun onDestroy() {
mRewardVideoAd = null mRewardVideoAd = null
......
...@@ -2,11 +2,12 @@ package com.mints.goodmoney.ad.video ...@@ -2,11 +2,12 @@ package com.mints.goodmoney.ad.video
import android.app.Activity import android.app.Activity
import com.maplehaze.adsdk.video.RewardVideoAd import com.maplehaze.adsdk.video.RewardVideoAd
import com.mints.goodmoney.ad.video.base.BaseVideoAd
import com.mints.goodmoney.ad.video.base.VedioAdStatusListener
import com.mints.goodmoney.common.AppConfig import com.mints.goodmoney.common.AppConfig
import com.mints.goodmoney.common.Constant import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.manager.MhManager import com.mints.goodmoney.manager.MhManager
import com.mints.goodmoney.manager.TrackManager import com.mints.goodmoney.manager.TrackManager
import com.mints.goodmoney.mvp.views.VideoAdManagerView
import com.mints.goodmoney.utils.LogUtil import com.mints.goodmoney.utils.LogUtil
private val TAG = MhVideoAdManager::class.java.simpleName private val TAG = MhVideoAdManager::class.java.simpleName
...@@ -15,13 +16,13 @@ private val TAG = MhVideoAdManager::class.java.simpleName ...@@ -15,13 +16,13 @@ private val TAG = MhVideoAdManager::class.java.simpleName
* 枫岚广告视频 * 枫岚广告视频
*/ */
class MhVideoAdManager private constructor(activity: Activity) : class MhVideoAdManager private constructor(activity: Activity) :
BaseVideoAd(activity), VideoAdManagerView { BaseVideoAd() {
private var mhVideoAdListener: MhVideoAdListener? = null private var vedioAdStatusListener: VedioAdStatusListener? = null
private var mRewardVideoAd: RewardVideoAd? = null private var mRewardVideoAd: RewardVideoAd? = null
private var isClickScreen: Boolean = true private var isClickScreen: Boolean = true
override var activity: Activity? = null private var activity: Activity? = null
companion object { companion object {
private var _inst: MhVideoAdManager? = null private var _inst: MhVideoAdManager? = null
...@@ -84,8 +85,8 @@ class MhVideoAdManager private constructor(activity: Activity) : ...@@ -84,8 +85,8 @@ class MhVideoAdManager private constructor(activity: Activity) :
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_FL, Constant.EVENT_TYPE_FOUR, "", "") TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_FL, Constant.EVENT_TYPE_FOUR, "", "")
isClickScreen = false isClickScreen = false
} }
if (mhVideoAdListener != null) { if (vedioAdStatusListener != null) {
mhVideoAdListener?.mhVideoAdDownload() vedioAdStatusListener?.adDownload()
} }
} }
...@@ -100,8 +101,8 @@ class MhVideoAdManager private constructor(activity: Activity) : ...@@ -100,8 +101,8 @@ class MhVideoAdManager private constructor(activity: Activity) :
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_FL, Constant.EVENT_TYPE_THREE, "", "") TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_FL, Constant.EVENT_TYPE_THREE, "", "")
if (mhVideoAdListener != null) { if (vedioAdStatusListener != null) {
mhVideoAdListener?.mhVideoAdSuccess() vedioAdStatusListener?.adSuccess()
} }
} }
...@@ -110,8 +111,8 @@ class MhVideoAdManager private constructor(activity: Activity) : ...@@ -110,8 +111,8 @@ class MhVideoAdManager private constructor(activity: Activity) :
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_FL, Constant.EVENT_TYPE_ONE, (p0).toString(), "") TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_FL, Constant.EVENT_TYPE_ONE, (p0).toString(), "")
if (mhVideoAdListener != null) { if (vedioAdStatusListener != null) {
mhVideoAdListener?.mhVideoAdFail() vedioAdStatusListener?.adFail()
} }
} }
...@@ -120,15 +121,10 @@ class MhVideoAdManager private constructor(activity: Activity) : ...@@ -120,15 +121,10 @@ class MhVideoAdManager private constructor(activity: Activity) :
mRewardVideoAd?.loadAd() mRewardVideoAd?.loadAd()
} }
fun setMhVideoAdListener(mhVideoAdListener: MhVideoAdListener?) { fun setVedioAdStatusListener(vedioAdStatusListener: VedioAdStatusListener?) {
this.mhVideoAdListener = mhVideoAdListener this.vedioAdStatusListener = vedioAdStatusListener
} }
interface MhVideoAdListener {
fun mhVideoAdSuccess()
fun mhVideoAdFail()
fun mhVideoAdDownload()
}
override fun onDestroy() { override fun onDestroy() {
mRewardVideoAd = null mRewardVideoAd = null
......
...@@ -4,6 +4,8 @@ import android.app.Activity ...@@ -4,6 +4,8 @@ import android.app.Activity
import android.text.TextUtils import android.text.TextUtils
import androidx.annotation.Nullable import androidx.annotation.Nullable
import com.mints.goodmoney.BuildConfig import com.mints.goodmoney.BuildConfig
import com.mints.goodmoney.ad.video.base.BaseVideoAd
import com.mints.goodmoney.ad.video.base.VedioAdStatusListener
import com.mints.goodmoney.common.AppConfig import com.mints.goodmoney.common.AppConfig
import com.mints.goodmoney.common.Constant import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.manager.TrackManager import com.mints.goodmoney.manager.TrackManager
...@@ -25,11 +27,12 @@ private val TAG = ShVideoAdManager::class.java.simpleName ...@@ -25,11 +27,12 @@ private val TAG = ShVideoAdManager::class.java.simpleName
* 天卓珊瑚广告视频 * 天卓珊瑚广告视频
*/ */
class ShVideoAdManager private constructor(activity: Activity) : class ShVideoAdManager private constructor(activity: Activity) :
BaseVideoAd(activity) { BaseVideoAd() {
private var isClickScreen: Boolean = true private var isClickScreen: Boolean = true
private var activity: Activity? = null
private var shVideoAdListener: ShVideoAdListener? = null private var vedioAdStatusListener: VedioAdStatusListener? = null
private lateinit var ps: AppPreferences private lateinit var ps: AppPreferences
companion object { companion object {
...@@ -103,8 +106,8 @@ class ShVideoAdManager private constructor(activity: Activity) : ...@@ -103,8 +106,8 @@ class ShVideoAdManager private constructor(activity: Activity) :
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_SH, Constant.EVENT_TYPE_ONE, (adError.code).toString(), "") TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_SH, Constant.EVENT_TYPE_ONE, (adError.code).toString(), "")
if (shVideoAdListener != null) { if (vedioAdStatusListener != null) {
shVideoAdListener?.shVideoAdFail() vedioAdStatusListener?.adFail()
} }
} }
...@@ -127,8 +130,8 @@ class ShVideoAdManager private constructor(activity: Activity) : ...@@ -127,8 +130,8 @@ class ShVideoAdManager private constructor(activity: Activity) :
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_SH, Constant.EVENT_TYPE_FOUR, "", "") TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_SH, Constant.EVENT_TYPE_FOUR, "", "")
isClickScreen = false isClickScreen = false
} }
if (shVideoAdListener != null) { if (vedioAdStatusListener != null) {
shVideoAdListener?.shVideoAdDownload() vedioAdStatusListener?.adDownload()
} }
return super.onAdClicked(ad) return super.onAdClicked(ad)
...@@ -168,8 +171,8 @@ class ShVideoAdManager private constructor(activity: Activity) : ...@@ -168,8 +171,8 @@ class ShVideoAdManager private constructor(activity: Activity) :
LogUtil.d(TAG, "onVideoClosed") LogUtil.d(TAG, "onVideoClosed")
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_SH, Constant.EVENT_TYPE_THREE, "", "") TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_SH, Constant.EVENT_TYPE_THREE, "", "")
if (shVideoAdListener != null) { if (vedioAdStatusListener != null) {
shVideoAdListener?.shVideoAdSuccess() vedioAdStatusListener?.adSuccess()
} }
return super.onVideoClosed(coralAD, s) return super.onVideoClosed(coralAD, s)
...@@ -178,14 +181,8 @@ class ShVideoAdManager private constructor(activity: Activity) : ...@@ -178,14 +181,8 @@ class ShVideoAdManager private constructor(activity: Activity) :
} }
fun setShVideoAdListener(shVideoAdListener: ShVideoAdListener?) { fun setVedioAdStatusListener(vedioAdStatusListener: VedioAdStatusListener?) {
this.shVideoAdListener = shVideoAdListener this.vedioAdStatusListener = vedioAdStatusListener
}
interface ShVideoAdListener {
fun shVideoAdSuccess()
fun shVideoAdFail()
fun shVideoAdDownload()
} }
override fun onDestroy() { override fun onDestroy() {
......
package com.mints.goodmoney.ad.video package com.mints.goodmoney.ad.video
import android.app.Activity import android.app.Activity
import com.mints.goodmoney.ad.video.base.BaseVideoAd
import com.mints.goodmoney.ad.video.base.VedioAdStatusListener
import com.mints.goodmoney.common.AppConfig import com.mints.goodmoney.common.AppConfig
import com.mints.goodmoney.common.Constant import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.manager.TrackManager import com.mints.goodmoney.manager.TrackManager
import com.mints.goodmoney.manager.WnManager import com.mints.goodmoney.manager.WnManager
import com.mints.goodmoney.mvp.views.VideoAdManagerView
import com.mints.goodmoney.utils.LogUtil import com.mints.goodmoney.utils.LogUtil
import com.wannuosili.sdk.* import com.wannuosili.sdk.*
...@@ -15,13 +16,13 @@ private val TAG = WnVideoAdManager::class.java.simpleName ...@@ -15,13 +16,13 @@ private val TAG = WnVideoAdManager::class.java.simpleName
* 闪电盒子视频 * 闪电盒子视频
*/ */
class WnVideoAdManager private constructor(activity: Activity) : class WnVideoAdManager private constructor(activity: Activity) :
BaseVideoAd(activity), VideoAdManagerView { BaseVideoAd() {
private var wnVideoAdListener: WnVideoAdListener? = null private var vedioAdStatusListener: VedioAdStatusListener? = null
private var mRewardVideoAd: WNRewardVideoAd? = null private var mRewardVideoAd: WNRewardVideoAd? = null
private var isClickScreen: Boolean = true private var isClickScreen: Boolean = true
override var activity: Activity? = null private var activity: Activity? = null
companion object { companion object {
private var _inst: WnVideoAdManager? = null private var _inst: WnVideoAdManager? = null
...@@ -65,8 +66,8 @@ class WnVideoAdManager private constructor(activity: Activity) : ...@@ -65,8 +66,8 @@ class WnVideoAdManager private constructor(activity: Activity) :
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_SDHZ, Constant.EVENT_TYPE_ONE, (code).toString(), message) TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_SDHZ, Constant.EVENT_TYPE_ONE, (code).toString(), message)
if (wnVideoAdListener != null) { if (vedioAdStatusListener != null) {
wnVideoAdListener?.wnVideoAdFail() vedioAdStatusListener?.adFail()
} }
} }
...@@ -88,8 +89,8 @@ class WnVideoAdManager private constructor(activity: Activity) : ...@@ -88,8 +89,8 @@ class WnVideoAdManager private constructor(activity: Activity) :
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_SDHZ, Constant.EVENT_TYPE_FOUR, "", "") TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_SDHZ, Constant.EVENT_TYPE_FOUR, "", "")
isClickScreen = false isClickScreen = false
} }
if (wnVideoAdListener != null) { if (vedioAdStatusListener != null) {
wnVideoAdListener?.wnVideoAdDownload() vedioAdStatusListener?.adDownload()
} }
} }
...@@ -98,8 +99,8 @@ class WnVideoAdManager private constructor(activity: Activity) : ...@@ -98,8 +99,8 @@ class WnVideoAdManager private constructor(activity: Activity) :
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_SDHZ, Constant.EVENT_TYPE_THREE, "", "") TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_SDHZ, Constant.EVENT_TYPE_THREE, "", "")
if (wnVideoAdListener != null) { if (vedioAdStatusListener != null) {
wnVideoAdListener?.wnVideoAdSuccess() vedioAdStatusListener?.adSuccess()
} }
} }
...@@ -112,7 +113,6 @@ class WnVideoAdManager private constructor(activity: Activity) : ...@@ -112,7 +113,6 @@ class WnVideoAdManager private constructor(activity: Activity) :
if (ad.type == WNAdConstant.AD_TYPE_DOWNLOAD) { if (ad.type == WNAdConstant.AD_TYPE_DOWNLOAD) {
ad.downloadListener = object : WNAdDownloadListener { ad.downloadListener = object : WNAdDownloadListener {
override fun onDownloadStarted(totalBytes: Long, fileName: String, appName: String) { override fun onDownloadStarted(totalBytes: Long, fileName: String, appName: String) {
showToast("开始下载")
} }
override fun onDownloadFinished(totalBytes: Long, fileName: String, appName: String) {} override fun onDownloadFinished(totalBytes: Long, fileName: String, appName: String) {}
...@@ -126,14 +126,8 @@ class WnVideoAdManager private constructor(activity: Activity) : ...@@ -126,14 +126,8 @@ class WnVideoAdManager private constructor(activity: Activity) :
}) })
} }
fun setWnVideoAdListener(wnVideoAdListener: WnVideoAdListener?) { fun setVedioAdStatusListener(vedioAdStatusListener: VedioAdStatusListener?) {
this.wnVideoAdListener = wnVideoAdListener this.vedioAdStatusListener = vedioAdStatusListener
}
interface WnVideoAdListener {
fun wnVideoAdSuccess()
fun wnVideoAdFail()
fun wnVideoAdDownload()
} }
override fun onDestroy() { override fun onDestroy() {
......
...@@ -3,14 +3,13 @@ package com.mints.goodmoney.ad.video; ...@@ -3,14 +3,13 @@ package com.mints.goodmoney.ad.video;
import android.app.Activity; import android.app.Activity;
import android.os.SystemClock; import android.os.SystemClock;
import com.mints.goodmoney.MintsApplication; import com.mints.goodmoney.ad.video.base.BaseVideoAd;
import com.mints.goodmoney.ad.video.base.VedioAdStatusListener;
import com.mints.goodmoney.common.AppConfig; import com.mints.goodmoney.common.AppConfig;
import com.mints.goodmoney.common.Constant; import com.mints.goodmoney.common.Constant;
import com.mints.goodmoney.manager.TrackManager; import com.mints.goodmoney.manager.TrackManager;
import com.mints.goodmoney.manager.YlhAdManager; import com.mints.goodmoney.manager.YlhAdManager;
import com.mints.goodmoney.mvp.views.VideoAdManagerView;
import com.mints.goodmoney.utils.LogUtil; import com.mints.goodmoney.utils.LogUtil;
import com.mints.goodmoney.utils.ToastUtil;
import com.qq.e.ads.rewardvideo.RewardVideoAD; import com.qq.e.ads.rewardvideo.RewardVideoAD;
import com.qq.e.ads.rewardvideo.RewardVideoADListener; import com.qq.e.ads.rewardvideo.RewardVideoADListener;
import com.qq.e.comm.util.AdError; import com.qq.e.comm.util.AdError;
...@@ -20,16 +19,16 @@ import java.lang.ref.WeakReference; ...@@ -20,16 +19,16 @@ import java.lang.ref.WeakReference;
/** /**
* 优量汇视频 * 优量汇视频
*/ */
public class YlhVideoAdManager extends BaseVideoAd implements VideoAdManagerView { public class YlhVideoAdManager extends BaseVideoAd {
private static YlhVideoAdManager _inst; private static YlhVideoAdManager _inst;
// 优量汇激励视频 // 优量汇激励视频
private RewardVideoAD rewardVideoAD; private RewardVideoAD rewardVideoAD;
private YlhVideoAdListener ylhVideoAdListener; private VedioAdStatusListener vedioAdStatusListener;
Activity activity; private Activity activity;
private boolean isClickScreen = true; // 是否点击屏幕跳转广告 private boolean isClickScreen = true; // 是否点击屏幕跳转广告
...@@ -44,7 +43,6 @@ public class YlhVideoAdManager extends BaseVideoAd implements VideoAdManagerView ...@@ -44,7 +43,6 @@ public class YlhVideoAdManager extends BaseVideoAd implements VideoAdManagerView
} }
private YlhVideoAdManager(WeakReference<Activity> activity) { private YlhVideoAdManager(WeakReference<Activity> activity) {
super(activity.get());
init(activity.get()); init(activity.get());
} }
...@@ -144,17 +142,17 @@ public class YlhVideoAdManager extends BaseVideoAd implements VideoAdManagerView ...@@ -144,17 +142,17 @@ public class YlhVideoAdManager extends BaseVideoAd implements VideoAdManagerView
if (SystemClock.elapsedRealtime() < (rewardVideoAD.getExpireTimestamp() - delta)) { if (SystemClock.elapsedRealtime() < (rewardVideoAD.getExpireTimestamp() - delta)) {
rewardVideoAD.showAD(); rewardVideoAD.showAD();
} else { } else {
showToast("广告已过期,请再次请求广告后进行广告展示!"); // showToast("广告已过期,请再次请求广告后进行广告展示!");
} }
} else { } else {
showToast("此条广告已经展示过,请再次请求广告后进行广告展示!"); // showToast("此条广告已经展示过,请再次请求广告后进行广告展示!");
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_YLH, Constant.EVENT_TYPE_ONE, "999999", "Load Fail"); TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_YLH, Constant.EVENT_TYPE_ONE, "999999", "Load Fail");
if (ylhVideoAdListener != null) { if (vedioAdStatusListener != null) {
ylhVideoAdListener.ylhVideoAdFail(); vedioAdStatusListener.adFail();
} }
} }
} }
...@@ -195,8 +193,8 @@ public class YlhVideoAdManager extends BaseVideoAd implements VideoAdManagerView ...@@ -195,8 +193,8 @@ public class YlhVideoAdManager extends BaseVideoAd implements VideoAdManagerView
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_YLH, Constant.EVENT_TYPE_FOUR, "", ""); TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_YLH, Constant.EVENT_TYPE_FOUR, "", "");
isClickScreen = false; isClickScreen = false;
} }
if (ylhVideoAdListener != null) { if (vedioAdStatusListener != null) {
ylhVideoAdListener.ylhVideoAdDownload(); vedioAdStatusListener.adDownload();
} }
} }
...@@ -211,8 +209,8 @@ public class YlhVideoAdManager extends BaseVideoAd implements VideoAdManagerView ...@@ -211,8 +209,8 @@ public class YlhVideoAdManager extends BaseVideoAd implements VideoAdManagerView
TrackManager.getInstance().reportAddCoinMsg(activity, getAdMapVO(carrierType, Constant.AD_SOURCE_YLH, extraId, curCoin)); TrackManager.getInstance().reportAddCoinMsg(activity, getAdMapVO(carrierType, Constant.AD_SOURCE_YLH, extraId, curCoin));
if (ylhVideoAdListener != null) { if (vedioAdStatusListener != null) {
ylhVideoAdListener.ylhVideoAdSuccess(); vedioAdStatusListener.adSuccess();
} }
} }
...@@ -225,8 +223,8 @@ public class YlhVideoAdManager extends BaseVideoAd implements VideoAdManagerView ...@@ -225,8 +223,8 @@ public class YlhVideoAdManager extends BaseVideoAd implements VideoAdManagerView
// 0 成功 1失败 2点击 3-有效展示 // 0 成功 1失败 2点击 3-有效展示
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_YLH, Constant.EVENT_TYPE_ONE, String.valueOf(adError.getErrorCode()), adError.getErrorMsg()); TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_YLH, Constant.EVENT_TYPE_ONE, String.valueOf(adError.getErrorCode()), adError.getErrorMsg());
} }
if (ylhVideoAdListener != null) { if (vedioAdStatusListener != null) {
ylhVideoAdListener.ylhVideoAdFail(); vedioAdStatusListener.adFail();
} }
} }
}); });
...@@ -234,15 +232,7 @@ public class YlhVideoAdManager extends BaseVideoAd implements VideoAdManagerView ...@@ -234,15 +232,7 @@ public class YlhVideoAdManager extends BaseVideoAd implements VideoAdManagerView
rewardVideoAD.loadAD(); rewardVideoAD.loadAD();
} }
public void setYlhVideoAdListener(YlhVideoAdListener ylhVideoAdListener) { public void setVedioAdStatusListener(VedioAdStatusListener vedioAdStatusListener) {
this.ylhVideoAdListener = ylhVideoAdListener; this.vedioAdStatusListener = vedioAdStatusListener;
}
public interface YlhVideoAdListener {
void ylhVideoAdFail();
void ylhVideoAdSuccess();
void ylhVideoAdDownload();
} }
} }
package com.mints.goodmoney.ad.video.base
import android.app.Activity
import com.mints.goodmoney.common.Constant
import java.util.*
open class BaseVideoAd {
/**
* 激励视频请求接口封装
*/
fun getAdMapVO(carrierType: String, adsource: String, extraId: String?, curCoin: Int): HashMap<String, Any> {
val vo = HashMap<String, Any>()
vo["carrierType"] = carrierType
vo["adtype"] = Constant.ADTYPE_VEDIO
vo["adsource"] = adsource
var tempExtraId = ""
if (extraId != null) {
tempExtraId = extraId
}
when (carrierType) {
Constant.CARRIER_VERSUS_VIDEO -> vo["coin"] = curCoin
Constant.CARRIER_HOMEWATER -> vo["waterCoin"] = curCoin
Constant.CARRIER_OFFLINE_DOUBLE -> vo["offline_income"] = curCoin
Constant.CARRIER_CHALLENGE_TURN, Constant.CARRIER_CHALLENGE_CARD -> vo["turntableKey"] = tempExtraId
}
return vo
}
open fun loadAd(activity: Activity, curCoin: Int, carrierType: String, extraId: String?) {}
open fun onDestroy() {}
}
\ No newline at end of file
package com.mints.goodmoney.ad.video.base;//package com.example.rule;
public enum ChannelRuleEnum {
/**
* 头条
*/
// CSJ_FULL_AD(Constant.CSJ_FULL_AD, CsjFullVideoAdManager.getInstance()),
// CSJ_VEDIO_AD(Constant.CSJ_VEDIO_AD, CsjVideoAdManager.getInstance()),
;
public String name;
public BaseVideoAd channel;
ChannelRuleEnum(String name, BaseVideoAd channel) {
this.name = name;
this.channel = channel;
}
//匹配
public static ChannelRuleEnum match(String name) {
ChannelRuleEnum[] values = ChannelRuleEnum.values();
for (ChannelRuleEnum value : values) {
if (value.name.equals(name)) {
return value;
}
}
return null;
}
public String getName() {
return name;
}
}
package com.mints.goodmoney.ad.video.base
/**
* 广告状态触发事件
*/
interface VedioAdStatusListener {
/**
* 广告加载失败
*/
fun adFail()
/**
* 广告加载成功
*/
fun adSuccess()
/**
* 点击广告
*/
fun adDownload()
}
\ No newline at end of file
...@@ -25,7 +25,9 @@ import com.mints.goodmoney.ui.widgets.dialog.DrawcashVideoDialog ...@@ -25,7 +25,9 @@ import com.mints.goodmoney.ui.widgets.dialog.DrawcashVideoDialog
import com.mints.goodmoney.utils.LogUtil import com.mints.goodmoney.utils.LogUtil
import com.mints.library.utils.CommonUtils import com.mints.library.utils.CommonUtils
import com.mints.library.utils.json.JsonUtil import com.mints.library.utils.json.JsonUtil
import com.mints.library.utils.nodoubleclick.AntiShake
import kotlinx.android.synthetic.main.activity_drawcash.* import kotlinx.android.synthetic.main.activity_drawcash.*
import kotlinx.android.synthetic.main.fragment_main_my.*
import kotlinx.android.synthetic.main.header_layout.* import kotlinx.android.synthetic.main.header_layout.*
import kotlinx.android.synthetic.main.view_title.* import kotlinx.android.synthetic.main.view_title.*
import java.math.BigDecimal import java.math.BigDecimal
...@@ -381,6 +383,8 @@ class DrawcashActivity : BaseActivity(), ...@@ -381,6 +383,8 @@ class DrawcashActivity : BaseActivity(),
} }
override fun userFrequently() { override fun userFrequently() {
if (AntiShake.check(tvDrawcashExplain?.id)) return
readyGoThenKill(DrawcashRecordActivity::class.java) readyGoThenKill(DrawcashRecordActivity::class.java)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment