Commit 13f26067 authored by mengcuiguang's avatar mengcuiguang

添加新闻、添加分包sdk、添加黑名单、代码优化

parents 008aca0d 8285f2f2
...@@ -204,6 +204,7 @@ dependencies { ...@@ -204,6 +204,7 @@ dependencies {
implementation("com.yilan.sdk:ui:3.0.0.3") { implementation("com.yilan.sdk:ui:3.0.0.3") {
exclude group: 'com.yilan.sdk', module: 'toutiao' exclude group: 'com.yilan.sdk', module: 'toutiao'
exclude group: 'com.yilan.sdk', module: 'gdt' exclude group: 'com.yilan.sdk', module: 'gdt'
exclude group: 'com.yilan.sdk', module: 'ks'
} }
implementation('com.aliyun.ams:alicloud-android-httpdns:1.2.3@aar') { implementation('com.aliyun.ams:alicloud-android-httpdns:1.2.3@aar') {
transitive true transitive true
...@@ -239,6 +240,10 @@ dependencies { ...@@ -239,6 +240,10 @@ dependencies {
// 瑞狮新闻 // 瑞狮新闻
implementation 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:+' implementation 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:+'
compile(name: 'xrsdk-release_tbs', ext: 'aar') compile(name: 'xrsdk-release_tbs', ext: 'aar')
// 枫岚
implementation(name: 'mh-adsdk', ext: 'aar')
implementation(name: 'mh-adsdk-ext', ext: 'aar')
implementation(name: 'ks_3.3.5.3', ext: 'aar')
// testImplementation 'junit:junit:4.13' // testImplementation 'junit:junit:4.13'
......
...@@ -140,7 +140,9 @@ ...@@ -140,7 +140,9 @@
<activity <activity
android:name=".ui.activitys.AboutusActivity" android:name=".ui.activitys.AboutusActivity"
android:screenOrientation="portrait" /> android:screenOrientation="portrait" />
<activity android:name=".ui.activitys.GuideActivity" /> <activity
android:name=".ui.activitys.GuideActivity"
android:screenOrientation="portrait" />
<activity <activity
android:name=".ui.activitys.LiebaoGameActivity" android:name=".ui.activitys.LiebaoGameActivity"
android:screenOrientation="portrait" /> android:screenOrientation="portrait" />
......
...@@ -50,7 +50,7 @@ class InitAppService : IntentService("InitializeService") { ...@@ -50,7 +50,7 @@ class InitAppService : IntentService("InitializeService") {
if (ACTION_INIT == action) { if (ACTION_INIT == action) {
initApplication() initApplication()
isInit = false isInit = true
} }
} }
} }
......
...@@ -14,6 +14,7 @@ import androidx.multidex.MultiDexApplication; ...@@ -14,6 +14,7 @@ import androidx.multidex.MultiDexApplication;
import com.bun.miitmdid.core.JLibrary; import com.bun.miitmdid.core.JLibrary;
import com.mints.goodmoney.common.Constant; import com.mints.goodmoney.common.Constant;
import com.mints.goodmoney.manager.LiebaoManager; import com.mints.goodmoney.manager.LiebaoManager;
import com.mints.goodmoney.manager.MhManager;
import com.mints.goodmoney.manager.MiitHelper; import com.mints.goodmoney.manager.MiitHelper;
import com.mints.goodmoney.manager.RsNewsManager; import com.mints.goodmoney.manager.RsNewsManager;
import com.mints.goodmoney.manager.TtCsjAdManager; import com.mints.goodmoney.manager.TtCsjAdManager;
...@@ -38,7 +39,7 @@ public class MintsApplication extends MultiDexApplication { ...@@ -38,7 +39,7 @@ public class MintsApplication extends MultiDexApplication {
private static MintsApplication mContext; private static MintsApplication mContext;
public static String OAID = ""; public static String OAID = "";
private static LocalBroadcastManager mLocalBroadcatManager; private static LocalBroadcastManager mLocalBroadcastManager;
private Scheduler defaultSubscribeScheduler; private Scheduler defaultSubscribeScheduler;
private LoanService loanService; private LoanService loanService;
...@@ -50,12 +51,10 @@ public class MintsApplication extends MultiDexApplication { ...@@ -50,12 +51,10 @@ public class MintsApplication extends MultiDexApplication {
@Override @Override
public void onCreate() { public void onCreate() {
super.onCreate(); super.onCreate();
mContext = this; mContext = this;
// 判断应用是否在前台 // 判断应用是否在前台
ForegroundOrBackground.init(this); ForegroundOrBackground.init(this);
// 9.0之后不可多进程使用一个目录下的WebView,写在SDK初始化之前
androidPWebView();
// 三方配置 // 三方配置
thirdConfig(); thirdConfig();
} }
...@@ -82,6 +81,9 @@ public class MintsApplication extends MultiDexApplication { ...@@ -82,6 +81,9 @@ public class MintsApplication extends MultiDexApplication {
super.attachBaseContext(base); super.attachBaseContext(base);
MultiDex.install(base); MultiDex.install(base);
// 9.0之后不可多进程使用一个目录下的WebView,写在SDK初始化之前
androidPWebView();
// 移动安全联盟 // 移动安全联盟
try { try {
JLibrary.InitEntry(base); JLibrary.InitEntry(base);
...@@ -116,6 +118,9 @@ public class MintsApplication extends MultiDexApplication { ...@@ -116,6 +118,9 @@ public class MintsApplication extends MultiDexApplication {
// 闪电盒子 // 闪电盒子
WnManager.INSTANCE.initWn(this); WnManager.INSTANCE.initWn(this);
// 枫岚广告
MhManager.INSTANCE.initWn(this);
// 一览视频 // 一览视频
YlVideoManager.INSTANCE.init(this); YlVideoManager.INSTANCE.init(this);
...@@ -157,10 +162,10 @@ public class MintsApplication extends MultiDexApplication { ...@@ -157,10 +162,10 @@ public class MintsApplication extends MultiDexApplication {
* 获得LocalBroadcastManager对象 * 获得LocalBroadcastManager对象
*/ */
public static LocalBroadcastManager getLocalBroadcastManager() { public static LocalBroadcastManager getLocalBroadcastManager() {
if (mLocalBroadcatManager == null) { if (mLocalBroadcastManager == null) {
mLocalBroadcatManager = LocalBroadcastManager.getInstance(mContext); mLocalBroadcastManager = LocalBroadcastManager.getInstance(mContext);
} }
return mLocalBroadcatManager; return mLocalBroadcastManager;
} }
public LoanService getLoanService() { public LoanService getLoanService() {
......
package com.mints.goodmoney.ad.video
import android.app.Activity
import com.maplehaze.adsdk.video.RewardVideoAd
import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.manager.MhManager
import com.mints.goodmoney.manager.TrackManager
import com.mints.goodmoney.mvp.presenters.MhVedioAdPresenter
import com.mints.goodmoney.mvp.views.VedioAdManagerView
import com.mints.goodmoney.utils.LogUtil
/**
* 枫岚广告视频
*/
class MhVedioAdManager private constructor(activity: Activity) :
BaseVideoAd(activity), VedioAdManagerView {
private val TAG = MhVedioAdManager::class.java.simpleName
private var mhVdedioAdPresenter: MhVedioAdPresenter? = null
private var mhVedioAdListener: MhVedioAdListener? = null
private var mRewardVideoAd: RewardVideoAd? = null
private var isClickScreen: Boolean = true
override var activity: Activity? = null
companion object {
private var _inst: MhVedioAdManager? = null
fun getInstance(activity: Activity): MhVedioAdManager? {
return if (_inst != null) {
_inst
} else {
_inst = MhVedioAdManager(activity)
_inst
}
}
}
init {
init(activity)
}
private fun init(activity: Activity) {
this.activity = activity
mhVdedioAdPresenter = MhVedioAdPresenter()
mhVdedioAdPresenter?.attachView(this)
}
override fun loadAd(activity: Activity, curCoin: Int, carrierType: String, extraId: String?) {
this.activity = activity
isClickScreen = true
var postId: String = when (carrierType) {
Constant.CARRIER_VERSUS_VIDEO -> MhManager.POS_ID
Constant.CARRIER_HOMEWATER -> MhManager.POS_ID
Constant.CARRIER_CHALLENGE_TURN, Constant.CARRIER_DRAWCASH -> MhManager.POS_ID
Constant.CARRIER_CHALLENGE_CARD -> MhManager.POS_ID
else -> MhManager.POS_ID
}
val orientation = RewardVideoAd.VERTICAL
mRewardVideoAd = RewardVideoAd(activity, MhManager.APP_ID, postId, orientation, object : RewardVideoAd.RewardVideoListener {
override fun onADCached() {
LogUtil.d(TAG, "onADCached")
mRewardVideoAd?.showAd(activity)
}
override fun onADShow() {
LogUtil.d(TAG, "onADShow")
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_FL, Constant.EVENT_TYPE_ZERO, "", "")
}
override fun onReward() {
LogUtil.d(TAG, "onReward")
}
override fun onADClick() {
LogUtil.d(TAG, "onADClick")
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_FL, Constant.EVENT_TYPE_TWO, "", "")
if (isClickScreen) {
// 防止重复
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_FL, Constant.EVENT_TYPE_FOUR, "", "")
isClickScreen = false
}
if (mhVedioAdListener != null) {
mhVedioAdListener?.mhVedioAdDownload()
}
}
override fun onVideoComplete() {
LogUtil.d(TAG, "onVideoComplete")
}
override fun onADClose() {
LogUtil.d(TAG, "onADClose")
mhVdedioAdPresenter?.reportAddCoinMsg(activity, getAdMapVO(carrierType, Constant.AD_SOURCE_FL, extraId, curCoin))
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_FL, Constant.EVENT_TYPE_THREE, "", "")
if (mhVedioAdListener != null) {
mhVedioAdListener?.mhVedioAdSuccess()
}
}
override fun onADError(p0: Int) {
LogUtil.d(TAG, "onADError->$p0")
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_FL, Constant.EVENT_TYPE_ONE, (p0).toString(), "")
if (mhVedioAdListener != null) {
mhVedioAdListener?.mhVedioAdFail()
}
}
})
mRewardVideoAd?.loadAd()
}
fun setMhVedioAdListener(mhVedioAdListener: MhVedioAdListener?) {
this.mhVedioAdListener = mhVedioAdListener
}
interface MhVedioAdListener {
fun mhVedioAdSuccess()
fun mhVedioAdFail()
fun mhVedioAdDownload()
}
override fun onDestory() {
mhVdedioAdPresenter?.let {
it.dispose()
it.detachView()
}
mRewardVideoAd = null
activity = null
}
}
\ No newline at end of file
...@@ -26,22 +26,22 @@ public class VedioAdingManager { ...@@ -26,22 +26,22 @@ public class VedioAdingManager {
private WnVedioAdManager wnVedioAdManager; private WnVedioAdManager wnVedioAdManager;
private CsjVedioAdManager csjVedioAdManager; private CsjVedioAdManager csjVedioAdManager;
private YlhVedioAdManager ylhVedioAdManager; private YlhVedioAdManager ylhVedioAdManager;
private MhVedioAdManager mhVedioAdManager;
private int wnWeight; private int wnWeight;
private int ylhWeight; private int ylhWeight;
private int csjVedioWeight; private int csjVedioWeight;
private int flVedioWeight;
private ArrayList<WeightBean> weightList; private ArrayList<WeightBean> weightList;
private Activity activity; private Activity activity;
private boolean isVedioAdDownload = false;// 是否点击广告下载 true-点击 private boolean isVedioAdDownload = false;// 是否点击广告下载 true-点击
public static VedioAdingManager getInstance(Activity activity) { public static VedioAdingManager getInstance(Activity activity) {
if (_inst != null) { if (_inst == null) {
return _inst;
} else {
_inst = new VedioAdingManager(activity); _inst = new VedioAdingManager(activity);
return _inst;
} }
return _inst;
} }
private VedioAdingManager(Activity activity) { private VedioAdingManager(Activity activity) {
...@@ -58,9 +58,20 @@ public class VedioAdingManager { ...@@ -58,9 +58,20 @@ public class VedioAdingManager {
csjVedioAdManager = CsjVedioAdManager.getInstance(activity); csjVedioAdManager = CsjVedioAdManager.getInstance(activity);
ylhVedioAdManager = YlhVedioAdManager.getInstance(activity); ylhVedioAdManager = YlhVedioAdManager.getInstance(activity);
wnVedioAdManager = WnVedioAdManager.Companion.getInstance(activity); wnVedioAdManager = WnVedioAdManager.Companion.getInstance(activity);
mhVedioAdManager = MhVedioAdManager.Companion.getInstance(activity);
weightList = new ArrayList<>(); weightList = new ArrayList<>();
} }
/**
* 初始化广告权重
*/
public void initAdWeight(int csjVedioWeight, int ylhWeight, int wnWeight, int flVedioWeight) {
this.csjVedioWeight = csjVedioWeight;
this.ylhWeight = ylhWeight;
this.wnWeight = wnWeight;
this.flVedioWeight = flVedioWeight;
}
/** /**
* 初始化广告权重 * 初始化广告权重
*/ */
...@@ -81,6 +92,17 @@ public class VedioAdingManager { ...@@ -81,6 +92,17 @@ public class VedioAdingManager {
loadAdVedio(getVedioAdType(), bean); loadAdVedio(getVedioAdType(), bean);
} }
/**
* 根据类型加载对应视频(第一次加载)
*
* @param bean
*/
public void loadAding(Activity activity, VedioAdingBean bean, int i) {
this.activity = activity;
isVedioAdDownload = false;
loadAdVedio(Constant.FL_VEDIO_AD, bean);
}
/** /**
* 加载失败优先级对应视频 * 加载失败优先级对应视频
* *
...@@ -101,6 +123,8 @@ public class VedioAdingManager { ...@@ -101,6 +123,8 @@ public class VedioAdingManager {
String nextAdType = ""; String nextAdType = "";
if (AppConfig.csjVedioAdCount > 0) { if (AppConfig.csjVedioAdCount > 0) {
nextAdType = Constant.CSJ_VEDIO_AD; nextAdType = Constant.CSJ_VEDIO_AD;
} else if (AppConfig.flVedioAdCount > 0) {
nextAdType = Constant.FL_VEDIO_AD;
} else if (AppConfig.ylhAdCount > 0) { } else if (AppConfig.ylhAdCount > 0) {
nextAdType = Constant.YLH_VEDIO_AD; nextAdType = Constant.YLH_VEDIO_AD;
} else { } else {
...@@ -143,6 +167,11 @@ public class VedioAdingManager { ...@@ -143,6 +167,11 @@ public class VedioAdingManager {
weight = weight + csjVedioWeight; weight = weight + csjVedioWeight;
LogUtil.d(TAG, "权重值:csjVedioWeight:" + csjVedioWeight); LogUtil.d(TAG, "权重值:csjVedioWeight:" + csjVedioWeight);
} }
if (AppConfig.flVedioAdCount > 0) {
weightList.add(new WeightBean(flVedioWeight, Constant.FL_VEDIO_AD));
weight = weight + flVedioWeight;
LogUtil.d(TAG, "权重值:flVedioWeight:" + flVedioWeight);
}
if (AppConfig.ylhAdCount > 0) { if (AppConfig.ylhAdCount > 0) {
weightList.add(new WeightBean(ylhWeight, Constant.YLH_VEDIO_AD)); weightList.add(new WeightBean(ylhWeight, Constant.YLH_VEDIO_AD));
weight = weight + ylhWeight; weight = weight + ylhWeight;
...@@ -186,8 +215,9 @@ public class VedioAdingManager { ...@@ -186,8 +215,9 @@ public class VedioAdingManager {
int csjVedioAdCount = AppConfig.csjVedioAdCount; int csjVedioAdCount = AppConfig.csjVedioAdCount;
int ylhAdCount = AppConfig.ylhAdCount; int ylhAdCount = AppConfig.ylhAdCount;
int wnAdCount = AppConfig.wnVedioAdCount; int wnAdCount = AppConfig.wnVedioAdCount;
int flVedioAdCount = AppConfig.flVedioAdCount;
if (ylhAdCount <= 0 && csjVedioAdCount <= 0 && wnAdCount <= 0) { if (ylhAdCount <= 0 && csjVedioAdCount <= 0 && wnAdCount <= 0 && flVedioAdCount <= 0) {
// showToast("今日视频已看完,请明天再来吧"); // showToast("今日视频已看完,请明天再来吧");
return true; return true;
} }
...@@ -208,12 +238,16 @@ public class VedioAdingManager { ...@@ -208,12 +238,16 @@ public class VedioAdingManager {
ylhVedioAdManager.onDestory(); ylhVedioAdManager.onDestory();
ylhVedioAdManager = null; ylhVedioAdManager = null;
} }
if (wnVedioAdManager != null) { if (wnVedioAdManager != null) {
wnVedioAdManager.setWnVedioAdListener(null); wnVedioAdManager.setWnVedioAdListener(null);
wnVedioAdManager.onDestory(); wnVedioAdManager.onDestory();
wnVedioAdManager = null; wnVedioAdManager = null;
} }
if (mhVedioAdManager != null) {
mhVedioAdManager.setMhVedioAdListener(null);
mhVedioAdManager.onDestory();
mhVedioAdManager = null;
}
activity = null; activity = null;
} }
...@@ -342,8 +376,41 @@ public class VedioAdingManager { ...@@ -342,8 +376,41 @@ public class VedioAdingManager {
isVedioAdDownload = true; isVedioAdDownload = true;
} }
}); });
wnVedioAdManager.loadAd(activity, bean.getCurCoin(), bean.getCarrierType(), bean.getExtraId()); wnVedioAdManager.loadAd(activity, bean.getCurCoin(), bean.getCarrierType(), bean.getExtraId());
} else if (TextUtils.equals(vedioAdType, Constant.FL_VEDIO_AD)) {
// 枫岚广告激励视频
if (mhVedioAdManager == null) {
if (activity == null) {
if (vedioAdingListener != null) {
vedioAdingListener.vedioAdingListenerError(Constant.FL_VEDIO_AD);
}
return;
}
mhVedioAdManager = MhVedioAdManager.Companion.getInstance(activity);
}
mhVedioAdManager.setMhVedioAdListener(new MhVedioAdManager.MhVedioAdListener() {
@Override
public void mhVedioAdSuccess() {
AppConfig.flVedioAdCount--;
if (vedioAdingListener != null) {
vedioAdingListener.vedioAdingListenerSuccess(Constant.FL_VEDIO_AD);
}
}
@Override
public void mhVedioAdFail() {
if (vedioAdingListener != null) {
vedioAdingListener.vedioAdingListenerFail(Constant.FL_VEDIO_AD);
}
}
@Override
public void mhVedioAdDownload() {
isVedioAdDownload = true;
}
});
mhVedioAdManager.loadAd(activity, bean.getCurCoin(), bean.getCarrierType(), bean.getExtraId());
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
......
...@@ -36,5 +36,9 @@ public class AppConfig { ...@@ -36,5 +36,9 @@ public class AppConfig {
* wnVedio 剩余广告播放数 * wnVedio 剩余广告播放数
*/ */
public static int wnVedioAdCount = 5; public static int wnVedioAdCount = 5;
/**
* flVedio 剩余广告播放数
*/
public static int flVedioAdCount = 5;
} }
...@@ -130,6 +130,7 @@ object Constant { ...@@ -130,6 +130,7 @@ object Constant {
const val AD_SOURCE_CSJ = "CSJ" const val AD_SOURCE_CSJ = "CSJ"
const val AD_SOURCE_YLH = "YLH" const val AD_SOURCE_YLH = "YLH"
const val AD_SOURCE_SDHZ = "SDHZ" //闪电盒子 const val AD_SOURCE_SDHZ = "SDHZ" //闪电盒子
const val AD_SOURCE_FL = "FL" //枫岚
// 调用事件 0 成功 1失败 2点击 3-有效展示 4-去重 // 调用事件 0 成功 1失败 2点击 3-有效展示 4-去重
const val EVENT_TYPE_ZERO = "0" const val EVENT_TYPE_ZERO = "0"
...@@ -148,6 +149,7 @@ object Constant { ...@@ -148,6 +149,7 @@ object Constant {
const val CSJ_VEDIO_AD = "CSJ_VEDIO_AD" const val CSJ_VEDIO_AD = "CSJ_VEDIO_AD"
const val YLH_VEDIO_AD = "YLH_VEDIO_AD" const val YLH_VEDIO_AD = "YLH_VEDIO_AD"
const val SDHZ_VEDIO_AD = "SDHZ_VEDIO_AD" const val SDHZ_VEDIO_AD = "SDHZ_VEDIO_AD"
const val FL_VEDIO_AD = "Fl_VEDIO_AD"
// 游戏类型 // 游戏类型
......
package com.mints.goodmoney.manager
import android.app.Application
import com.maplehaze.adsdk.MaplehazeSDK
/**
* 描述:枫岚激励视频
* 作者:孟崔广
*/
object MhManager {
const val APP_ID = "10200"
const val POS_ID = "56834"
/**
* 初始化
*/
fun initWn(application: Application) {
MaplehazeSDK.init(application)
}
}
\ No newline at end of file
...@@ -60,6 +60,7 @@ public class DrawcashBean implements Serializable { ...@@ -60,6 +60,7 @@ public class DrawcashBean implements Serializable {
private int SDHZ_VEDIO; private int SDHZ_VEDIO;
private int CSJ_VEDIO; private int CSJ_VEDIO;
private int YLH_VEDIO; private int YLH_VEDIO;
private int FL_VEDIO;
public int getSDHZ_VEDIO() { public int getSDHZ_VEDIO() {
return SDHZ_VEDIO; return SDHZ_VEDIO;
...@@ -72,6 +73,10 @@ public class DrawcashBean implements Serializable { ...@@ -72,6 +73,10 @@ public class DrawcashBean implements Serializable {
public int getYLH_VEDIO() { public int getYLH_VEDIO() {
return YLH_VEDIO; return YLH_VEDIO;
} }
public int getFL_VEDIO() {
return FL_VEDIO;
}
} }
public class CashOutMoneyArrBean implements Serializable { public class CashOutMoneyArrBean implements Serializable {
......
...@@ -7,8 +7,9 @@ public class VedioRulesBean implements Serializable { ...@@ -7,8 +7,9 @@ public class VedioRulesBean implements Serializable {
private CsjVedioBean CSJ_VEDIO; private CsjVedioBean CSJ_VEDIO;
private YlhVedioBean YLH_VEDIO; private YlhVedioBean YLH_VEDIO;
private SdhzVedioBean SDHZ_VEDIO; private SdhzVedioBean SDHZ_VEDIO;
private FLVedioBean FL_VEDIO;
public class CsjVedioBean implements Serializable{ public class CsjVedioBean implements Serializable {
private int surplus;//剩余可看视频数 private int surplus;//剩余可看视频数
private int rate;//权重 private int rate;//权重
...@@ -21,7 +22,7 @@ public class VedioRulesBean implements Serializable { ...@@ -21,7 +22,7 @@ public class VedioRulesBean implements Serializable {
} }
} }
public class YlhVedioBean implements Serializable{ public class YlhVedioBean implements Serializable {
private int surplus; private int surplus;
private int rate; private int rate;
...@@ -34,7 +35,7 @@ public class VedioRulesBean implements Serializable { ...@@ -34,7 +35,7 @@ public class VedioRulesBean implements Serializable {
} }
} }
public class SdhzVedioBean implements Serializable{ public class SdhzVedioBean implements Serializable {
private int surplus; private int surplus;
private int rate; private int rate;
...@@ -47,6 +48,23 @@ public class VedioRulesBean implements Serializable { ...@@ -47,6 +48,23 @@ public class VedioRulesBean implements Serializable {
} }
} }
public class FLVedioBean implements Serializable {
private int surplus;
private int rate;
public int getSurplus() {
return surplus;
}
public int getRate() {
return rate;
}
}
public FLVedioBean getFL_VEDIO() {
return FL_VEDIO;
}
public CsjVedioBean getCSJ_VEDIO() { public CsjVedioBean getCSJ_VEDIO() {
return CSJ_VEDIO; return CSJ_VEDIO;
} }
......
package com.mints.goodmoney.mvp.presenters
import android.app.Activity
import com.mints.goodmoney.MintsApplication
import com.mints.goodmoney.mvp.model.BaseResponse
import com.mints.goodmoney.mvp.views.VedioAdManagerView
import com.mints.library.net.neterror.BaseSubscriber
import com.mints.library.net.neterror.Throwable
import rx.Subscription
import rx.android.schedulers.AndroidSchedulers
import java.util.*
class MhVedioAdPresenter : BasePresenter<VedioAdManagerView>() {
fun reportAddCoinMsg(activity: Activity?, vo: HashMap<String, Any>) {
if (activity == null) return
loanApplication = activity.application as MintsApplication
loanService = loanApplication.loanService
subscription = loanService.reportAddCoinMsg(vo)
.observeOn(AndroidSchedulers.mainThread())
.subscribeOn(loanApplication.defaultSubscribeScheduler())
.subscribe(object : BaseSubscriber<BaseResponse<Any>>() {
override fun onCompleted() {}
override fun onError(e: Throwable) {
}
override fun onNext(baseResponse: BaseResponse<Any>) {}
})
}
fun dispose() {
loanService = null
loanApplication = null
if (subscription != null && !subscription.isUnsubscribed()) {
subscription.unsubscribe()
}
}
}
\ No newline at end of file
...@@ -15,7 +15,7 @@ class WnVedioAdPresenter : BasePresenter<VedioAdManagerView>() { ...@@ -15,7 +15,7 @@ class WnVedioAdPresenter : BasePresenter<VedioAdManagerView>() {
fun reportAddCoinMsg(activity: Activity?, vo: HashMap<String, Any>) { fun reportAddCoinMsg(activity: Activity?, vo: HashMap<String, Any>) {
if (activity == null) return if (activity == null) return
loanApplication = activity.application as MintsApplication loanApplication = activity.application as MintsApplication
loanService = loanApplication.getLoanService() loanService = loanApplication.loanService
subscription = loanService.reportAddCoinMsg(vo) subscription = loanService.reportAddCoinMsg(vo)
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribeOn(loanApplication.defaultSubscribeScheduler()) .subscribeOn(loanApplication.defaultSubscribeScheduler())
......
...@@ -269,6 +269,7 @@ class DrawcashActivity : BaseActivity(), ...@@ -269,6 +269,7 @@ class DrawcashActivity : BaseActivity(),
* 设置视频权重 * 设置视频权重
*/ */
private fun initAdWeight(data: DrawcashBean.VedioRules) { private fun initAdWeight(data: DrawcashBean.VedioRules) {
// vedioAdingManager?.initAdWeight(data.csJ_VEDIO, data.ylH_VEDIO, data.sdhZ_VEDIO, data.fL_VEDIO)
vedioAdingManager?.initAdWeight(data.csJ_VEDIO, data.ylH_VEDIO, data.sdhZ_VEDIO) vedioAdingManager?.initAdWeight(data.csJ_VEDIO, data.ylH_VEDIO, data.sdhZ_VEDIO)
LogUtil.d(TAG, "提现权重值:csjWeight:${data.csJ_VEDIO} ylhWeight:${data.ylH_VEDIO} sdhzWeight:${data.sdhZ_VEDIO}") LogUtil.d(TAG, "提现权重值:csjWeight:${data.csJ_VEDIO} ylhWeight:${data.ylH_VEDIO} sdhzWeight:${data.sdhZ_VEDIO}")
// 广告视频数 // 广告视频数
......
...@@ -3,10 +3,8 @@ package com.mints.goodmoney.ui.activitys ...@@ -3,10 +3,8 @@ package com.mints.goodmoney.ui.activitys
import android.os.Bundle import android.os.Bundle
import android.view.KeyEvent import android.view.KeyEvent
import android.view.View import android.view.View
import android.view.View.OnLongClickListener
import android.view.ViewGroup import android.view.ViewGroup
import android.webkit.WebChromeClient import android.webkit.WebChromeClient
import com.github.lzyzsd.jsbridge.BridgeHandler
import com.github.lzyzsd.jsbridge.CallBackFunction import com.github.lzyzsd.jsbridge.CallBackFunction
import com.github.lzyzsd.jsbridge.DefaultHandler import com.github.lzyzsd.jsbridge.DefaultHandler
import com.mints.goodmoney.BuildConfig import com.mints.goodmoney.BuildConfig
...@@ -83,22 +81,20 @@ class EraseActivity : BaseActivity(), View.OnClickListener{ ...@@ -83,22 +81,20 @@ class EraseActivity : BaseActivity(), View.OnClickListener{
private fun loadTurnUrl() { private fun loadTurnUrl() {
getTurnUrl() getTurnUrl()
blEarseWebview.setDefaultHandler(DefaultHandler()) blEarseWebview.setDefaultHandler(DefaultHandler())
blEarseWebview.setWebChromeClient(WebChromeClient()) blEarseWebview.webChromeClient = WebChromeClient()
blEarseWebview.setOnLongClickListener(OnLongClickListener { true }) blEarseWebview.setOnLongClickListener { true }
blEarseWebview.registerHandler("getEraseResult", BridgeHandler { data, function -> blEarseWebview.registerHandler("getEraseResult") { data, _ ->
if(!isFinishing){ if (!isFinishing) {
val turntableBean: TurntableBean = JsonUtil.parseJson(data, TurntableBean::class.java) val turntableBean: TurntableBean = JsonUtil.parseJson(data, TurntableBean::class.java)
if (turntableBean != null) { val bundle = Bundle()
val bundle = Bundle() bundle.putInt(Constant.MAIN_CUR_COIN, turntableBean.coin)
bundle.putInt(Constant.MAIN_CUR_COIN, turntableBean.getCoin()) bundle.putString(Constant.MAIN_CARRIER_TYPE, carrierType)
bundle.putString(Constant.MAIN_CARRIER_TYPE, carrierType) bundle.putString(Constant.MAIN_EXTRA_ID, turntableBean.key)
bundle.putString(Constant.MAIN_EXTRA_ID, turntableBean.getKey()) readyGo(AwardActivity::class.java, bundle)
readyGo(AwardActivity::class.java, bundle)
androidCallJsReferse()
androidCallJsReferse()
}
} }
}) }
blEarseWebview.setDefaultHandler(object : DefaultHandler() { blEarseWebview.setDefaultHandler(object : DefaultHandler() {
override fun handler(data: String, function: CallBackFunction) { override fun handler(data: String, function: CallBackFunction) {
showToast(data) showToast(data)
...@@ -110,7 +106,7 @@ class EraseActivity : BaseActivity(), View.OnClickListener{ ...@@ -110,7 +106,7 @@ class EraseActivity : BaseActivity(), View.OnClickListener{
* 获取url * 获取url
*/ */
private fun getTurnUrl() { private fun getTurnUrl() {
val tokenID: String = userManager.getTokenID() val tokenID: String = userManager.tokenID
val url: String = BuildConfig.MainIp+ "hang/card.html?carrierType=" + carrierType + "&token=" + tokenID val url: String = BuildConfig.MainIp+ "hang/card.html?carrierType=" + carrierType + "&token=" + tokenID
LogUtil.d("getTurnUrl",url) LogUtil.d("getTurnUrl",url)
blEarseWebview.loadUrl(url) blEarseWebview.loadUrl(url)
......
package com.mints.goodmoney.ui.activitys package com.mints.goodmoney.ui.activitys
import android.annotation.SuppressLint
import android.text.Editable import android.text.Editable
import android.text.TextUtils import android.text.TextUtils
import android.text.TextWatcher import android.text.TextWatcher
...@@ -54,13 +55,14 @@ class FeedbackActivity : BaseActivity() ...@@ -54,13 +55,14 @@ class FeedbackActivity : BaseActivity()
etFeedbackContent.addTextChangedListener(object : TextWatcher { etFeedbackContent.addTextChangedListener(object : TextWatcher {
override fun beforeTextChanged(s: CharSequence, start: Int, count: Int, after: Int) {} override fun beforeTextChanged(s: CharSequence, start: Int, count: Int, after: Int) {}
@SuppressLint("SetTextI18n")
override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) { override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) {
if (s.toString().trim { it <= ' ' }.length > maxLength) { if (s.toString().trim { it <= ' ' }.length > maxLength) {
etFeedbackContent.setText(s.toString().substring(0, maxLength)) etFeedbackContent.setText(s.toString().substring(0, maxLength))
etFeedbackContent.setSelection(maxLength) etFeedbackContent.setSelection(maxLength)
showToast("您最多能输入150个字") showToast("您最多能输入150个字")
} }
tvFeedbackCount.setText(etFeedbackContent.getText().toString().length.toString() + "/150") tvFeedbackCount.text = etFeedbackContent.text.toString().length.toString() + "/150"
} }
override fun afterTextChanged(s: Editable) {} override fun afterTextChanged(s: Editable) {}
......
...@@ -62,7 +62,7 @@ class GuideActivity : BaseActivity() { ...@@ -62,7 +62,7 @@ class GuideActivity : BaseActivity() {
mImageViews.add(imageView) mImageViews.add(imageView)
} }
val viewPagerAdapter = ViewPagerAdapter(mImageViews) val viewPagerAdapter = ViewPagerAdapter(mImageViews)
vp_guide_viewpager.setAdapter(viewPagerAdapter) vp_guide_viewpager.adapter = viewPagerAdapter
vp_guide_viewpager.setOnPageChangeListener(mOnPagerChangeListener) vp_guide_viewpager.setOnPageChangeListener(mOnPagerChangeListener)
} }
...@@ -72,16 +72,16 @@ class GuideActivity : BaseActivity() { ...@@ -72,16 +72,16 @@ class GuideActivity : BaseActivity() {
private val mOnPagerChangeListener: OnPageChangeListener = object : OnPageChangeListener { private val mOnPagerChangeListener: OnPageChangeListener = object : OnPageChangeListener {
//当界面切换完成的时候调用的方法 //当界面切换完成的时候调用的方法
override fun onPageSelected(position: Int) { override fun onPageSelected(position: Int) {
pageIndicatorView.setSelection(position) pageIndicatorView.selection = position
if (position == mImageViews.size - 1) { if (position == mImageViews.size - 1) {
val alphaAnimator = ObjectAnimator.ofFloat(btn_guide_start, "alpha", 0f, 1f) val alphaAnimator = ObjectAnimator.ofFloat(btn_guide_start, "alpha", 0f, 1f)
alphaAnimator.repeatCount = 0 alphaAnimator.repeatCount = 0
animatorSet.play(alphaAnimator) animatorSet.play(alphaAnimator)
animatorSet.duration = 1500 animatorSet.duration = 1500
animatorSet.start() animatorSet.start()
btn_guide_start.setVisibility(View.VISIBLE) btn_guide_start.visibility = View.VISIBLE
} else { } else {
btn_guide_start.setVisibility(View.INVISIBLE) btn_guide_start.visibility = View.INVISIBLE
} }
} }
......
...@@ -20,8 +20,8 @@ import java.util.* ...@@ -20,8 +20,8 @@ import java.util.*
* 作者:孟崔广 * 作者:孟崔广
* 时间:2020/10/12 10:09 * 时间:2020/10/12 10:09
*/ */
class LiebaoGameActivity : BaseActivity() class LiebaoGameActivity : BaseActivity(),
, View.OnClickListener, GameView, View.OnClickListener, GameView,
IAppCallback, IAppCallback,
IGamePlayTimeCallback, IGamePlayTimeCallback,
IGameAdCallback, IGameAdCallback,
...@@ -89,17 +89,16 @@ class LiebaoGameActivity : BaseActivity() ...@@ -89,17 +89,16 @@ class LiebaoGameActivity : BaseActivity()
} }
override fun gameInfo(sumTime: Int, sumCoin: Int, gameTime: Int) { override fun gameInfo(sumTime: Int, sumCoin: Int, gameTime: Int) {
if(!isFinishing){ if (!isFinishing) {
tvGameHint.visibility = View.VISIBLE tvGameHint.visibility = View.VISIBLE
if (gameTime >= sumTime) { if (gameTime >= sumTime) {
tvGameHint.setText("今日游戏任务已完成") tvGameHint.text = "今日游戏任务已完成"
} else { } else {
tvGameHint.setText( tvGameHint.text = SpanUtils()
SpanUtils() .append("畅玩").append("${sumTime / 60}").setForegroundColor(mContext.resources.getColor(R.color.color_FF9837)).append("分钟, ")
.append("畅玩").append("${sumTime / 60}").setForegroundColor(mContext.resources.getColor(R.color.color_FF9837)).append("分钟, ") .append("奖励").append("$sumCoin").setForegroundColor(mContext.resources.getColor(R.color.color_cb4a39)).append("金币, ")
.append("奖励").append("${sumCoin}").setForegroundColor(mContext.resources.getColor(R.color.color_cb4a39)).append("金币, ") .append("已玩").append("${gameTime / 60}").setForegroundColor(mContext.resources.getColor(R.color.color_FF9837)).append("分钟")
.append("已玩").append("${gameTime / 60}").setForegroundColor(mContext.resources.getColor(R.color.color_FF9837)).append("分钟") .create()
.create())
} }
} }
} }
......
...@@ -14,7 +14,6 @@ import com.mints.goodmoney.R ...@@ -14,7 +14,6 @@ import com.mints.goodmoney.R
import com.mints.goodmoney.ad.video.VedioAdingManager import com.mints.goodmoney.ad.video.VedioAdingManager
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.TTPreLoadCarrierExpressManager
import com.mints.goodmoney.manager.ZhangyueManager import com.mints.goodmoney.manager.ZhangyueManager
import com.mints.goodmoney.mvp.views.MainView import com.mints.goodmoney.mvp.views.MainView
import com.mints.goodmoney.ui.activitys.base.BaseActivity import com.mints.goodmoney.ui.activitys.base.BaseActivity
......
...@@ -51,7 +51,7 @@ class MobileLoginActivity : BaseActivity() ...@@ -51,7 +51,7 @@ class MobileLoginActivity : BaseActivity()
finish() finish()
} }
R.id.tvLoginSendcode -> { R.id.tvLoginSendcode -> {
var mobile = etLoginMobile.getText().toString().trim() var mobile = etLoginMobile.text.toString().trim()
if (mobile.length < 13) { if (mobile.length < 13) {
showToast("请输入手机号") showToast("请输入手机号")
return return
...@@ -62,13 +62,13 @@ class MobileLoginActivity : BaseActivity() ...@@ -62,13 +62,13 @@ class MobileLoginActivity : BaseActivity()
loginPresenter.sendMobileCode(mobile) loginPresenter.sendMobileCode(mobile)
} }
R.id.tvLoginNext -> { R.id.tvLoginNext -> {
var mobile = etLoginMobile.getText().toString().trim() var mobile = etLoginMobile.text.toString().trim()
if (mobile.length < 13) { if (mobile.length < 13) {
showToast("请输入手机号") showToast("请输入手机号")
return return
} }
var code = etLoginCode.getText().toString().trim() val code = etLoginCode.text.toString().trim()
if (code.length < 4) { if (code.length < 4) {
showToast("请输入验证码") showToast("请输入验证码")
return return
...@@ -107,7 +107,7 @@ class MobileLoginActivity : BaseActivity() ...@@ -107,7 +107,7 @@ class MobileLoginActivity : BaseActivity()
} }
override fun sendCodeSuc() { override fun sendCodeSuc() {
if (!isFinishing()) { if (!isFinishing) {
sendCodeThread() sendCodeThread()
} }
} }
...@@ -141,18 +141,18 @@ class MobileLoginActivity : BaseActivity() ...@@ -141,18 +141,18 @@ class MobileLoginActivity : BaseActivity()
fun sendCodeThread() { fun sendCodeThread() {
num = 60 num = 60
tvLoginSendcode?.let { tvLoginSendcode?.let {
it.setEnabled(false) it.isEnabled = false
it.setText("($num)重新获取") it.text = "($num)重新获取"
run = object : Runnable { run = object : Runnable {
override fun run() { override fun run() {
num-- num--
LogUtil.d("login", "login num:" + num) LogUtil.d("login", "login num:$num")
if (num == 0) { if (num == 0) {
it.setText("重新获取") it.text = "重新获取"
it.setEnabled(true) it.isEnabled = true
} else { } else {
it.setText("($num)重新获取") it.text = "($num)重新获取"
it.postDelayed(this, 1000) it.postDelayed(this, 1000)
} }
} }
......
...@@ -236,7 +236,7 @@ class SettingsActivity : BaseActivity(), View.OnClickListener, OnLoginListener, ...@@ -236,7 +236,7 @@ class SettingsActivity : BaseActivity(), View.OnClickListener, OnLoginListener,
val dialog = AlertDialog.Builder(this) val dialog = AlertDialog.Builder(this)
.setTitle("请输入邀请码") .setTitle("请输入邀请码")
.setPositiveButton("确定") { dialog, which -> .setPositiveButton("确定") { dialog, _ ->
if (etInput.text.isEmpty()) { if (etInput.text.isEmpty()) {
showToast("请输入邀请码") showToast("请输入邀请码")
} else { } else {
...@@ -244,7 +244,7 @@ class SettingsActivity : BaseActivity(), View.OnClickListener, OnLoginListener, ...@@ -244,7 +244,7 @@ class SettingsActivity : BaseActivity(), View.OnClickListener, OnLoginListener,
} }
} }
.setNegativeButton("取消") { dialog, which -> .setNegativeButton("取消") { dialog, _ ->
dialog.dismiss() dialog.dismiss()
} }
.create() .create()
...@@ -290,14 +290,14 @@ class SettingsActivity : BaseActivity(), View.OnClickListener, OnLoginListener, ...@@ -290,14 +290,14 @@ class SettingsActivity : BaseActivity(), View.OnClickListener, OnLoginListener,
try { try {
wxInfo = WXInfo() wxInfo = WXInfo()
wxInfo?.let { wxInfo?.let {
it.setUnionid(res["unionid"].toString() + "") it.unionid = res["unionid"].toString() + ""
it.setOpenid(res["openid"].toString() + "") it.openid = res["openid"].toString() + ""
it.setProvince(res["province"].toString() + "") it.province = res["province"].toString() + ""
it.setCity(res["city"].toString() + "") it.city = res["city"].toString() + ""
it.setCountry(res["country"].toString() + "") it.country = res["country"].toString() + ""
it.setHeadimgurl(res["headimgurl"].toString() + "") it.headimgurl = res["headimgurl"].toString() + ""
it.setNickname(res["nickname"].toString() + "") it.nickname = res["nickname"].toString() + ""
it.setSex((res["sex"].toString() + "").toInt()) it.sex = (res["sex"].toString() + "").toInt()
} }
if (!isFinishing) { if (!isFinishing) {
......
...@@ -54,8 +54,6 @@ class SplashADActivity : BaseActivity(), SplashADListener { ...@@ -54,8 +54,6 @@ class SplashADActivity : BaseActivity(), SplashADListener {
} }
} }
// 预加载好兔视频
YLLittleVideoFragment.preloadVideo()
} }
override fun isApplyKitKatTranslucency(): Boolean { override fun isApplyKitKatTranslucency(): Boolean {
......
...@@ -33,9 +33,6 @@ class SplashActivity : BaseActivity() { ...@@ -33,9 +33,6 @@ class SplashActivity : BaseActivity() {
// 校验APP签名 // 校验APP签名
checkAppSign() checkAppSign()
// 预加载好兔视频
YLLittleVideoFragment.preloadVideo()
} }
override fun getContentViewLayoutID() = R.layout.activity_splash override fun getContentViewLayoutID() = R.layout.activity_splash
...@@ -52,11 +49,9 @@ class SplashActivity : BaseActivity() { ...@@ -52,11 +49,9 @@ class SplashActivity : BaseActivity() {
override fun onDestroy() { override fun onDestroy() {
super.onDestroy() super.onDestroy()
if (mAlph != null) mAlph.cancel() mAlph.cancel()
if (animationSet != null) { animationSet.cancel()
animationSet.cancel() animationSet.setAnimationListener(null)
animationSet.setAnimationListener(null)
}
} }
...@@ -68,6 +63,9 @@ class SplashActivity : BaseActivity() { ...@@ -68,6 +63,9 @@ class SplashActivity : BaseActivity() {
if (!deviceInfo.signInfo) { if (!deviceInfo.signInfo) {
finish() finish()
} else { } else {
// 预加载好兔视频
YLLittleVideoFragment.preloadVideo()
setAnimation() setAnimation()
} }
} }
......
...@@ -65,9 +65,6 @@ class SplashYlhActivity : BaseActivity(), SplashADListener { ...@@ -65,9 +65,6 @@ class SplashYlhActivity : BaseActivity(), SplashADListener {
} }
// 校验APP签名 // 校验APP签名
checkAppSign() checkAppSign()
// 预加载好兔视频
YLLittleVideoFragment.preloadVideo()
} }
override fun isApplyKitKatTranslucency(): Boolean { override fun isApplyKitKatTranslucency(): Boolean {
......
...@@ -28,11 +28,11 @@ class WebActivity : BaseActivity(), View.OnClickListener { ...@@ -28,11 +28,11 @@ class WebActivity : BaseActivity(), View.OnClickListener {
} }
override fun initViewsAndEvents() { override fun initViewsAndEvents() {
pb_web.setProgress(0) pb_web.progress = 0
if (TextUtils.isEmpty(title)) { if (TextUtils.isEmpty(title)) {
tv_activity_title.setText("推荐") tv_activity_title.text = "推荐"
} else { } else {
tv_activity_title.setText(title) tv_activity_title.text = title
} }
if (!TextUtils.isEmpty(url) if (!TextUtils.isEmpty(url)
...@@ -46,14 +46,14 @@ class WebActivity : BaseActivity(), View.OnClickListener { ...@@ -46,14 +46,14 @@ class WebActivity : BaseActivity(), View.OnClickListener {
} }
if (!TextUtils.isEmpty(url)) { if (!TextUtils.isEmpty(url)) {
browser_layout.webView?.setWebViewClient(object : WebViewClient() { browser_layout.webView?.webViewClient = object : WebViewClient() {
override fun shouldOverrideUrlLoading( override fun shouldOverrideUrlLoading(
view: WebView, view: WebView,
url: String url: String
): Boolean { ): Boolean {
if (url.contains(".apk") || url.contains("pgyer") || url.contains("weixin://wap/pay") || url.contains( if (url.contains(".apk") || url.contains("pgyer") || url.contains("weixin://wap/pay") || url.contains(
"alipays://platformapi/startApp" "alipays://platformapi/startApp"
) )
) { ) {
val uri = Uri.parse(url) val uri = Uri.parse(url)
val intent = Intent(Intent.ACTION_VIEW, uri) val intent = Intent(Intent.ACTION_VIEW, uri)
...@@ -63,10 +63,7 @@ class WebActivity : BaseActivity(), View.OnClickListener { ...@@ -63,10 +63,7 @@ class WebActivity : BaseActivity(), View.OnClickListener {
return super.shouldOverrideUrlLoading(view, url) return super.shouldOverrideUrlLoading(view, url)
} }
override fun onPageFinished(view: WebView, url: String) { }
super.onPageFinished(view, url)
}
})
browser_layout.loadUrl(url) browser_layout.loadUrl(url)
} else { } else {
showToast("获取URL地址失败") showToast("获取URL地址失败")
......
...@@ -139,14 +139,14 @@ class WxLoginActivity : BaseActivity() ...@@ -139,14 +139,14 @@ class WxLoginActivity : BaseActivity()
try { try {
wxInfo = WXInfo() wxInfo = WXInfo()
wxInfo?.let { wxInfo?.let {
it.setUnionid(res["unionid"].toString() + "") it.unionid = res["unionid"].toString() + ""
it.setOpenid(res["openid"].toString() + "") it.openid = res["openid"].toString() + ""
it.setProvince(res["province"].toString() + "") it.province = res["province"].toString() + ""
it.setCity(res["city"].toString() + "") it.city = res["city"].toString() + ""
it.setCountry(res["country"].toString() + "") it.country = res["country"].toString() + ""
it.setHeadimgurl(res["headimgurl"].toString() + "") it.headimgurl = res["headimgurl"].toString() + ""
it.setNickname(res["nickname"].toString() + "") it.nickname = res["nickname"].toString() + ""
it.setSex((res["sex"].toString() + "").toInt()) it.sex = (res["sex"].toString() + "").toInt()
} }
if (!isFinishing) { if (!isFinishing) {
...@@ -170,8 +170,8 @@ class WxLoginActivity : BaseActivity() ...@@ -170,8 +170,8 @@ class WxLoginActivity : BaseActivity()
} }
override fun updateDrawState(ds: TextPaint) { override fun updateDrawState(ds: TextPaint) {
ds.setColor(resources.getColor(R.color.color_FF9837)) ds.color = resources.getColor(R.color.color_FF9837)
ds.setUnderlineText(false) ds.isUnderlineText = false
} }
}) })
.append("、") .append("、")
...@@ -184,8 +184,8 @@ class WxLoginActivity : BaseActivity() ...@@ -184,8 +184,8 @@ class WxLoginActivity : BaseActivity()
} }
override fun updateDrawState(ds: TextPaint) { override fun updateDrawState(ds: TextPaint) {
ds.setColor(resources.getColor(R.color.color_FF9837)) ds.color = resources.getColor(R.color.color_FF9837)
ds.setUnderlineText(false) ds.isUnderlineText = false
} }
}) })
.append("与您的利益切身相关。请您注册前务必仔细阅读!点击登录即表示您同意并愿意遵守好赚钱协议") .append("与您的利益切身相关。请您注册前务必仔细阅读!点击登录即表示您同意并愿意遵守好赚钱协议")
......
...@@ -5,14 +5,11 @@ import android.content.Intent ...@@ -5,14 +5,11 @@ import android.content.Intent
import android.content.pm.ApplicationInfo import android.content.pm.ApplicationInfo
import android.net.Uri import android.net.Uri
import android.os.Build import android.os.Build
import android.text.TextUtils
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.webkit.WebSettings import android.webkit.WebSettings
import android.webkit.WebViewClient import android.webkit.WebViewClient
import com.mints.goodmoney.R import com.mints.goodmoney.R
import com.mints.goodmoney.common.AppConfig
import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.manager.UserManager import com.mints.goodmoney.manager.UserManager
import com.mints.goodmoney.ui.fragment.base.LazyLoadBaseFragment import com.mints.goodmoney.ui.fragment.base.LazyLoadBaseFragment
import com.mints.goodmoney.utils.LogUtil import com.mints.goodmoney.utils.LogUtil
...@@ -20,7 +17,6 @@ import com.mints.goodmoney.utils.MD5 ...@@ -20,7 +17,6 @@ import com.mints.goodmoney.utils.MD5
import com.mints.goodmoney.utils.URIEncoder import com.mints.goodmoney.utils.URIEncoder
import kotlinx.android.synthetic.main.fragment_main_dh.* import kotlinx.android.synthetic.main.fragment_main_dh.*
/** /**
* 描述:电魂游戏 * 描述:电魂游戏
* 作者:孟崔广 * 作者:孟崔广
......
...@@ -175,9 +175,6 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, View.OnC ...@@ -175,9 +175,6 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, View.OnC
} }
2 -> { 2 -> {
friendsPresenter.getContributionLeaders() friendsPresenter.getContributionLeaders()
}
else -> {
} }
} }
} }
...@@ -223,8 +220,6 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, View.OnC ...@@ -223,8 +220,6 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, View.OnC
2 -> { 2 -> {
friendsPresenter.getContributionLeaders() friendsPresenter.getContributionLeaders()
} }
else -> {
}
} }
} }
} }
......
...@@ -21,6 +21,11 @@ import kotlinx.android.synthetic.main.fragment_horiz_channel.cdvvYilanTime ...@@ -21,6 +21,11 @@ import kotlinx.android.synthetic.main.fragment_horiz_channel.cdvvYilanTime
import kotlinx.android.synthetic.main.fragment_horiz_channel.vs_tips import kotlinx.android.synthetic.main.fragment_horiz_channel.vs_tips
import net.grandcentrix.tray.AppPreferences import net.grandcentrix.tray.AppPreferences
/**
* 描述:横版视频页面
* 作者:孟崔广
* 时间:2020/10/29 13:48
*/
class HorizChannelFragment : BaseFragment(), HorizChannelView, View.OnClickListener { class HorizChannelFragment : BaseFragment(), HorizChannelView, View.OnClickListener {
private val TAG = HorizChannelFragment::class.java.simpleName private val TAG = HorizChannelFragment::class.java.simpleName
......
...@@ -491,6 +491,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener { ...@@ -491,6 +491,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
* 设置视频权重 * 设置视频权重
*/ */
private fun initAdWeight(data: UserTaskMsgBean) { private fun initAdWeight(data: UserTaskMsgBean) {
// vedioAdingManager?.initAdWeight(data.vedioRules.csJ_VEDIO.rate, data.vedioRules.ylH_VEDIO.rate, data.vedioRules.sdhZ_VEDIO.rate, data.vedioRules.fL_VEDIO.rate)
vedioAdingManager?.initAdWeight(data.vedioRules.csJ_VEDIO.rate, data.vedioRules.ylH_VEDIO.rate, data.vedioRules.sdhZ_VEDIO.rate) vedioAdingManager?.initAdWeight(data.vedioRules.csJ_VEDIO.rate, data.vedioRules.ylH_VEDIO.rate, data.vedioRules.sdhZ_VEDIO.rate)
LogUtil.d(TAG, "首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} ylhWeight:${data.vedioRules.ylH_VEDIO.rate} sdhzWeight:${data.vedioRules.sdhZ_VEDIO.rate}") LogUtil.d(TAG, "首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} ylhWeight:${data.vedioRules.ylH_VEDIO.rate} sdhzWeight:${data.vedioRules.sdhZ_VEDIO.rate}")
// 广告视频数 // 广告视频数
......
...@@ -16,7 +16,6 @@ import com.mints.goodmoney.ad.banner.BannerManager ...@@ -16,7 +16,6 @@ import com.mints.goodmoney.ad.banner.BannerManager
import com.mints.goodmoney.ad.video.VedioAdingManager import com.mints.goodmoney.ad.video.VedioAdingManager
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.common.DeviceInfo
import com.mints.goodmoney.manager.* import com.mints.goodmoney.manager.*
import com.mints.goodmoney.mvp.model.* import com.mints.goodmoney.mvp.model.*
import com.mints.goodmoney.mvp.presenters.MyPresenter import com.mints.goodmoney.mvp.presenters.MyPresenter
...@@ -714,31 +713,31 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi ...@@ -714,31 +713,31 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
} }
} }
/** // /**
* 跳转QQ弹框 // * 跳转QQ弹框
*/ // */
private fun jumpQQ() { // private fun jumpQQ() {
cdaa = CustomDialogAsApple(context, object : DialogListener() { // cdaa = CustomDialogAsApple(context, object : DialogListener() {
override fun onClick(v: View) { // override fun onClick(v: View) {
if (cdaa != null && cdaa!!.isShowing) { // if (cdaa != null && cdaa!!.isShowing) {
cdaa!!.dismiss() // cdaa!!.dismiss()
} // }
when (v.id) { // when (v.id) {
R.id.dialog_btn_left -> { // R.id.dialog_btn_left -> {
//
} // }
R.id.dialog_btn_right -> { // R.id.dialog_btn_right -> {
QQJumpUtil.jumpQQ(requireActivity()) // QQJumpUtil.jumpQQ(requireActivity())
} // }
} // }
} // }
}) // })
cdaa!!.setTitle("提示") // cdaa!!.setTitle("提示")
cdaa!!.setContent("好赚钱想要打开QQ") // cdaa!!.setContent("好赚钱想要打开QQ")
cdaa!!.setLeft("取消") // cdaa!!.setLeft("取消")
cdaa!!.setRight("打开") // cdaa!!.setRight("打开")
cdaa!!.show() // cdaa!!.show()
} // }
/** /**
* 跳转QQ群弹框 * 跳转QQ群弹框
...@@ -873,12 +872,13 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi ...@@ -873,12 +872,13 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
* 设置视频权重 * 设置视频权重
*/ */
private fun initAdWeight(data: UserTaskMsgBean) { private fun initAdWeight(data: UserTaskMsgBean) {
vedioAdingManager?.initAdWeight(data.vedioRules.csJ_VEDIO.rate, data.vedioRules.ylH_VEDIO.rate, data.vedioRules.sdhZ_VEDIO.rate) vedioAdingManager.initAdWeight(data.vedioRules.csJ_VEDIO.rate, data.vedioRules.ylH_VEDIO.rate, data.vedioRules.sdhZ_VEDIO.rate)
LogUtil.d(TAG, "首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} ylhWeight:${data.vedioRules.ylH_VEDIO.rate} sdhzWeight:${data.vedioRules.sdhZ_VEDIO.rate}") // vedioAdingManager.initAdWeight(data.vedioRules.csJ_VEDIO.rate, data.vedioRules.ylH_VEDIO.rate, data.vedioRules.sdhZ_VEDIO.rate, data.vedioRules.fL_VEDIO.rate)
LogUtil.d(TAG, "首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} ylhWeight:${data.vedioRules.ylH_VEDIO.rate} sdhzWeight:${data.vedioRules.sdhZ_VEDIO.rate} flWeight:${data.vedioRules.fL_VEDIO.rate}")
// 广告视频数 // 广告视频数
AppConfig.csjVedioAdCount = data.vedioRules.csJ_VEDIO.surplus AppConfig.csjVedioAdCount = data.vedioRules.csJ_VEDIO.surplus
AppConfig.ylhAdCount = data.vedioRules.ylH_VEDIO.surplus AppConfig.ylhAdCount = data.vedioRules.ylH_VEDIO.surplus
AppConfig.wnVedioAdCount = data.vedioRules.sdhZ_VEDIO.surplus AppConfig.wnVedioAdCount = data.vedioRules.sdhZ_VEDIO.surplus
LogUtil.d(TAG, "首页视频数:csjCount:${AppConfig.csjVedioAdCount} ylhCount:${AppConfig.ylhAdCount} sdhzCount:${AppConfig.wnVedioAdCount}") LogUtil.d(TAG, "首页视频数:csjCount:${AppConfig.csjVedioAdCount} ylhCount:${AppConfig.ylhAdCount} sdhzCount:${AppConfig.wnVedioAdCount} flCount:${AppConfig.flVedioAdCount}")
} }
} }
\ No newline at end of file
...@@ -3,7 +3,6 @@ package com.mints.goodmoney.ui.fragment ...@@ -3,7 +3,6 @@ package com.mints.goodmoney.ui.fragment
import android.os.Bundle import android.os.Bundle
import android.text.TextUtils import android.text.TextUtils
import android.view.MotionEvent import android.view.MotionEvent
import android.view.View
import android.webkit.WebChromeClient import android.webkit.WebChromeClient
import com.github.lzyzsd.jsbridge.CallBackFunction import com.github.lzyzsd.jsbridge.CallBackFunction
import com.github.lzyzsd.jsbridge.DefaultHandler import com.github.lzyzsd.jsbridge.DefaultHandler
...@@ -49,7 +48,7 @@ class PanFragment : BaseFragment(), PanView { ...@@ -49,7 +48,7 @@ class PanFragment : BaseFragment(), PanView {
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
if (AppConfig.fragmentClickFlag === Constant.FRAGMENT_CLICK_PAN) { if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_PAN) {
if (TextUtils.isEmpty(userManager?.userID)) { if (TextUtils.isEmpty(userManager?.userID)) {
// 游客登录 // 游客登录
panPresenter.userLogin() panPresenter.userLogin()
...@@ -73,26 +72,20 @@ class PanFragment : BaseFragment(), PanView { ...@@ -73,26 +72,20 @@ class PanFragment : BaseFragment(), PanView {
*/ */
private fun loadTurnUrl() { private fun loadTurnUrl() {
getTurnUrl() getTurnUrl()
blTurntableWebview.setOnTouchListener(object : View.OnTouchListener { blTurntableWebview.setOnTouchListener { _, event -> event.action == MotionEvent.ACTION_MOVE }
override fun onTouch(v: View?, event: MotionEvent): Boolean {
return event.action == MotionEvent.ACTION_MOVE
}
})
blTurntableWebview.setDefaultHandler(DefaultHandler()) blTurntableWebview.setDefaultHandler(DefaultHandler())
blTurntableWebview.webChromeClient = WebChromeClient() blTurntableWebview.webChromeClient = WebChromeClient()
blTurntableWebview.setOnLongClickListener { true } blTurntableWebview.setOnLongClickListener { true }
//注册监听方法当js中调用callHandler方法时会调用此方法(handlerName必须和js中相同) //注册监听方法当js中调用callHandler方法时会调用此方法(handlerName必须和js中相同)
blTurntableWebview.registerHandler("getTurnResult") { data, function -> blTurntableWebview.registerHandler("getTurnResult") { data, _ ->
val turntableBean: TurntableBean = JsonUtil.parseJson(data, TurntableBean::class.java) val turntableBean: TurntableBean = JsonUtil.parseJson(data, TurntableBean::class.java)
if (turntableBean != null) { val bundle = Bundle()
val bundle = Bundle() bundle.putInt(Constant.MAIN_CUR_COIN, turntableBean.coin)
bundle.putInt(Constant.MAIN_CUR_COIN, turntableBean.coin) bundle.putString(Constant.MAIN_CARRIER_TYPE, carrierType)
bundle.putString(Constant.MAIN_CARRIER_TYPE, carrierType) bundle.putString(Constant.MAIN_EXTRA_ID, turntableBean.key)
bundle.putString(Constant.MAIN_EXTRA_ID, turntableBean.key) readyGo(AwardActivity::class.java, bundle)
readyGo(AwardActivity::class.java, bundle)
androidCallJsReferse() androidCallJsReferse()
}
} }
blTurntableWebview.setDefaultHandler(object : DefaultHandler() { blTurntableWebview.setDefaultHandler(object : DefaultHandler() {
override fun handler(data: String, function: CallBackFunction) { override fun handler(data: String, function: CallBackFunction) {
......
...@@ -92,7 +92,7 @@ class ZhangyueFragment : LazyLoadBaseFragment(), BookView, IreaderApi.OnReadChan ...@@ -92,7 +92,7 @@ class ZhangyueFragment : LazyLoadBaseFragment(), BookView, IreaderApi.OnReadChan
} else { } else {
tvZhangContent.text = SpanUtils() tvZhangContent.text = SpanUtils()
.append("阅读").append("${sumTime / 60}").setForegroundColor(mContext.resources.getColor(R.color.color_FF9837)).append("分钟, ") .append("阅读").append("${sumTime / 60}").setForegroundColor(mContext.resources.getColor(R.color.color_FF9837)).append("分钟, ")
.append("奖励").append("${sumCoin}").setForegroundColor(mContext.resources.getColor(R.color.color_cb4a39)).append("金币, ") .append("奖励").append("$sumCoin").setForegroundColor(mContext.resources.getColor(R.color.color_cb4a39)).append("金币, ")
.append("已读").append("${readTime / 60}").setForegroundColor(mContext.resources.getColor(R.color.color_FF9837)).append("分钟") .append("已读").append("${readTime / 60}").setForegroundColor(mContext.resources.getColor(R.color.color_FF9837)).append("分钟")
.create() .create()
} }
......
...@@ -784,8 +784,8 @@ public class BubbleSeekBar extends View { ...@@ -784,8 +784,8 @@ public class BubbleSeekBar extends View {
mProgress = (mThumbCenterX - mLeft) * mDelta / mTrackLength + mMin; mProgress = (mThumbCenterX - mLeft) * mDelta / mTrackLength + mMin;
mBubbleCenterRawX = mBubbleCenterRawSolidX + mThumbCenterX - mLeft; mBubbleCenterRawX = mBubbleCenterRawSolidX + mThumbCenterX - mLeft;
mLayoutParams.x = (int) (mBubbleCenterRawX + 0.5f);
if (mBubbleView.getParent() != null && mWindowManager != null) { if (mBubbleView.getParent() != null && mWindowManager != null) {
mLayoutParams.x = (int) (mBubbleCenterRawX + 0.5f);
mWindowManager.updateViewLayout(mBubbleView, mLayoutParams); mWindowManager.updateViewLayout(mBubbleView, mLayoutParams);
} }
mBubbleView.setProgressText(isShowProgressInFloat ? mBubbleView.setProgressText(isShowProgressInFloat ?
......
...@@ -24,7 +24,7 @@ object SystemUtils { ...@@ -24,7 +24,7 @@ object SystemUtils {
am.runningAppProcesses am.runningAppProcesses
?: return null ?: return null
for (procInfo in runningApps) { for (procInfo in runningApps) {
if (procInfo.pid === pid) { if (procInfo.pid == pid) {
return procInfo.processName return procInfo.processName
} }
} }
......
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/color_F8F8F8"
android:orientation="vertical"> android:orientation="vertical">
<RelativeLayout <RelativeLayout
...@@ -294,8 +293,7 @@ ...@@ -294,8 +293,7 @@
android:orientation="vertical" android:orientation="vertical"
app:layout_constraintEnd_toStartOf="@id/ll2" app:layout_constraintEnd_toStartOf="@id/ll2"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/line" app:layout_constraintTop_toBottomOf="@id/line">
tools:layout_editor_absoluteY="9dp">
<TextView <TextView
android:id="@+id/friends_sum" android:id="@+id/friends_sum"
...@@ -322,8 +320,7 @@ ...@@ -322,8 +320,7 @@
android:orientation="vertical" android:orientation="vertical"
app:layout_constraintEnd_toStartOf="@id/ll3" app:layout_constraintEnd_toStartOf="@id/ll3"
app:layout_constraintStart_toEndOf="@id/ll1" app:layout_constraintStart_toEndOf="@id/ll1"
app:layout_constraintTop_toBottomOf="@id/line" app:layout_constraintTop_toBottomOf="@id/line">
tools:layout_editor_absoluteY="9dp">
<TextView <TextView
android:id="@+id/friends_directly_sum" android:id="@+id/friends_directly_sum"
...@@ -353,8 +350,7 @@ ...@@ -353,8 +350,7 @@
android:orientation="vertical" android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/ll2" app:layout_constraintStart_toEndOf="@id/ll2"
app:layout_constraintTop_toBottomOf="@id/line" app:layout_constraintTop_toBottomOf="@id/line">
tools:layout_editor_absoluteY="9dp">
<TextView <TextView
android:id="@+id/friends_indirect_sum" android:id="@+id/friends_indirect_sum"
......
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