Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_goodmoney
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_goodmoney
Commits
46e96719
Commit
46e96719
authored
Nov 13, 2020
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码合并
parent
3c4cd3a4
Changes
43
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
43 changed files
with
411 additions
and
1269 deletions
+411
-1269
build.gradle
GoodMoney/app/build.gradle
+16
-12
bxmsdk-release-3.0.0-csj3300.aar
GoodMoney/app/libs/bxmsdk-release-3.0.0-csj3300.aar
+0
-0
AndroidManifest.xml
GoodMoney/app/src/main/AndroidManifest.xml
+12
-0
InitAppService.kt
...y/app/src/main/java/com/mints/goodmoney/InitAppService.kt
+3
-2
MintsApplication.java
...p/src/main/java/com/mints/goodmoney/MintsApplication.java
+7
-65
CsjFullVedioAdManager.java
...in/java/com/mints/goodmoney/ad/CsjFullVedioAdManager.java
+0
-374
BannerAdmanager.kt
...ain/java/com/mints/goodmoney/ad/banner/BannerAdmanager.kt
+0
-51
InsertScreenAdManager.java
...om/mints/goodmoney/ad/inscreen/InsertScreenAdManager.java
+0
-428
MintegralInscreenVedioAdManager.java
...ney/ad/inscreenvedio/MintegralInscreenVedioAdManager.java
+0
-185
CsjVedioAdManager.java
.../java/com/mints/goodmoney/ad/video/CsjVedioAdManager.java
+2
-2
VedioAdingManager.java
.../java/com/mints/goodmoney/ad/video/VedioAdingManager.java
+2
-9
YlhVedioAdManager.java
.../java/com/mints/goodmoney/ad/video/YlhVedioAdManager.java
+7
-3
Constant.kt
.../app/src/main/java/com/mints/goodmoney/common/Constant.kt
+6
-1
BxmManager.kt
...p/src/main/java/com/mints/goodmoney/manager/BxmManager.kt
+3
-0
LiebaoManager.java
.../main/java/com/mints/goodmoney/manager/LiebaoManager.java
+4
-4
MiitHelper.java
...src/main/java/com/mints/goodmoney/manager/MiitHelper.java
+1
-1
TrackManager.java
...c/main/java/com/mints/goodmoney/manager/TrackManager.java
+1
-0
TtCsjAdManager.java
...main/java/com/mints/goodmoney/manager/TtCsjAdManager.java
+1
-2
YlhAdManager.kt
...src/main/java/com/mints/goodmoney/manager/YlhAdManager.kt
+2
-2
DrawcashBean.java
...main/java/com/mints/goodmoney/mvp/model/DrawcashBean.java
+18
-0
MyPresenter.kt
...in/java/com/mints/goodmoney/mvp/presenters/MyPresenter.kt
+24
-0
MyView.kt
...app/src/main/java/com/mints/goodmoney/mvp/views/MyView.kt
+3
-0
AwardActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
+15
-17
DrawcashActivity.kt
...java/com/mints/goodmoney/ui/activitys/DrawcashActivity.kt
+5
-4
EraseActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/EraseActivity.kt
+11
-11
GuideActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/GuideActivity.kt
+9
-1
LoginActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/LoginActivity.kt
+24
-1
MainActivity.kt
...ain/java/com/mints/goodmoney/ui/activitys/MainActivity.kt
+1
-1
SplashYlhActivity.kt
...ava/com/mints/goodmoney/ui/activitys/SplashYlhActivity.kt
+10
-3
WalkActivity.kt
...ain/java/com/mints/goodmoney/ui/activitys/WalkActivity.kt
+2
-1
WaterActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/WaterActivity.kt
+2
-1
BaseActivity.java
...a/com/mints/goodmoney/ui/activitys/base/BaseActivity.java
+31
-31
DhGameFragment.kt
...in/java/com/mints/goodmoney/ui/fragment/DhGameFragment.kt
+36
-0
MainFragment.kt
...main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
+7
-13
MoneyFragment.kt
...ain/java/com/mints/goodmoney/ui/fragment/MoneyFragment.kt
+41
-9
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+38
-3
CustomRefreshLayout.java
...nts/goodmoney/ui/widgets/refresh/CustomRefreshLayout.java
+1
-1
ForegroundOrBackground.java
...ava/com/mints/goodmoney/utils/ForegroundOrBackground.java
+25
-8
BaseAppCompatActivity.java
...in/java/com/mints/library/base/BaseAppCompatActivity.java
+3
-2
activity_liebao_game.xml
GoodMoney/app/src/main/res/layout/activity_liebao_game.xml
+15
-15
fragment_main_dh.xml
GoodMoney/app/src/main/res/layout/fragment_main_dh.xml
+15
-0
fragment_main_money.xml
GoodMoney/app/src/main/res/layout/fragment_main_money.xml
+0
-1
fragment_main_zy.xml
GoodMoney/app/src/main/res/layout/fragment_main_zy.xml
+8
-5
No files found.
GoodMoney/app/build.gradle
View file @
46e96719
...
...
@@ -9,8 +9,8 @@ android {
applicationId
"com.mints.goodmoney"
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
versionCode
1
versionName
"1.0.
0
"
versionCode
2
versionName
"1.0.
1
"
flavorDimensions
"default"
// dex突破65535的限制
...
...
@@ -68,6 +68,8 @@ android {
manifestPlaceholders
=
[
TD_SCHEMA_KEY:
DEBUG_TD_SCHEMA_KEY
,
TD_KEY
:
DEBUG_TD_KEY
]
// buildConfigField "String", "MainIp", RELEASE_URL
//混淆
minifyEnabled
false
zipAlignEnabled
false
...
...
@@ -105,7 +107,8 @@ android {
}
productFlavors
{
goodmoneypkg
{}
// goodmoneypkg {}
share_goodmoney
{}
}
productFlavors
.
all
{
...
...
@@ -131,10 +134,11 @@ android {
dependencies
{
implementation
fileTree
(
include:
[
'*.jar'
],
dir:
'libs'
)
implementation
'androidx.appcompat:appcompat:1.2.0'
implementation
'androidx.constraintlayout:constraintlayout:2.0.4'
implementation
'androidx.recyclerview:recyclerview:1.1.0'
implementation
'com.google.android.material:material:1.2.1'
// implementation 'androidx.appcompat:appcompat:1.2.0'
implementation
'androidx.appcompat:appcompat:1.0.0'
implementation
'androidx.constraintlayout:constraintlayout:1.1.3'
implementation
'androidx.recyclerview:recyclerview:1.0.0'
implementation
'com.google.android.material:material:1.0.0'
// 网络请求
implementation
'com.squareup.retrofit2:retrofit:2.7.1'
implementation
'com.squareup.retrofit2:adapter-rxjava:2.1.0'
...
...
@@ -152,6 +156,7 @@ dependencies {
implementation
'com.tbruyelle.rxpermissions:rxpermissions:0.9.3@aar'
// 图片加载
implementation
'com.github.bumptech.glide:glide:4.11.0'
implementation
'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
annotationProcessor
'com.github.bumptech.glide:compiler:4.11.0'
// 65536
implementation
'androidx.multidex:multidex:2.0.1'
...
...
@@ -223,12 +228,11 @@ dependencies {
// 掌阅书城
implementation
(
name:
'iReader-release-1.0.1'
,
ext:
'aar'
)
implementation
'com.alibaba:fastjson:1.2.11'
implementation
'androidx.annotation:annotation:1.
1
.0'
implementation
'androidx.core:core:1.
3.2
'
implementation
'androidx.fragment:fragment:1.
2.5
'
implementation
'androidx.annotation:annotation:1.
0
.0'
implementation
'androidx.core:core:1.
0.0
'
implementation
'androidx.fragment:fragment:1.
0.0
'
// 变现猫
implementation
(
name:
'bxmsdk-release-3.0.0'
,
ext:
'aar'
)
implementation
'com.android.support:support-v4:28.0.0'
implementation
(
name:
'bxmsdk-release-3.0.0-csj3300'
,
ext:
'aar'
)
testImplementation
'junit:junit:4.13'
...
...
GoodMoney/app/libs/bxmsdk-release-3.0.0.aar
→
GoodMoney/app/libs/bxmsdk-release-3.0.0
-csj3300
.aar
100755 → 100644
View file @
46e96719
No preview for this file type
GoodMoney/app/src/main/AndroidManifest.xml
View file @
46e96719
...
...
@@ -87,6 +87,18 @@
android:name=
"JPUSH_CHANNEL"
android:value=
"${JPUSH_CHANNEL}"
/>
<!-- <activity-->
<!-- android:configChanges="keyboard|orientation|screenSize"-->
<!-- android:windowSoftInputMode="adjustPan|stateHidden"-->
<!-- android:theme="@style/Theme.ActivitySplash"-->
<!-- android:name=".ui.activitys.SplashYlhActivity"-->
<!-- android:screenOrientation="portrait">-->
<!-- <intent-filter>-->
<!-- <action android:name="android.intent.action.MAIN" />-->
<!-- <category android:name="android.intent.category.LAUNCHER" />-->
<!-- </intent-filter>-->
<!-- </activity>-->
<activity
android:name=
".ui.activitys.SplashYlhActivity"
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/InitAppService.kt
View file @
46e96719
...
...
@@ -8,7 +8,7 @@ import cn.jpush.android.api.BasicPushNotificationBuilder
import
cn.jpush.android.api.JPushInterface
import
com.mints.goodmoney.manager.BxmManager.initBxm
import
com.mints.goodmoney.manager.ShumeiManager
import
com.mints.goodmoney.manager.ZhangyueManager
.onCreateIreader
import
com.mints.goodmoney.manager.ZhangyueManager
import
com.mints.library.utils.CommonUtils
import
com.mob.MobSDK
import
com.orhanobut.logger.AndroidLogAdapter
...
...
@@ -79,7 +79,8 @@ class InitAppService : IntentService("InitializeService") {
initJpush
()
// 掌阅书城
onCreateIreader
(
this
.
application
)
ZhangyueManager
.
attachBaseContextIreader
(
this
.
application
)
ZhangyueManager
.
onCreateIreader
(
this
.
application
)
// 变现猫
initBxm
(
this
.
application
)
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/MintsApplication.java
View file @
46e96719
...
...
@@ -4,7 +4,6 @@ import android.content.Context;
import
android.content.Intent
;
import
android.os.Build
;
import
android.text.TextUtils
;
import
android.webkit.WebView
;
import
androidx.localbroadcastmanager.content.LocalBroadcastManager
;
import
androidx.multidex.MultiDex
;
...
...
@@ -15,17 +14,13 @@ import com.component.dly.xzzq_ywsdk.YwSDK;
import
com.mints.goodmoney.common.Constant
;
import
com.mints.goodmoney.manager.LiebaoManager
;
import
com.mints.goodmoney.manager.MiitHelper
;
import
com.mints.goodmoney.manager.OaidManager
;
import
com.mints.goodmoney.manager.TtCsjAdManager
;
import
com.mints.goodmoney.manager.UserManager
;
import
com.mints.goodmoney.manager.YlhAdManager
;
import
com.mints.goodmoney.manager.ZhangyueManager
;
import
com.mints.goodmoney.net.LoanService
;
import
com.mints.goodmoney.utils.ForegroundOrBackground
;
import
com.mints.goodmoney.utils.LogUtil
;
import
com.mints.goodmoney.utils.SystemUtils
;
import
com.mints.goodmoney.utils.rxutil.CommonRxTask
;
import
com.mints.goodmoney.utils.rxutil.RxjavaUtil
;
import
com.yilan.sdk.ui.YLUIInit
;
import
com.yilan.sdk.ui.configs.CommentConfig
;
import
com.yilan.sdk.ui.configs.FeedConfig
;
...
...
@@ -80,8 +75,6 @@ public class MintsApplication extends MultiDexApplication {
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
ZhangyueManager
.
INSTANCE
.
attachBaseContextIreader
(
this
);
}
/**
...
...
@@ -92,12 +85,12 @@ public class MintsApplication extends MultiDexApplication {
initMiitHelper
();
//Android 9 or above must be set
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
P
)
{
String
processName
=
getProcessName
();
if
(!
getPackageName
().
equals
(
processName
))
{
WebView
.
setDataDirectorySuffix
(
processName
);
}
}
//
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
//
String processName = getProcessName();
//
if (!getPackageName().equals(processName)) {
//
WebView.setDataDirectorySuffix(processName);
//
}
//
}
// 子线程初始化三方SDK
String
processName
=
SystemUtils
.
INSTANCE
.
getProcessName
(
this
,
android
.
os
.
Process
.
myPid
());
...
...
@@ -118,17 +111,8 @@ public class MintsApplication extends MultiDexApplication {
// 一览视频
initYL
();
// 鱼丸盒子
initYwhz
();
// 猎豹游戏初始化
LiebaoManager
.
getInstance
().
initCmGameSdk
();
// // 掌阅书城
// ZhangyueManager.INSTANCE.onCreateIreader(this);
//
// // 变现猫
// BxmManager.INSTANCE.initBxm(this);
}
private
MiitHelper
.
AppIdsUpdater
appIdsUpdater
=
ids
->
OAID
=
ids
;
...
...
@@ -139,19 +123,7 @@ public class MintsApplication extends MultiDexApplication {
private
void
initMiitHelper
()
{
try
{
MiitHelper
miitHelper
=
new
MiitHelper
(
appIdsUpdater
);
miitHelper
.
getDeviceIds
(
getApplicationContext
());
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
LogUtil
.
e
(
e
);
}
}
/**
* 移动安装联盟 获取OAID等设备标识符
*/
private
void
initOaid
()
{
try
{
new
OaidManager
(
ids
->
OAID
=
ids
).
InitSdk
(
this
);
miitHelper
.
initDeviceIds
(
getApplicationContext
());
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
LogUtil
.
e
(
e
);
...
...
@@ -198,36 +170,6 @@ public class MintsApplication extends MultiDexApplication {
FeedConfig
.
getInstance
().
setPlayerStyle
(
FeedConfig
.
STYLE_NATIVE
);
//FeedConfig.STYLE_STYLE_FEED_PLAY当前页面播放
}
/**
* 鱼丸盒子
*/
private
void
initYwhz
()
{
if
(
UserManager
.
getInstance
().
userIsLogin
())
{
if
(
Build
.
VERSION
.
SDK_INT
>
28
)
{
// android10 延迟加载 因为获取不到oaid
RxjavaUtil
.
executeRxTask
(
new
CommonRxTask
<
String
>(
""
)
{
@Override
public
void
doInIOThread
()
{
try
{
Thread
.
sleep
(
1500
);
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
}
@Override
public
void
doInUIThread
()
{
initYwSdk
();
}
});
}
else
{
initYwSdk
();
}
}
}
/**
* 鱼丸盒子
*/
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/CsjFullVedioAdManager.java
deleted
100644 → 0
View file @
3c4cd3a4
This diff is collapsed.
Click to expand it.
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/banner/BannerAdmanager.kt
deleted
100644 → 0
View file @
3c4cd3a4
//package com.mints.highgold.ad.banner
//
//import android.app.Activity
//import android.view.View
//import com.lechuan.midunovel.view.FoxStreamerView
//import com.mints.highgold.common.AppConfig
//import com.mints.highgold.manager.TaAdManager
//import com.mints.highgold.manager.UserManager
//
//class BannerAdmanager {
// var activity: Activity? = null
// var fsvAward: FoxStreamerView? = null
//
// constructor(activity: Activity?) {
// this.activity = activity
// }
//
// /**
// * 展示banner
// *
// * @param carrierType
// * @param view 要展示的banner
// */
// fun showBannerAd(carrierType: String, view: View?) {
// if (UserManager.getInstance().adShowFlag) initBannerAd(carrierType, view)
// }
//
// /**
// * banner广告显示类型 0-推啊
// *
// * @param carrierType
// * @param view
// */
// private fun initBannerAd(carrierType: String, view: View?) {
//// if (AppConfig.bannerAdType == 0) loadTaBannerAd(carrierType, view)
// loadTaBannerAd(carrierType, view)
// }
//
// private fun loadTaBannerAd(carrierType: String, view: View?) {
// if (view != null) {
// if (view is FoxStreamerView) {
// fsvAward = view
// fsvAward?.loadAd(TaAdManager.TA_AD_AWARD_BANNER, UserManager.getInstance().userID)
// }
// }
// }
//
// fun ondestory() {
// fsvAward?.destroy()
// }
//}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/inscreen/InsertScreenAdManager.java
deleted
100644 → 0
View file @
3c4cd3a4
This diff is collapsed.
Click to expand it.
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/inscreenvedio/MintegralInscreenVedioAdManager.java
deleted
100644 → 0
View file @
3c4cd3a4
//package com.mints.goodmoney.ad.inscreenvedio;
//
//import android.app.Activity;
//import android.content.IntentFilter;
//import android.net.ConnectivityManager;
//
//import com.bytedance.sdk.openadsdk.AdSlot;
//import com.bytedance.sdk.openadsdk.TTAdConstant;
//import com.bytedance.sdk.openadsdk.TTAdNative;
//import com.bytedance.sdk.openadsdk.TTFullScreenVideoAd;
//import com.mintegral.msdk.interstitialvideo.out.InterstitialVideoListener;
//import com.mintegral.msdk.interstitialvideo.out.MTGInterstitialVideoHandler;
//import com.mintegral.msdk.videocommon.download.NetStateOnReceive;
//import com.mints.highgold.MintsApplication;
//import com.mints.highgold.common.AppConfig;
//import com.mints.highgold.manager.MintegralManager;
//import com.mints.highgold.manager.TTAdManagerHolder;
//import com.mints.highgold.manager.TTNativeExpressManager;
//import com.mints.highgold.utils.LogUtil;
//
///**
// * Mintegral插屏视频
// */
//public class MintegralInscreenVedioAdManager {
//
// private static final String TAG = MintegralInscreenVedioAdManager.class.getSimpleName();
//
// private static MintegralInscreenVedioAdManager _inst;
// private Activity activity;
//
// private MTGInterstitialVideoHandler mMtgInterstitalVideoHandler;
// private NetStateOnReceive mNetStateOnReceive;
// private String mRewardUnitId = MintegralManager.MINTEGRAL_AD_INSCREEN_VEDIO_POP_DRINK;
//
// private TTAdNative ttAdNative;
// private TTFullScreenVideoAd mttFullVideoAd;
//
// public static MintegralInscreenVedioAdManager getInstance(Activity activity) {
// if (_inst != null) {
// return _inst;
// } else {
// _inst = new MintegralInscreenVedioAdManager(activity);
// return _inst;
// }
// }
//
// private MintegralInscreenVedioAdManager(Activity activity) {
// init(activity);
// return;
// }
//
// private void init(Activity activity) {
// this.activity = activity;
//
// initHandler();
// }
//
// public void loadMintegralInscreen() {
// if (mMtgInterstitalVideoHandler != null) {
// mMtgInterstitalVideoHandler.load();
// }
// }
//
// public void showMintegralInscreen() {
// if (mMtgInterstitalVideoHandler != null && mMtgInterstitalVideoHandler.isReady()) {
// mMtgInterstitalVideoHandler.show();
// } else {
// AppConfig.isMintegralInscreenFlag = false;
// loadCsjFullAd();
// LogUtil.d(TAG, "MintegralInscreenVedioAdManager onVideoLoadFail noReady:");
// }
// }
//
// private void initHandler() {
// if (activity == null) return;
//
// try {
// if (mNetStateOnReceive == null) {
// mNetStateOnReceive = new NetStateOnReceive();
// IntentFilter filter = new IntentFilter();
// filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
// activity.registerReceiver(mNetStateOnReceive, filter);
// }
//
// mMtgInterstitalVideoHandler = new MTGInterstitialVideoHandler(activity, mRewardUnitId);
// mMtgInterstitalVideoHandler.setInterstitialVideoListener(new InterstitialVideoListener() {
// @Override
// public void onLoadSuccess(String unitId) {
// LogUtil.d(TAG, "MintegralInscreenVedioAdManager onLoadSuccess");
// AppConfig.isMintegralInscreenFlag = true;
//
// }
//
// @Override
// public void onVideoLoadSuccess(String unitId) {
// AppConfig.isMintegralInscreenFlag = true;
// LogUtil.d(TAG, "MintegralInscreenVedioAdManager onVideoLoadSuccess");
// }
//
// @Override
// public void onVideoLoadFail(String errorMsg) {
// AppConfig.isMintegralInscreenFlag = false;
// LogUtil.d(TAG, "MintegralInscreenVedioAdManager onVideoLoadFail errorMsg:" + errorMsg);
// }
//
// @Override
// public void onShowFail(String errorMsg) {
// AppConfig.isMintegralInscreenFlag = false;
// LogUtil.d(TAG, "MintegralInscreenVedioAdManager onShowFail errorMsg:" + errorMsg);
// }
//
// @Override
// public void onAdShow() {
// }
//
// @Override
// public void onAdClose(boolean isCompleteView) {
// AppConfig.isMintegralInscreenFlag = false;
// }
//
// @Override
// public void onVideoAdClicked(String unitId) {
// }
//
// @Override
// public void onVideoComplete(String unitId) {
// }
//
// @Override
// public void onEndcardShow(String unitId) {
// }
//
// });
// } catch (Exception e) {
// e.printStackTrace();
// }
// }
//
// public void destory() {
// try {
// if (mNetStateOnReceive != null) {
// activity.unregisterReceiver(mNetStateOnReceive);
// }
// if (mMtgInterstitalVideoHandler != null) {
// mMtgInterstitalVideoHandler.setInterstitialVideoListener(null);
// }
// } catch (Exception e) {
// e.printStackTrace();
// }
// }
//
// /**
// * 全屏广告
// */
// @SuppressWarnings("SameParameterValue")
// private void loadCsjFullAd() {
// ttAdNative = new TTNativeExpressManager().initTTAd(activity, false);
// String codeId = TTAdManagerHolder.TT_AD_ALLVEDIO_ID_DRINKTIME;
// AdSlot adSlot = new AdSlot.Builder()
// .setCodeId(codeId)
// .setSupportDeepLink(true)
// .setImageAcceptedSize(1080, 1920)
// .setOrientation(TTAdConstant.VERTICAL)
// .build();
// ttAdNative.loadFullScreenVideoAd(adSlot, new TTAdNative.FullScreenVideoAdListener() {
// @Override
// public void onError(int code, String message) {
// }
//
// @Override
// public void onFullScreenVideoAdLoad(TTFullScreenVideoAd ad) {
// mttFullVideoAd = ad;
// }
//
// @Override
// public void onFullScreenVideoCached() {
// if (activity != null && !activity.isFinishing() && mttFullVideoAd != null) {
// //step6:在获取到广告后展示
// mttFullVideoAd.showFullScreenVideoAd(activity);
// mttFullVideoAd = null;
// }
// }
// });
// }
//}
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/CsjVedioAdManager.java
→
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/
video/
CsjVedioAdManager.java
View file @
46e96719
package
com
.
mints
.
goodmoney
.
ad
;
package
com
.
mints
.
goodmoney
.
ad
.
video
;
import
android.app.Activity
;
import
android.content.DialogInterface
;
...
...
@@ -8,7 +8,6 @@ import android.view.KeyEvent;
import
com.bytedance.sdk.openadsdk.AdSlot
;
import
com.bytedance.sdk.openadsdk.TTAdConstant
;
import
com.bytedance.sdk.openadsdk.TTAdNative
;
import
com.bytedance.sdk.openadsdk.TTAppDownloadListener
;
import
com.bytedance.sdk.openadsdk.TTRewardVideoAd
;
import
com.mints.goodmoney.BuildConfig
;
import
com.mints.goodmoney.MintsApplication
;
...
...
@@ -146,6 +145,7 @@ public class CsjVedioAdManager implements VedioAdManagerView {
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_CSJ
,
Constant
.
EVENT_TYPE_ONE
,
String
.
valueOf
(
code
),
message
);
LogUtil
.
d
(
"CsjVedioAdManager"
,
"onError "
+
code
+
message
);
if
(
csjVedioAdListener
!=
null
)
{
csjVedioAdListener
.
csjVedioAdFail
();
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/VedioAdingManager.java
→
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/
video/
VedioAdingManager.java
View file @
46e96719
package
com
.
mints
.
goodmoney
.
ad
;
package
com
.
mints
.
goodmoney
.
ad
.
video
;
import
android.app.Activity
;
import
android.os.Build
;
import
android.text.TextUtils
;
import
com.mints.goodmoney.common.AppConfig
;
...
...
@@ -9,7 +8,6 @@ import com.mints.goodmoney.common.Constant;
import
com.mints.goodmoney.mvp.model.VedioAdingBean
;
import
com.mints.goodmoney.mvp.model.WeightBean
;
import
com.mints.goodmoney.utils.LogUtil
;
import
com.mints.goodmoney.utils.ToastUtil
;
import
java.util.ArrayList
;
import
java.util.Random
;
...
...
@@ -100,7 +98,7 @@ public class VedioAdingManager {
String
nextAdType
=
""
;
if
(
AppConfig
.
csjVedioAdCount
>
0
)
{
nextAdType
=
Constant
.
CSJ_VEDIO_AD
;
}
else
if
(
AppConfig
.
ylhAdCount
>
0
)
{
}
else
{
nextAdType
=
Constant
.
YLH_VEDIO_AD
;
}
return
nextAdType
;
...
...
@@ -224,11 +222,6 @@ public class VedioAdingManager {
*/
private
void
loadAdVedio
(
String
vedioAdType
,
VedioAdingBean
bean
)
{
try
{
if
(
TextUtils
.
isEmpty
(
vedioAdType
))
{
ToastUtil
.
show
(
activity
,
"今日视频已看完,请明天再来吧"
);
return
;
}
if
(
TextUtils
.
equals
(
vedioAdType
,
Constant
.
YLH_VEDIO_AD
))
{
// 优量汇
if
(
ylhVedioAdManager
==
null
)
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/YlhVedioAdManager.java
→
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/
video/
YlhVedioAdManager.java
View file @
46e96719
package
com
.
mints
.
goodmoney
.
ad
;
package
com
.
mints
.
goodmoney
.
ad
.
video
;
import
android.app.Activity
;
import
android.content.DialogInterface
;
...
...
@@ -13,6 +13,7 @@ import com.mints.goodmoney.manager.YlhAdManager;
import
com.mints.goodmoney.mvp.presenters.YlhVedioAdPresenter
;
import
com.mints.goodmoney.mvp.views.VedioAdManagerView
;
import
com.mints.goodmoney.ui.widgets.LoadingDialog
;
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.RewardVideoADListener
;
...
...
@@ -74,7 +75,7 @@ public class YlhVedioAdManager implements VedioAdManagerView {
/**
* 加载优量汇激励视频
*/
public
void
loanYlhAd
(
Activity
activity
,
int
curCoin
,
String
carrierType
,
String
extraId
)
{
public
void
loanYlhAd
(
Activity
activity
,
int
curCoin
,
String
carrierType
,
String
extraId
)
{
this
.
activity
=
activity
;
isClickScreen
=
true
;
this
.
curCoin
=
curCoin
;
...
...
@@ -108,7 +109,7 @@ public class YlhVedioAdManager implements VedioAdManagerView {
rewardVideoAD
=
null
;
}
rewardVideoAD
=
new
RewardVideoAD
(
activity
,
YlhAdManager
.
YLH_AD_APPID
,
ylhPostId
,
new
RewardVideoADListener
()
{
rewardVideoAD
=
new
RewardVideoAD
(
activity
,
YlhAdManager
.
YLH_AD_APPID
,
ylhPostId
,
new
RewardVideoADListener
()
{
@Override
public
void
onADLoad
()
{
//广告加载成功,可在此回调后进行广告展示,此时广告过期时间确定,可通过RewardVideoAD.getExpireTimestamp()获取
try
{
...
...
@@ -187,6 +188,9 @@ public class YlhVedioAdManager implements VedioAdManagerView {
@Override
public
void
onError
(
AdError
adError
)
{
//广告流程出错,AdError中包含错误码和错误描述
if
(
adError
!=
null
)
{
LogUtil
.
d
(
"YlhVedioAdManager"
,
"onError "
+
adError
.
getErrorCode
()
+
adError
.
getErrorMsg
());
// 0 成功 1失败 2点击 3-有效展示
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_YLH
,
Constant
.
EVENT_TYPE_ONE
,
String
.
valueOf
(
adError
.
getErrorCode
()),
adError
.
getErrorMsg
());
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/common/Constant.kt
View file @
46e96719
...
...
@@ -97,7 +97,7 @@ object Constant {
const
val
CARRIER_WALK_BUBBLE
=
"WALK_BUBBLE"
//走路汽泡
const
val
CARRIER_NEW_USER
=
"CARRIER_NEW_USER"
//新用户红包
const
val
CARRIER_GAME_ONLINE
=
"GAME_ONLINE"
//跳转猎豹
const
val
CARRIER_ZHANGYUE
=
"ZHANGYUE"
//
跳转猎豹
const
val
CARRIER_ZHANGYUE
=
"ZHANGYUE"
//
阅读书城
const
val
CARRIER_CHALLENGE_SHAREFRIEND_DOUBLE
=
"CHALLENGE_SHAREFRIEND_DOUBLE"
//邀请好友翻倍
const
val
SHAREFRIEND_COMPLETE_1
=
"SHAREFRIEND_COMPLETE_1"
//邀请任务1
...
...
@@ -151,4 +151,9 @@ object Constant {
var
SHARE_CONTENT
=
"邀请码【${UserManager.getInstance().codeID}】,共享新模式,快来加入跟我一起赚钱吧"
var
SHARE_URL
:
String
=
BuildConfig
.
MainIp
+
"share/shareFriend.html?ruid="
+
UserManager
.
getInstance
().
getUserID
()
+
"&channel="
+
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
)
// 首页视频时长 单位-秒
const
val
MAIN_VEDIO_TIME
=
"main_vedio_time"
// 首页视频时长 单位-秒
const
val
CHANNEL_SHARE
=
"share_goodmoney"
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/BxmManager.kt
View file @
46e96719
...
...
@@ -46,4 +46,7 @@ object BxmManager {
bdAdvanceButtonAd
?.
loadAd
()
}
fun
onDestory
()
{
bdAdvanceButtonAd
=
null
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/LiebaoManager.java
View file @
46e96719
...
...
@@ -79,7 +79,7 @@ public class LiebaoManager {
// 设置游戏的广告id
CmGameAppInfo
.
TTInfo
ttInfo
=
new
CmGameAppInfo
.
TTInfo
();
// 游戏内广告有如下6种;
//
ttInfo.setGameLoad_EXADId(TtCsjAdManager.TT_AD_INSERT_LOADING_ID_LIEBAO); // 游戏加载时,插屏广告1:1,模板渲染
ttInfo
.
setGameLoad_EXADId
(
TtCsjAdManager
.
TT_AD_INSERT_LOADING_ID_LIEBAO
);
// 游戏加载时,插屏广告1:1,模板渲染
ttInfo
.
setRewardVideoId
(
TtCsjAdManager
.
TT_AD_VEDIO_GAME
);
// 激励视频
ttInfo
.
setFullVideoId
(
TtCsjAdManager
.
TT_AD_ALLVEDIO_ID_LIEBAO
);
// 全屏视频,插屏场景下展示
// ttInfo.setExpressInteractionId(TtCsjAdManager.TT_AD_INSERT_ID_LIEBAO); // 插屏广告,插屏场景下展示,模板渲染,2:3
...
...
@@ -96,9 +96,9 @@ public class LiebaoManager {
gdtAdInfo
.
setAppId
(
YlhAdManager
.
YLH_AD_APPID
);
// 广点通的APPID
// 游戏内广告场景;
gdtAdInfo
.
setRewardVideoId
(
YlhAdManager
.
YLH_AD_VEDIO_GAME_POSTID
);
// 激励视频
//
gdtAdInfo.setGameLoadInterId(YlhAdManager.YLH_AD_INTERSTITIALAD_LIEBAO);//游戏加载中的插屏
gdtAdInfo
.
setGameLoadInterId
(
YlhAdManager
.
YLH_AD_INTERSTITIALAD_LIEBAO
);
//游戏加载中的插屏
// gdtAdInfo.setBannerId(YlhAdManager.YLH_AD_BANNER_LIEBAO); // banner广告
//
gdtAdInfo.setPlayGameInterId(YlhAdManager.YLH_AD_INTERSTITIALAD_LIEBAO);//游戏进行中关卡插屏
gdtAdInfo
.
setPlayGameInterId
(
YlhAdManager
.
YLH_AD_INTERSTITIALAD_LIEBAO
);
//游戏进行中关卡插屏
cmGameAppInfo
.
setGdtAdInfo
(
gdtAdInfo
);
//
...
...
@@ -113,7 +113,7 @@ public class LiebaoManager {
// // 戏关卡间插屏广告概率设置建议,代码默认值为20
// // 1)80%流量给穿山甲,20%给优量汇,原因:穿山甲全屏视频广告收益更高,优量汇收益低但体验 好
// // 2)概率云端控制,媒体自行下发2种广告源占比
// cmGameAppInfo.setExpressInterAdProbability(2
0);
cmGameAppInfo
.
setExpressInterAdProbability
(
6
0
);
// 功能默认开启,可使用如下方法来关闭
// cmGameAppInfo.setShowLogin(false);
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/MiitHelper.java
View file @
46e96719
...
...
@@ -25,7 +25,7 @@ public class MiitHelper implements IIdentifierListener {
}
public
void
ge
tDeviceIds
(
Context
cxt
)
{
public
void
ini
tDeviceIds
(
Context
cxt
)
{
long
timeb
=
System
.
currentTimeMillis
();
int
nres
=
CallFromReflect
(
cxt
);
// int nres=DirectCall(cxt);
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/TrackManager.java
View file @
46e96719
...
...
@@ -40,6 +40,7 @@ public class TrackManager {
*/
public
void
offline
()
{
if
(
trackPresenter
!=
null
&&
UserManager
.
getInstance
().
userIsLogin
()
&&
!
TextUtils
.
isEmpty
(
UserManager
.
getInstance
().
getTokenID
()))
{
trackPresenter
.
offline
();
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/TtCsjAdManager.java
View file @
46e96719
...
...
@@ -35,8 +35,7 @@ public class TtCsjAdManager {
public
static
final
String
TT_AD_ALLVEDIO_ID_LIEBAO
=
"945562481"
;
//猎豹全屏带跳过按钮
/*插屏广告*/
public
static
final
String
TT_AD_INSERT_ID_LIEBAO
=
""
;
//猎豹插屏场景
public
static
final
String
TT_AD_INSERT_LOADING_ID_LIEBAO
=
""
;
//猎豹游戏加载时
public
static
final
String
TT_AD_INSERT_LOADING_ID_LIEBAO
=
"945608874"
;
//猎豹游戏加载时
private
static
boolean
sInit
;
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/YlhAdManager.kt
View file @
46e96719
...
...
@@ -18,7 +18,7 @@ object YlhAdManager {
/* vedio-postid */
const
val
YLH_AD_VEDIO_DRINK_POSTID
=
"
5071107856089058
"
//喝水打卡
const
val
YLH_AD_VEDIO_DRINK_POSTID
=
"
2041542191534951
"
//喝水打卡
const
val
YLH_AD_VEDIO_MAIN_POSTID
=
"3091434802115910"
//我的界面视频
const
val
YLH_AD_VEDIO_ERASE_POSTID
=
"4061637892217932"
//挑战刮刮乐
const
val
YLH_AD_VEDIO_TURNABLE_POSTID
=
"5021539812411906"
//大转盘
...
...
@@ -27,7 +27,7 @@ object YlhAdManager {
/* 插屏 */
const
val
YLH_AD_INTERSTITIALAD_LIEBAO
=
""
//猎豹
const
val
YLH_AD_INTERSTITIALAD_LIEBAO
=
"
5031044115480084
"
//猎豹
/**
* 广告初始化
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/model/DrawcashBean.java
View file @
46e96719
...
...
@@ -7,6 +7,8 @@ public class DrawcashBean implements Serializable {
private
String
openid
;
private
String
nickName
;
private
String
drawcashRule
;
private
String
drawcashHint
;
private
int
coin
;
private
List
<
CashOutMoneyArrBean
>
cashOutMoneyArr
;
...
...
@@ -26,6 +28,22 @@ public class DrawcashBean implements Serializable {
this
.
nickName
=
nickName
;
}
public
String
getDrawcashRule
()
{
return
drawcashRule
;
}
public
void
setDrawcashRule
(
String
drawcashRule
)
{
this
.
drawcashRule
=
drawcashRule
;
}
public
String
getDrawcashHint
()
{
return
drawcashHint
;
}
public
void
setDrawcashHint
(
String
drawcashHint
)
{
this
.
drawcashHint
=
drawcashHint
;
}
public
int
getCoin
()
{
return
coin
;
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/MyPresenter.kt
View file @
46e96719
...
...
@@ -249,4 +249,28 @@ class MyPresenter : BasePresenter<MyView>() {
}
fun
getHallBaseMsg
()
{
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
getHallBaseMsg
(),
object
:
BaseSubscriber
<
BaseResponse
<
UserTaskMsgBean
>>()
{
override
fun
onCompleted
()
{
if
(
isLinkView
)
return
view
.
hideLoading
()
}
override
fun
onError
(
e
:
Throwable
)
{
if
(
isLinkView
)
return
view
.
hideLoading
()
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
UserTaskMsgBean
>)
{
if
(
isLinkView
)
return
val
code
=
baseResponse
.
getStatus
()
when
(
code
)
{
200
->
view
.
getHallBaseMsgSuc
(
baseResponse
.
getData
())
}
}
})
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/views/MyView.kt
View file @
46e96719
...
...
@@ -3,6 +3,7 @@ package com.mints.goodmoney.mvp.views
import
com.mints.goodmoney.mvp.model.BannerBean
import
com.mints.goodmoney.mvp.model.MyInfo
import
com.mints.goodmoney.mvp.model.SignCardBean
import
com.mints.goodmoney.mvp.model.UserTaskMsgBean
interface
MyView
:
BaseView
{
...
...
@@ -32,4 +33,6 @@ interface MyView : BaseView {
* 游客登录成功
*/
fun
userLoginSuc
()
fun
getHallBaseMsgSuc
(
data
:
UserTaskMsgBean
)
}
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
View file @
46e96719
...
...
@@ -4,10 +4,9 @@ import android.os.Bundle
import
android.view.KeyEvent
import
android.view.View
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.VedioAdingManager
import
com.mints.goodmoney.ad.
video.
VedioAdingManager
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.manager.TTPreLoadExpressManager
import
com.mints.goodmoney.mvp.model.UserTaskMsgBean
import
com.mints.goodmoney.mvp.model.VedioAdingBean
import
com.mints.goodmoney.mvp.presenters.AwardPresenter
import
com.mints.goodmoney.mvp.views.AwardView
...
...
@@ -67,6 +66,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
startTime
()
when
(
carrierType
)
{
Constant
.
CHALLENGE_SHAREFRIEND
,
Constant
.
SHAREFRIEND_COMPLETE_1
,
Constant
.
SHAREFRIEND_COMPLETE_2
,
Constant
.
SHAREFRIEND_COMPLETE_3
,
Constant
.
SHAREFRIEND_COMPLETE_4
,
Constant
.
SHAREFRIEND_COMPLETE_5
,
Constant
.
SHAREFRIEND_COMPLETE_6
,
...
...
@@ -78,16 +78,16 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
tvAwardContent
.
setText
(
curCoin
.
toString
()
+
"金币已到账"
)
tvAwardNext
.
setText
(
"我知道了"
)
}
Constant
.
CHALLENGE_SHAREFRIEND
->
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"carrierType"
]
=
carrierType
awardPresenter
.
reportAddCoinMsg
(
vo
)
tvAwardContent
.
setText
(
curCoin
.
toString
()
+
"金币已到账"
)
tvAwardNext
.
setText
(
"金币翻倍"
)
carrierType
=
Constant
.
CARRIER_CHALLENGE_SHAREFRIEND_DOUBLE
}
//
Constant.CHALLENGE_SHAREFRIEND -> {
//
val vo = HashMap<String, Any>()
//
vo["carrierType"] = carrierType
//
awardPresenter.reportAddCoinMsg(vo)
//
//
tvAwardContent.setText(curCoin.toString() + "金币已到账")
//
tvAwardNext.setText("金币翻倍")
//
//
carrierType = Constant.CARRIER_CHALLENGE_SHAREFRIEND_DOUBLE
//
}
Constant
.
CARRIER_NEW_USER
->
{
tvAwardContent
.
setText
(
"新人红包"
)
tvAwardNext
.
setText
(
"我知道了"
)
...
...
@@ -96,6 +96,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
}
Constant
.
CARRIER_OFFLINE_DOUBLE
->
{
tvAwardContent
.
setText
(
"离线收益奖励"
+
curCoin
+
"金币"
)
tvAwardNext
.
setText
(
"金币翻倍"
)
}
Constant
.
CARRIER_ZHANGYUE
->
{
tvAwardContent
.
setText
(
"阅读奖励"
+
curCoin
+
"金币"
)
...
...
@@ -172,9 +173,8 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
// 只有看视频才能领金币
Constant
.
CARRIER_OFFLINE_DOUBLE
,
Constant
.
CARRIER_SIGNIN_HOMEPAGE_CARD
,
Constant
.
CARRIER_CHALLENGE_TURN
,
Constant
.
CARRIER_CHALLENGE_CARD
,
Constant
.
CARRIER_WALK_BUBBLE
,
Constant
.
CARRIER_WALK
,
Constant
.
CARRIER_HOMEWATER
,
Constant
.
CARRIER_CHALLENGE_SHAREFRIEND_DOUBLE
,
Constant
.
CARRIER_HOMEVEDIO_BIG
->
{
Constant
.
CARRIER_WALK_BUBBLE
,
Constant
.
CARRIER_HOMEVEDIO_BIG
,
Constant
.
CARRIER_WALK
,
Constant
.
CARRIER_HOMEWATER
->
{
awardVedio
()
}
else
->
{
...
...
@@ -297,8 +297,6 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
/**
* 广告返回结果
*
* @param adType CHUANGSHEN_VEDIO_AD HYTECH_VEDIO_AD 自有界面
*/
private
fun
vedioAdingSuccess
(
adType
:
String
)
{
setAdFinshLayout
()
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/DrawcashActivity.kt
View file @
46e96719
...
...
@@ -58,7 +58,7 @@ class DrawcashActivity : BaseActivity(),
view_title
.
text
=
"提现规则"
drawcashPresenter
.
attachView
(
this
)
initText
()
//
initText()
initListener
()
}
...
...
@@ -135,7 +135,7 @@ class DrawcashActivity : BaseActivity(),
return
}
drawcashPresenter
.
saveTerminalInfo
(
priceList
!!
[
drawcashAdapter
?.
getPosition
()].
money
)
drawcashPresenter
.
saveTerminalInfo
(
priceList
!!
[
drawcashAdapter
?.
getPosition
()].
money
)
}
}
}
...
...
@@ -144,6 +144,8 @@ class DrawcashActivity : BaseActivity(),
override
fun
getUserTaskMsgSuc
(
data
:
DrawcashBean
)
{
userConfig
=
data
tvDrawcashExplain
.
text
=
data
.
drawcashRule
tvDrawcashHint
.
text
=
data
.
drawcashHint
tvDrawcashGold
.
text
=
"${data.getCoin()}"
if
(
TextUtils
.
isEmpty
(
data
.
openid
))
{
tvDrawcashWx
.
setText
(
"去授权"
)
...
...
@@ -202,12 +204,11 @@ class DrawcashActivity : BaseActivity(),
.
append
(
"4、提现申请将在3-5个工作日审核到账,请耐心等待。"
)
.
append
(
"\n"
)
.
append
(
"5、每日可申请提现一次,若当日限额已满,请次日申请。"
)
.
append
(
"\n"
)
.
append
(
"6、"
+
0.3
+
"元-"
+
50
+
"元,是新人专享福利,每个账号仅可享受一次。"
)
.
create
())
tvDrawcashHint
.
text
=
"* 如您或好友通过刷机等违规操作获取非法收益,平台将视情况扣除违规所得或冻结账号。"
+
"\n* 最终解释权归本公司所有。"
}
private
fun
initRvView
()
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/EraseActivity.kt
View file @
46e96719
...
...
@@ -2,7 +2,6 @@ package com.mints.goodmoney.ui.activitys
import
android.os.Bundle
import
android.view.KeyEvent
import
android.view.MotionEvent
import
android.view.View
import
android.view.View.OnLongClickListener
import
android.view.ViewGroup
...
...
@@ -18,7 +17,6 @@ import com.mints.goodmoney.mvp.model.TurntableBean
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.mints.library.utils.json.JsonUtil
import
kotlinx.android.synthetic.main.activity_erase.*
import
kotlinx.android.synthetic.main.fragment_main_pan.*
import
kotlinx.android.synthetic.main.header_layout.*
/**
...
...
@@ -87,15 +85,17 @@ class EraseActivity : BaseActivity(), View.OnClickListener{
blEarseWebview
.
setWebChromeClient
(
WebChromeClient
())
blEarseWebview
.
setOnLongClickListener
(
OnLongClickListener
{
true
})
blEarseWebview
.
registerHandler
(
"getEraseResult"
,
BridgeHandler
{
data
,
function
->
val
turntableBean
:
TurntableBean
=
JsonUtil
.
parseJson
(
data
,
TurntableBean
::
class
.
java
)
if
(
turntableBean
!=
null
)
{
val
bundle
=
Bundle
()
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
turntableBean
.
getCoin
())
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
carrierType
)
bundle
.
putString
(
Constant
.
MAIN_EXTRA_ID
,
turntableBean
.
getKey
())
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
androidCallJsReferse
()
if
(!
isFinishing
){
val
turntableBean
:
TurntableBean
=
JsonUtil
.
parseJson
(
data
,
TurntableBean
::
class
.
java
)
if
(
turntableBean
!=
null
)
{
val
bundle
=
Bundle
()
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
turntableBean
.
getCoin
())
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
carrierType
)
bundle
.
putString
(
Constant
.
MAIN_EXTRA_ID
,
turntableBean
.
getKey
())
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
androidCallJsReferse
()
}
}
})
blEarseWebview
.
setDefaultHandler
(
object
:
DefaultHandler
()
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/GuideActivity.kt
View file @
46e96719
...
...
@@ -2,14 +2,17 @@ package com.mints.goodmoney.ui.activitys
import
android.animation.AnimatorSet
import
android.animation.ObjectAnimator
import
android.text.TextUtils
import
android.view.View
import
android.widget.ImageView
import
androidx.viewpager.widget.ViewPager.OnPageChangeListener
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.R
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.manager.UserManager
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.mints.goodmoney.ui.adapter.ViewPagerAdapter
import
com.mints.library.utils.CommonUtils
import
kotlinx.android.synthetic.main.activity_guide.*
import
net.grandcentrix.tray.AppPreferences
import
java.util.*
...
...
@@ -42,7 +45,12 @@ class GuideActivity : BaseActivity() {
val
customVersion
:
Int
=
instance
.
getInt
(
Constant
.
CUSTOM_VERSION
,
0
)
instance
.
put
(
Constant
.
ISFIRSTENTER
+
customVersion
,
false
)
readyGoThenKill
(
MainActivity
::
class
.
java
)
val
channel
=
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
)
if
(
TextUtils
.
equals
(
channel
,
Constant
.
CHANNEL_SHARE
)
&&
!
UserManager
.
getInstance
().
userIsLogin
())
{
readyGo
(
LoginActivity
::
class
.
java
)
}
else
{
readyGoThenKill
(
MainActivity
::
class
.
java
)
}
}
private
fun
initView
()
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/LoginActivity.kt
View file @
46e96719
...
...
@@ -3,9 +3,11 @@ package com.mints.goodmoney.ui.activitys
import
android.Manifest
import
android.os.Bundle
import
android.text.TextUtils
import
android.view.KeyEvent
import
android.view.View
import
cn.sharesdk.framework.ShareSDK
import
cn.sharesdk.wechat.friends.Wechat
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.R
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.login.LoginApi
...
...
@@ -17,6 +19,7 @@ import com.mints.goodmoney.mvp.views.LoginView
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.mints.goodmoney.utils.BackInputUtil
import
com.mints.goodmoney.utils.LogUtil
import
com.mints.library.utils.CommonUtils
import
com.mints.library.utils.json.JsonUtil
import
com.mints.library.utils.nodoubleclick.AntiShake
import
com.tbruyelle.rxpermissions.RxPermissions
...
...
@@ -73,11 +76,26 @@ class LoginActivity : BaseActivity()
overridePendingTransition
(
0
,
R
.
anim
.
push_bottom_out
)
}
override
fun
onKeyDown
(
keyCode
:
Int
,
event
:
KeyEvent
):
Boolean
{
return
if
(
keyCode
==
KeyEvent
.
KEYCODE_BACK
)
{
val
channel
=
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
)
if
(!
TextUtils
.
equals
(
channel
,
Constant
.
CHANNEL_SHARE
))
{
finish
()
}
true
}
else
super
.
onKeyDown
(
keyCode
,
event
)
}
override
fun
onClick
(
v
:
View
?)
{
if
(
AntiShake
.
check
(
v
?.
id
))
return
when
(
v
?.
id
)
{
R
.
id
.
ivLoginBack
->
finish
()
R
.
id
.
ivLoginBack
->
{
val
channel
=
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
)
if
(!
TextUtils
.
equals
(
channel
,
Constant
.
CHANNEL_SHARE
))
{
finish
()
}
}
R
.
id
.
tvLoginSendcode
->
{
var
mobile
=
etLoginMobile
.
getText
().
toString
().
trim
()
if
(
mobile
.
length
<
13
)
{
...
...
@@ -173,6 +191,11 @@ class LoginActivity : BaseActivity()
progressDialog
.
dismiss
()
}
val
channel
=
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
)
if
(
TextUtils
.
equals
(
channel
,
Constant
.
CHANNEL_SHARE
))
{
readyGo
(
MainActivity
::
class
.
java
)
}
finish
()
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/MainActivity.kt
View file @
46e96719
...
...
@@ -9,7 +9,7 @@ import androidx.fragment.app.Fragment
import
androidx.fragment.app.FragmentTransaction
import
com.ireader.ireadersdk.IreaderApi
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.VedioAdingManager
import
com.mints.goodmoney.ad.
video.
VedioAdingManager
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.mvp.views.MainView
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/SplashYlhActivity.kt
View file @
46e96719
...
...
@@ -3,17 +3,21 @@ package com.mints.goodmoney.ui.activitys
import
android.app.Activity
import
android.os.Handler
import
android.os.Looper
import
android.text.TextUtils
import
android.util.Log
import
android.view.KeyEvent
import
android.view.View
import
android.view.ViewGroup
import
android.widget.TextView
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.R
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.common.DeviceInfo
import
com.mints.goodmoney.manager.UserManager
import
com.mints.goodmoney.manager.YlhAdManager
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.mints.goodmoney.utils.LogUtil
import
com.mints.library.utils.CommonUtils
import
com.qq.e.ads.splash.SplashAD
import
com.qq.e.ads.splash.SplashADListener
import
com.qq.e.comm.util.AdError
...
...
@@ -189,9 +193,12 @@ class SplashYlhActivity : BaseActivity(), SplashADListener {
if
(
isFirstEnter
)
{
readyGoThenKill
(
GuideActivity
::
class
.
java
)
}
else
{
readyGoThenKill
(
MainActivity
::
class
.
java
)
val
channel
=
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
)
if
(
TextUtils
.
equals
(
channel
,
Constant
.
CHANNEL_SHARE
)
&&
!
UserManager
.
getInstance
().
userIsLogin
())
{
readyGo
(
LoginActivity
::
class
.
java
)
}
else
{
readyGoThenKill
(
MainActivity
::
class
.
java
)
}
}
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/WalkActivity.kt
View file @
46e96719
...
...
@@ -30,13 +30,14 @@ class WalkActivity : BaseActivity(), View.OnClickListener, WalkView, StepView.St
override
fun
initViewsAndEvents
()
{
walkPresenter
.
attachView
(
this
)
initExpress
()
initListener
()
}
override
fun
onResume
()
{
super
.
onResume
()
initExpress
()
walkPresenter
.
getWalkMsg
()
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/WaterActivity.kt
View file @
46e96719
...
...
@@ -29,13 +29,14 @@ class WaterActivity : BaseActivity(), View.OnClickListener, WaterView.WaterViewL
override
fun
initViewsAndEvents
()
{
waterPresenter
.
attachView
(
this
)
initExpress
()
initListener
()
}
override
fun
onResume
()
{
super
.
onResume
()
initExpress
()
waterPresenter
.
getWaterMsg
()
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/base/BaseActivity.java
View file @
46e96719
...
...
@@ -71,37 +71,37 @@ public abstract class BaseActivity extends BaseAppCompatActivity implements Base
return
this
;
}
@Override
public
boolean
dispatchTouchEvent
(
MotionEvent
ev
)
{
if
(
ev
.
getAction
()
==
MotionEvent
.
ACTION_UP
)
{
View
v
=
getCurrentFocus
();
//如果不是落在EditText区域,则需要关闭输入法
if
(
HideKeyboard
(
v
,
ev
))
{
InputMethodManager
imm
=
(
InputMethodManager
)
getSystemService
(
Context
.
INPUT_METHOD_SERVICE
);
imm
.
hideSoftInputFromWindow
(
v
.
getWindowToken
(),
InputMethodManager
.
HIDE_NOT_ALWAYS
);
// FixUtils.fixInputMethodManagerLeak(this);
}
}
return
super
.
dispatchTouchEvent
(
ev
);
}
// 根据EditText所在坐标和用户点击的坐标相对比,来判断是否隐藏键盘
private
boolean
HideKeyboard
(
View
view
,
MotionEvent
event
)
{
if
(
view
instanceof
EditText
)
{
int
[]
location
=
{
0
,
0
};
view
.
getLocationInWindow
(
location
);
//获取现在拥有焦点的控件view的位置,即EditText
int
left
=
location
[
0
],
top
=
location
[
1
],
bottom
=
top
+
view
.
getHeight
(),
right
=
left
+
view
.
getWidth
();
//判断我们手指点击的区域是否落在EditText上面,如果不是,则返回true,否则返回false
boolean
isInEt
=
(
event
.
getX
()
>
left
&&
event
.
getX
()
<
right
&&
event
.
getY
()
>
top
&&
event
.
getY
()
<
bottom
);
return
!
isInEt
;
}
return
false
;
}
//
@Override
//
public boolean dispatchTouchEvent(MotionEvent ev) {
//
if (ev.getAction() == MotionEvent.ACTION_UP) {
//
View v = getCurrentFocus();
//
//
//如果不是落在EditText区域,则需要关闭输入法
//
if (HideKeyboard(v, ev)) {
//
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
//
imm.hideSoftInputFromWindow(v.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
//
//
FixUtils.fixInputMethodManagerLeak(this);
//
}
//
}
//
return super.dispatchTouchEvent(ev);
//
//
}
//
//
// 根据EditText所在坐标和用户点击的坐标相对比,来判断是否隐藏键盘
//
private boolean HideKeyboard(View view, MotionEvent event) {
//
if (view instanceof EditText) {
//
//
int[] location = {0, 0};
//
view.getLocationInWindow(location);
//
//
//获取现在拥有焦点的控件view的位置,即EditText
//
int left = location[0], top = location[1], bottom = top + view.getHeight(), right = left + view.getWidth();
//
//判断我们手指点击的区域是否落在EditText上面,如果不是,则返回true,否则返回false
//
boolean isInEt = (event.getX() > left && event.getX() < right && event.getY() > top && event.getY() < bottom);
//
return !isInEt;
//
}
//
return false;
//
}
@Override
protected
void
onDestroy
()
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/DhGameFragment.kt
0 → 100644
View file @
46e96719
package
com.mints.goodmoney.ui.fragment
import
com.mints.goodmoney.R
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.ui.fragment.base.LazyLoadBaseFragment
import
com.mints.goodmoney.utils.LogUtil
/**
* 描述:电魂游戏
* 作者:孟崔广
*/
class
DhGameFragment
:
LazyLoadBaseFragment
()
{
private
val
TAG
=
DhGameFragment
::
class
.
java
.
simpleName
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
fragment_main_dh
override
fun
initViewsAndEvents
()
{
}
override
fun
onFragmentFirstVisible
()
{
LogUtil
.
e
(
"DhGameFragment"
,
"onFragmentFirstVisible"
)
}
override
fun
onFragmentResume
()
{
super
.
onFragmentResume
()
if
(
AppConfig
.
fragmentClickFlag
===
Constant
.
FRAGMENT_CLICK_MAIN
)
{
}
}
override
fun
onDestroy
()
{
super
.
onDestroy
()
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
View file @
46e96719
...
...
@@ -6,7 +6,7 @@ import android.view.View
import
android.widget.ImageView
import
androidx.fragment.app.FragmentTransaction
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.VedioAdingManager
import
com.mints.goodmoney.ad.
video.
VedioAdingManager
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.manager.TTPreLoadExpressManager
...
...
@@ -22,6 +22,7 @@ import com.mints.goodmoney.ui.widgets.DialogListener
import
com.mints.goodmoney.ui.widgets.PowerDialog
import
com.mints.goodmoney.utils.LogUtil
import
com.mints.library.utils.json.JsonUtil
import
com.yilan.sdk.player.UserCallback
import
com.yilan.sdk.ui.littlevideo.LittleVideoFragment
import
kotlinx.android.synthetic.main.fragment_main_first.*
import
net.grandcentrix.tray.AppPreferences
...
...
@@ -158,13 +159,11 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
}
// 设置视频权限
// vedioAdingManager?.initAdWeight(data.vedioRules.csJ_VEDIO.rate, data.vedioRules.ylH_VEDIO.rate)
vedioAdingManager
?.
initAdWeight
(
data
.
vedioRules
.
csJ_VEDIO
.
rate
,
0
)
vedioAdingManager
?.
initAdWeight
(
data
.
vedioRules
.
csJ_VEDIO
.
rate
,
data
.
vedioRules
.
ylH_VEDIO
.
rate
)
LogUtil
.
d
(
TAG
,
"首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} ylhWeight:${data.vedioRules.ylH_VEDIO.rate}"
)
// 广告视频数
AppConfig
.
csjVedioAdCount
=
data
.
vedioRules
.
csJ_VEDIO
.
surplus
// AppConfig.ylhAdCount = data.vedioRules.ylH_VEDIO.surplus
AppConfig
.
ylhAdCount
=
0
AppConfig
.
ylhAdCount
=
data
.
vedioRules
.
ylH_VEDIO
.
surplus
LogUtil
.
d
(
TAG
,
"首页视频数:csjCount:${AppConfig.csjVedioAdCount} ylhCount:${AppConfig.ylhAdCount}"
)
...
...
@@ -182,6 +181,8 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
return
}
ps
.
put
(
Constant
.
MAIN_VEDIO_TIME
,
data
.
createRewardNeedTime
)
smallRewardCoin
=
data
.
smallRewardCoin
bigRewardCoin
=
data
.
bigRewardCoin
...
...
@@ -278,15 +279,11 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
* 将播放的id记录到list中
*/
private
fun
addVedioIdList
(
id
:
String
)
{
// LogUtil.d(TAG, "addVedioIdList:" + id)
// LogUtil.d(TAG, "addVedioId ListItem pre:" + JsonUtil.toJson(vedioIdList))
// 达到12个视频时 删除前10个记录
if
(
vedioIdList
.
size
>=
VEDIO_MAX_COUNT
)
{
vedioIdList
.
subList
(
0
,
10
).
clear
()
// LogUtil.d(TAG, "addVedioId ListItem removeAt:" + JsonUtil.toJson(vedioIdList))
}
if
(!
vedioIdList
.
contains
(
id
))
vedioIdList
.
add
(
id
)
// LogUtil.d(TAG, "addVedioId ListItem next:" + JsonUtil.toJson(vedioIdList))
}
/**
...
...
@@ -302,8 +299,6 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
*/
private
fun
resumeDownloadTime
(
id
:
String
)
{
if
(!
TextUtils
.
isEmpty
(
id
))
{
LogUtil
.
d
(
TAG
,
"resumeDownloadTime cur id:$id"
)
LogUtil
.
d
(
TAG
,
"resumeDownloadTime ListItem:"
+
JsonUtil
.
toJson
(
vedioIdList
))
if
(
vedioIdList
.
contains
(
id
))
{
cdvvYilanTime
?.
pause
()
return
...
...
@@ -339,13 +334,12 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
isFristWacthVideo
=
false
}
cdvvYilanTime
?.
showRedbox
()
stopDownloadTime
()
homePresenter
.
requestAddHomeVedioReward
()
}
va
l
vedioTime
=
60
va
r
vedioTime
=
ps
.
getInt
(
Constant
.
MAIN_VEDIO_TIME
,
30
)
cdvvYilanTime
.
setTime
(
vedioTime
)
cdvvYilanTime
.
start
()
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MoneyFragment.kt
View file @
46e96719
...
...
@@ -2,11 +2,16 @@ package com.mints.goodmoney.ui.fragment
import
androidx.fragment.app.Fragment
import
androidx.viewpager.widget.ViewPager
import
com.androidkun.xtablayout.XTabLayout
import
com.mints.goodmoney.R
import
com.mints.goodmoney.manager.UserManager
import
com.mints.goodmoney.mvp.presenters.MyPresenter
import
com.mints.goodmoney.ui.activitys.LoginActivity
import
com.mints.goodmoney.ui.adapter.MessageFragAdapter
import
com.mints.goodmoney.ui.fragment.base.BaseFragment
import
com.mints.goodmoney.ui.fragment.base.LazyLoadBaseFragment
import
com.mints.goodmoney.ui.widgets.tablayout.TabLayout
import
com.mints.goodmoney.utils.LogUtil
import
kotlinx.android.synthetic.main.fragment_main_money.*
import
java.util.*
...
...
@@ -15,10 +20,12 @@ import java.util.*
* 作者:孟崔广
* 时间:2020/10/29 13:48
*/
class
MoneyFragment
:
BaseFragment
()
{
class
MoneyFragment
:
BaseFragment
()
,
XTabLayout
.
OnTabSelectedListener
{
private
var
mainFragment
:
MainFragment
?
=
null
private
var
curPosition
=
0
;
//当前标签选中的下标
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
fragment_main_money
override
fun
initViewsAndEvents
()
{
...
...
@@ -26,34 +33,59 @@ class MoneyFragment : BaseFragment() {
}
override
fun
onHiddenChanged
(
hidden
:
Boolean
)
{
mainFragment
?.
onHiddenChanged
(
hidden
)
if
(
curPosition
==
0
)
{
mainFragment
?.
onHiddenChanged
(
hidden
)
}
super
.
onHiddenChanged
(
hidden
)
}
override
fun
setUserVisibleHint
(
isVisibleToUser
:
Boolean
)
{
super
.
setUserVisibleHint
(
isVisibleToUser
)
mainFragment
?.
userVisibleHint
=
isVisibleToUser
if
(
curPosition
==
0
)
{
mainFragment
?.
userVisibleHint
=
isVisibleToUser
}
}
private
fun
initView
()
{
//去除两侧应阴影
vpFragmentMoney
.
setOverScrollMode
(
ViewPager
.
OVER_SCROLL_NEVER
)
val
tabs
:
MutableList
<
String
>
=
ArrayList
()
tabs
.
add
(
"视频"
)
// tabs.add("游戏")
tabs
.
add
(
"书城"
)
val
fragments
:
MutableList
<
Fragment
>
=
ArrayList
()
mainFragment
=
MainFragment
()
fragments
.
add
(
mainFragment
!!
)
// fragments.add(DhGameFragment())
fragments
.
add
(
ZhangyueFragment
())
val
tabs
:
MutableList
<
String
>
=
ArrayList
()
tabs
.
add
(
"视频"
)
tabs
.
add
(
"书城"
)
//去除两侧应阴影
vpFragmentMoney
.
setOverScrollMode
(
ViewPager
.
OVER_SCROLL_NEVER
)
vpFragmentMoney
.
offscreenPageLimit
=
tabs
.
size
+
3
val
adapter
=
MessageFragAdapter
(
childFragmentManager
,
fragments
,
tabs
)
vpFragmentMoney
.
setAdapter
(
adapter
)
xtFragmentMoney
.
setxTabDisplayNum
(
tabs
.
size
)
xtFragmentMoney
.
setupWithViewPager
(
vpFragmentMoney
)
xtFragmentMoney
.
addOnTabSelectedListener
(
this
)
}
public
fun
selectVedio
()
{
fun
selectVedio
()
{
vpFragmentMoney
.
currentItem
=
0
}
override
fun
onTabReselected
(
tab
:
XTabLayout
.
Tab
)
{
}
override
fun
onTabUnselected
(
tab
:
XTabLayout
.
Tab
)
{
}
override
fun
onTabSelected
(
tab
:
XTabLayout
.
Tab
)
{
// if (tab.position == 1 && !UserManager.getInstance().userIsLogin()) {
// readyGo(LoginActivity::class.java)
// vpFragmentMoney.currentItem = if (curPosition == 1) 0 else curPosition
// return
// }
curPosition
=
tab
.
position
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
46e96719
...
...
@@ -18,9 +18,11 @@ import cn.sharesdk.wechat.friends.Wechat
import
com.component.dly.xzzq_ywsdk.YwSDK_WebActivity.Companion.open
import
com.mints.goodmoney.BuildConfig
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.VedioAdingManager
import
com.mints.goodmoney.ad.
video.
VedioAdingManager
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.manager.BxmManager
import
com.mints.goodmoney.manager.LiebaoManager
import
com.mints.goodmoney.manager.UserManager
import
com.mints.goodmoney.mvp.model.*
import
com.mints.goodmoney.mvp.presenters.MyPresenter
...
...
@@ -90,6 +92,11 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
if
(!
TextUtils
.
isEmpty
(
userManager
.
userID
))
{
myPresenter
.
getUserHallBaseMsg
()
// 登录成功的用户初始化鱼丸盒子
if
(
userManager
.
userIsLogin
())
{
baseApplication
.
initYwSdk
()
}
}
else
{
// 游客登录
myPresenter
.
userLogin
()
...
...
@@ -146,6 +153,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
override
fun
onDestroy
()
{
super
.
onDestroy
()
BxmManager
.
onDestory
()
myPresenter
.
detachView
()
}
...
...
@@ -158,7 +166,10 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
}
myPresenter
.
getSignInHomePageMsg
()
myPresenter
.
myHotActivity
()
if
(!
bannerFlag
)
{
myPresenter
.
myHotActivity
()
}
myPresenter
.
getHallBaseMsg
()
userConfig
=
data
handleRecyData
()
...
...
@@ -215,6 +226,29 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
override
fun
userLoginSuc
()
{
myPresenter
.
getUserHallBaseMsg
()
myPresenter
.
getHallBaseMsg
()
}
override
fun
getHallBaseMsgSuc
(
data
:
UserTaskMsgBean
)
{
if
(
activity
==
null
||
activity
!!
.
isFinishing
)
{
return
}
// 新人福利
if
(
data
.
userMsg
.
firstGiveCoin
>
0
)
{
val
bundle
=
Bundle
()
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
data
.
userMsg
.
firstGiveCoin
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CARRIER_NEW_USER
)
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
}
else
{
// 离线收益
if
(
data
.
offlineBean
.
offlineIncome
>
0
)
{
val
bundle
=
Bundle
()
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
data
.
offlineBean
.
offlineIncome
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CARRIER_OFFLINE_DOUBLE
)
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
}
}
}
override
fun
onRefresh
(
refreshLayout
:
RefreshLayout
)
{
...
...
@@ -357,7 +391,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
item_title_avatar
.
setImageResource
(
R
.
mipmap
.
ic_my
)
}
if
(
BuildConfig
.
DEBUG
)
{
item_title_i
d
.
text
=
"测试环境->"
+
item_title_id
.
text
.
toString
()
item_title_i
nvitecode
.
text
=
"-"
+
item_title_invitecode
.
text
}
val
userGold
=
if
(
userConfig
==
null
)
{
...
...
@@ -584,6 +618,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
readyGo
(
EraseActivity
::
class
.
java
)
}
Constant
.
HOT_ACTIVITY_BXM
->
{
// 消费变现猫事件
}
else
->
{
val
bundle
=
Bundle
()
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/widgets/refresh/CustomRefreshLayout.java
View file @
46e96719
...
...
@@ -19,7 +19,7 @@ import android.view.animation.Interpolator;
import
android.view.animation.Transformation
;
import
android.widget.AbsListView
;
import
androidx.swiperefreshlayout.widget.SwipeRefreshLayout
;
//
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
/**
* NOTE: the class based on the {@link SwipeRefreshLayout} source code
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/utils/ForegroundOrBackground.java
View file @
46e96719
...
...
@@ -17,6 +17,9 @@ import java.lang.ref.WeakReference;
* 判断app在前台还是在后台
*/
public
class
ForegroundOrBackground
implements
Application
.
ActivityLifecycleCallbacks
{
private
long
leaveTime
=
0
;
//应用切后台时间
private
static
ForegroundOrBackground
instance
;
public
int
count
=
0
;
...
...
@@ -56,7 +59,7 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
if
(
vup
==
null
)
{
vup
=
new
VersionUpdatePresenter
();
}
if
(
reference
==
null
)
{
if
(
reference
==
null
)
{
reference
=
new
WeakReference
<>(
activity
);
}
vup
.
updateVersion
(
reference
.
get
());
...
...
@@ -73,17 +76,21 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
if
(
TextUtils
.
equals
(
simpleName
,
"SplashYlhActivity"
)
||
TextUtils
.
equals
(
simpleName
,
"GuideActivity"
)
||
TextUtils
.
equals
(
simpleName
,
"AwardActivity"
)
||
TextUtils
.
equals
(
simpleName
,
"DrawcashActivity"
)
)
{
TextUtils
.
equals
(
simpleName
,
"DrawcashActivity"
))
{
count
++;
return
;
}
// if (count == 0) {
// if(intent==null){
// intent = new Intent(activity, SplashADActivity.class);
// }
// activity.startActivity(intent);
// }
if
(
count
==
0
)
{
// LogUtil.d("ForegroundOrBackground", System.currentTimeMillis() - leaveTime + " onActivityStarted");
// 30秒后打开应用 显示开屏广告
if
(
System
.
currentTimeMillis
()
-
leaveTime
>=
30000
)
{
if
(
intent
==
null
)
{
intent
=
new
Intent
(
activity
,
SplashADActivity
.
class
);
}
activity
.
startActivity
(
intent
);
}
}
count
++;
}
...
...
@@ -92,6 +99,16 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
count
--;
if
(
count
==
0
)
{
leaveTime
=
System
.
currentTimeMillis
();
String
simpleName
=
activity
.
getClass
().
getSimpleName
();
if
(
TextUtils
.
equals
(
simpleName
,
"SplashYlhActivity"
)
||
TextUtils
.
equals
(
simpleName
,
"GuideActivity"
)
||
TextUtils
.
equals
(
simpleName
,
"AwardActivity"
)
||
TextUtils
.
equals
(
simpleName
,
"DrawcashActivity"
))
{
count
++;
return
;
}
TrackManager
.
getInstance
().
offline
();
}
}
...
...
GoodMoney/app/src/main/java/com/mints/library/base/BaseAppCompatActivity.java
View file @
46e96719
...
...
@@ -24,6 +24,7 @@ import com.mints.library.net.netstatus.NetStateReceiver;
import
com.mints.library.net.netstatus.NetUtils
;
import
com.mints.library.utils.CommonUtils
;
import
com.readystatesoftware.systembartint.SystemBarTintManager
;
import
com.tendcloud.tenddata.TCAgent
;
import
com.umeng.analytics.MobclickAgent
;
/**
...
...
@@ -161,7 +162,7 @@ public abstract class BaseAppCompatActivity extends TransitionActivity {
super
.
onResume
();
// talkingData页面留存
//
TCAgent.onPageStart(this, getClass().getSimpleName());
TCAgent
.
onPageStart
(
this
,
getClass
().
getSimpleName
());
// 友盟
MobclickAgent
.
onResume
(
this
);
...
...
@@ -172,7 +173,7 @@ public abstract class BaseAppCompatActivity extends TransitionActivity {
super
.
onPause
();
// talkingData页面留存
//
TCAgent.onPageEnd(this, getClass().getSimpleName());
TCAgent
.
onPageEnd
(
this
,
getClass
().
getSimpleName
());
// 友盟
MobclickAgent
.
onPause
(
this
);
...
...
GoodMoney/app/src/main/res/layout/activity_liebao_game.xml
View file @
46e96719
...
...
@@ -8,6 +8,21 @@
<include
layout=
"@layout/header_layout"
/>
<TextView
android:id=
"@+id/tvGameHint"
android:visibility=
"gone"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/my_color_gray"
android:drawableLeft=
"@mipmap/ic_voice"
android:drawablePadding=
"10pt"
android:gravity=
"center_vertical"
android:paddingLeft=
"10dp"
android:paddingTop=
"10dp"
android:paddingRight=
"5dp"
android:paddingBottom=
"10dp"
android:textSize=
"14sp"
/>
<androidx.core.widget.NestedScrollView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
...
...
@@ -24,21 +39,6 @@
android:descendantFocusability=
"blocksDescendants"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/tvGameHint"
android:visibility=
"gone"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/my_color_gray"
android:drawableLeft=
"@mipmap/ic_voice"
android:drawablePadding=
"10pt"
android:gravity=
"center_vertical"
android:paddingLeft=
"10dp"
android:paddingTop=
"10dp"
android:paddingRight=
"5dp"
android:paddingBottom=
"10dp"
android:textSize=
"14sp"
/>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
...
...
GoodMoney/app/src/main/res/layout/fragment_main_dh.xml
0 → 100644
View file @
46e96719
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/white"
android:orientation=
"vertical"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@mipmap/ic_launcher"
/>
</LinearLayout>
GoodMoney/app/src/main/res/layout/fragment_main_money.xml
View file @
46e96719
...
...
@@ -10,7 +10,6 @@
android:id=
"@+id/xtFragmentMoney"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
app:xTabDisplayNum=
"2"
android:layout_marginTop=
"20dp"
app:xTabIndicatorColor=
"#F28335"
app:xTabIndicatorHeight=
"4dp"
...
...
GoodMoney/app/src/main/res/layout/fragment_main_zy.xml
View file @
46e96719
...
...
@@ -13,13 +13,16 @@
android:layout_weight=
"1"
></FrameLayout>
<TextView
android:visibility=
"gone"
android:id=
"@+id/tvZhangContent"
android:layout_width=
"match_parent"
android:gravity=
"center"
android:textSize=
"16sp"
android:textColor=
"@color/black"
android:layout_height=
"40dp"
></TextView>
android:layout_height=
"40dp"
android:background=
"@color/my_color_gray"
android:drawableLeft=
"@mipmap/ic_voice"
android:drawablePadding=
"5dp"
android:paddingLeft=
"14dp"
android:gravity=
"center_vertical"
android:textSize=
"14sp"
android:visibility=
"gone"
></TextView>
</LinearLayout>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment