Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_highgold
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_highgold
Commits
7458a1f2
Commit
7458a1f2
authored
May 15, 2020
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.0.6优化
parent
3ab3ba11
Changes
23
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
625 additions
and
72 deletions
+625
-72
build.gradle
highgold/app/build.gradle
+2
-2
MintsApplication.java
...pp/src/main/java/com/mints/highgold/MintsApplication.java
+49
-0
VedioAdingManager.java
...rc/main/java/com/mints/highgold/ad/VedioAdingManager.java
+14
-6
BannerAdmanager.kt
...main/java/com/mints/highgold/ad/banner/BannerAdmanager.kt
+2
-1
MintegralInscreenVedioAdManager.java
...old/ad/inscreenvedio/MintegralInscreenVedioAdManager.java
+181
-0
AppConfig.java
...pp/src/main/java/com/mints/highgold/common/AppConfig.java
+5
-0
Constant.java
...app/src/main/java/com/mints/highgold/common/Constant.java
+1
-0
MintegralManager.java
...ain/java/com/mints/highgold/manager/MintegralManager.java
+5
-0
TTAdManagerHolder.java
...in/java/com/mints/highgold/manager/TTAdManagerHolder.java
+1
-0
UserTaskMsgBean.java
...in/java/com/mints/highgold/mvp/model/UserTaskMsgBean.java
+5
-0
DrawcashPresenter.java
.../com/mints/highgold/mvp/presenters/DrawcashPresenter.java
+1
-1
LoanPresenter.java
...java/com/mints/highgold/mvp/presenters/LoanPresenter.java
+2
-2
LoginPresenter.java
...ava/com/mints/highgold/mvp/presenters/LoginPresenter.java
+1
-1
NewsWebviewPresenter.java
...m/mints/highgold/mvp/presenters/NewsWebviewPresenter.java
+35
-0
WxLoginPresenter.java
...a/com/mints/highgold/mvp/presenters/WxLoginPresenter.java
+1
-1
NewsWebviewView.java
...in/java/com/mints/highgold/mvp/views/NewsWebviewView.java
+7
-0
AwardActivity.java
...n/java/com/mints/highgold/ui/activitys/AwardActivity.java
+58
-4
NewsWebviewActivity.java
.../com/mints/highgold/ui/activitys/NewsWebviewActivity.java
+121
-15
MainFragment.java
...ain/java/com/mints/highgold/ui/fragment/MainFragment.java
+26
-10
NewWebView.java
...c/main/java/com/mints/highgold/ui/widgets/NewWebView.java
+54
-0
activity_award.xml
highgold/app/src/main/res/layout/activity_award.xml
+7
-0
activity_news_webview.xml
highgold/app/src/main/res/layout/activity_news_webview.xml
+47
-29
ic_award_banner.png
highgold/app/src/main/res/mipmap-xhdpi/ic_award_banner.png
+0
-0
No files found.
highgold/app/build.gradle
View file @
7458a1f2
...
...
@@ -10,8 +10,8 @@ android {
applicationId
"com.mints.highgold"
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
versionCode
6
versionName
"1.0.
5
"
versionCode
7
versionName
"1.0.
6
"
flavorDimensions
"default"
// dex突破65535的限制
...
...
highgold/app/src/main/java/com/mints/highgold/MintsApplication.java
View file @
7458a1f2
package
com
.
mints
.
highgold
;
import
android.app.ActivityManager
;
import
android.app.Notification
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.os.Build
;
import
android.support.annotation.NonNull
;
import
android.support.annotation.RequiresApi
;
import
android.support.multidex.MultiDex
;
import
android.support.multidex.MultiDexApplication
;
import
android.support.v4.content.LocalBroadcastManager
;
import
android.webkit.WebView
;
import
com.bun.miitmdid.core.JLibrary
;
import
com.downloader.PRDownloader
;
...
...
@@ -98,6 +102,8 @@ public class MintsApplication extends MultiDexApplication {
super
.
onCreate
();
mContext
=
this
.
getApplicationContext
();
initWebViewDataDirectory
(
this
);
// 三方配置
thirdConfig
();
}
...
...
@@ -108,6 +114,7 @@ public class MintsApplication extends MultiDexApplication {
super
.
onLowMemory
();
}
@Override
protected
void
attachBaseContext
(
Context
base
)
{
super
.
attachBaseContext
(
base
);
...
...
@@ -419,4 +426,46 @@ public class MintsApplication extends MultiDexApplication {
}
return
defaultSubscribeScheduler
;
}
/**
* 为webView设置目录后缀
*
* @param context
*/
private
void
initWebViewDataDirectory
(
Context
context
)
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
P
)
{
try
{
String
processName
=
getProcessName
(
context
);
if
(!
context
.
getPackageName
().
equals
(
processName
))
{
//判断是否是默认进程名称
WebView
.
setDataDirectorySuffix
(
processName
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
/**
* 得到进程名称
*
* @param context
* @return
*/
public
static
String
getProcessName
(
Context
context
)
{
try
{
if
(
context
==
null
)
return
null
;
ActivityManager
manager
=
(
ActivityManager
)
context
.
getSystemService
(
Context
.
ACTIVITY_SERVICE
);
for
(
ActivityManager
.
RunningAppProcessInfo
processInfo
:
manager
.
getRunningAppProcesses
())
{
if
(
processInfo
.
pid
==
android
.
os
.
Process
.
myPid
())
{
return
processInfo
.
processName
;
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
null
;
}
}
highgold/app/src/main/java/com/mints/highgold/ad/VedioAdingManager.java
View file @
7458a1f2
...
...
@@ -140,35 +140,41 @@ public class VedioAdingManager {
if
(
weightList
!=
null
)
{
weightList
.
clear
();
}
int
weight
=
0
;
// 若没有视频完成数,不加入权重计算范围内
if
(
AppConfig
.
csjVedioAdCount
>
0
)
{
weightList
.
add
(
new
WeightBean
(
csjVedioWeight
,
Constant
.
CSJ_VEDIO_AD
));
weight
=
weight
+
csjVedioWeight
;
System
.
out
.
print
(
"mcg __ 权重值:csjVedioWeight:"
+
csjVedioWeight
);
}
if
(
AppConfig
.
csjFullAdCount
>
0
)
{
weightList
.
add
(
new
WeightBean
(
csjFullWeight
,
Constant
.
CSJ_FULL_AD
));
weight
=
weight
+
csjFullWeight
;
System
.
out
.
print
(
" mcg __ 权重值:csjFullWeight:"
+
csjFullWeight
);
}
if
(
AppConfig
.
hytechVedioAdCount
>
0
)
{
weightList
.
add
(
new
WeightBean
(
hytechVedioWeight
,
Constant
.
HYTECH_VEDIO_AD
));
weight
=
weight
+
hytechVedioWeight
;
System
.
out
.
print
(
" mcg __ 权重值:hytechVedioWeight:"
+
hytechVedioWeight
);
}
if
(
AppConfig
.
mintegralAdCount
>
0
)
{
weightList
.
add
(
new
WeightBean
(
mintegralWeight
,
Constant
.
MINTEGRAL_VEDIO_AD
));
System
.
out
.
println
(
" mcg __ 权重值:mintegralWeight:"
+
mintegralWeight
);
weight
=
weight
+
mintegralWeight
;
System
.
out
.
print
(
" mcg __ 权重值:mintegralWeight:"
+
mintegralWeight
);
}
if
(
AppConfig
.
ylhAdCount
>
0
)
{
weightList
.
add
(
new
WeightBean
(
ylhWeight
,
Constant
.
YLH_VEDIO_AD
));
weight
=
weight
+
ylhWeight
;
System
.
out
.
println
(
" mcg __ 权重值:ylhWeight:"
+
ylhWeight
);
}
// 权重随机
if
(
weightList
!=
null
&&
weightList
.
size
()
>
0
)
{
int
weight
=
0
;
for
(
WeightBean
weightBean
:
weightList
)
{
weight
+=
weightBean
.
getWeight
();
}
if
(
weightList
!=
null
&&
weightList
.
size
()
>
0
&&
weight
>
0
)
{
//
for (WeightBean weightBean : weightList) {
//
weight += weightBean.getWeight();
//
}
System
.
out
.
print
(
"mcg __ 1、权重总值:"
+
weight
);
Random
r
=
new
Random
();
...
...
@@ -250,7 +256,9 @@ public class VedioAdingManager {
*/
public
interface
VedioAdingListener
{
void
vedioAdingListenerError
(
String
adType
);
void
vedioAdingListenerFail
(
String
adType
);
void
vedioAdingListenerSuccess
(
String
adType
);
}
...
...
highgold/app/src/main/java/com/mints/highgold/ad/banner/BannerAdmanager.kt
View file @
7458a1f2
...
...
@@ -32,7 +32,8 @@ class BannerAdmanager {
* @param view
*/
private
fun
initBannerAd
(
carrierType
:
String
,
view
:
View
?)
{
if
(
AppConfig
.
bannerAdType
==
0
)
loadTaBannerAd
(
carrierType
,
view
)
// if (AppConfig.bannerAdType == 0) loadTaBannerAd(carrierType, view)
loadTaBannerAd
(
carrierType
,
view
)
}
private
fun
loadTaBannerAd
(
carrierType
:
String
,
view
:
View
?)
{
...
...
highgold/app/src/main/java/com/mints/highgold/ad/inscreenvedio/MintegralInscreenVedioAdManager.java
0 → 100644
View file @
7458a1f2
package
com
.
mints
.
highgold
.
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.common.AppConfig
;
import
com.mints.highgold.manager.MintegralManager
;
import
com.mints.highgold.manager.TTAdManagerHolder
;
import
com.mints.highgold.manager.TTNativeExpressManager
;
/**
* Mintegral插屏视频
*/
public
class
MintegralInscreenVedioAdManager
{
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
();
System
.
out
.
println
(
"mcg __ 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
)
{
System
.
out
.
println
(
"mcg __ MintegralInscreenVedioAdManager onLoadSuccess"
);
AppConfig
.
isMintegralInscreenFlag
=
true
;
}
@Override
public
void
onVideoLoadSuccess
(
String
unitId
)
{
AppConfig
.
isMintegralInscreenFlag
=
true
;
System
.
out
.
println
(
"mcg __ MintegralInscreenVedioAdManager onVideoLoadSuccess"
);
}
@Override
public
void
onVideoLoadFail
(
String
errorMsg
)
{
AppConfig
.
isMintegralInscreenFlag
=
false
;
System
.
out
.
println
(
"mcg __ MintegralInscreenVedioAdManager onVideoLoadFail errorMsg:"
+
errorMsg
);
}
@Override
public
void
onShowFail
(
String
errorMsg
)
{
AppConfig
.
isMintegralInscreenFlag
=
false
;
System
.
out
.
println
(
"mcg __ 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
;
}
}
});
}
}
highgold/app/src/main/java/com/mints/highgold/common/AppConfig.java
View file @
7458a1f2
...
...
@@ -78,4 +78,9 @@ public class AppConfig {
* banner显示类型 0-推啊
*/
public
static
int
bannerAdType
=
0
;
/**
* MintegralInscreen true-加载成功
*/
public
static
boolean
isMintegralInscreenFlag
=
false
;
}
highgold/app/src/main/java/com/mints/highgold/common/Constant.java
View file @
7458a1f2
...
...
@@ -152,6 +152,7 @@ public interface Constant {
String
CARRIER_HOMEPAGE_YWHZ
=
"HOMEPAGE_YWHZ"
;
//首页高额游戏挑战奖励
String
CARRIER_GAME_CHALLENGE_TIME
=
"GAME_CHALLENGE_TIME"
;
//任务赚游戏
String
CARRIER_HOMEWATER_BUBBLE
=
"HOMEWATER_BUBBLE"
;
//首页喝水汽泡
String
CARRIER_HOMEWATER_BUBBLE_TIME
=
"CARRIER_HOMEWATER_BUBBLE_TIME"
;
//首页喝水汽泡整点
String
CARRIER_HOMEWATER_HIT
=
"HOMEWATER_HIT"
;
//首页喝水打卡
String
CARRIER_VERSUS_HEALTH
=
"VERSUS_HEALTH"
;
//任务赚健康
String
CARRIER_DRAWCASH
=
"CARRIER_DRAWCASH"
;
//提现
...
...
highgold/app/src/main/java/com/mints/highgold/manager/MintegralManager.java
View file @
7458a1f2
...
...
@@ -17,4 +17,9 @@ public class MintegralManager {
public
static
final
String
MINTEGRAL_AD_VEDIO_REDBOX_UNITID
=
"253899"
;
// 高额版_Android_抢红包_0512
public
static
final
String
MINTEGRAL_AD_VEDIO_MAIN_UNITID
=
"253897"
;
// 高额版_Android_首页试玩_0512
/*插屏视频*/
public
static
final
String
MINTEGRAL_AD_INSCREEN_VEDIO_DRINK
=
"200436"
;
// 高额版_Android_首页气泡_0512
/*激励视频 UNITID*/
public
static
final
String
MINTEGRAL_AD_INSCREEN_VEDIO_POP_DRINK
=
"255048"
;
// 高额版_Android_首页气泡_0512
}
highgold/app/src/main/java/com/mints/highgold/manager/TTAdManagerHolder.java
View file @
7458a1f2
...
...
@@ -55,6 +55,7 @@ public class TTAdManagerHolder {
public
static
final
String
TT_AD_ALLVEDIO_ID_CHALLENGE_TURN
=
"945131834"
;
//全屏挑战大转盘
public
static
final
String
TT_AD_ALLVEDIO_ID_CHALLENGE_CARD
=
"945131833"
;
//全屏挑战刮刮乐
public
static
final
String
TT_AD_ALLVEDIO_ID_EXCEPTION
=
"945131829"
;
//激励视频异常或其他 时使用
public
static
final
String
TT_AD_ALLVEDIO_ID_DRINKTIME
=
"945177915"
;
//喝水打卡m异常时使用
/*插屏广告*/
public
static
final
String
TT_AD_INSERT_ID_LIEBAO
=
"945131770"
;
//猎豹插屏场景
...
...
highgold/app/src/main/java/com/mints/highgold/mvp/model/UserTaskMsgBean.java
View file @
7458a1f2
...
...
@@ -17,6 +17,7 @@ public class UserTaskMsgBean implements Serializable {
private
int
downloandCompleteCount
;
//下载完成数
private
String
alipayAccount
;
private
String
openid
;
private
String
niceUrl
;
private
String
msg
;
private
boolean
cashOut1yuan
;
// true-提现过1元
private
boolean
cashOut2yuan
;
// true-提现过2元
...
...
@@ -386,4 +387,8 @@ public class UserTaskMsgBean implements Serializable {
public
void
setVedioplan_mintegral_vedio_surplus
(
int
vedioplan_mintegral_vedio_surplus
)
{
this
.
vedioplan_mintegral_vedio_surplus
=
vedioplan_mintegral_vedio_surplus
;
}
public
String
getNiceUrl
()
{
return
niceUrl
;
}
}
highgold/app/src/main/java/com/mints/highgold/mvp/presenters/DrawcashPresenter.java
View file @
7458a1f2
...
...
@@ -225,7 +225,7 @@ public class DrawcashPresenter extends BasePresenter<DrawcashView> {
}
}
catch
(
Exception
e
)
{
}
vo
.
put
(
"model"
,
deviceInfo
.
getMobileModel
());
vo
.
put
(
"model"
,
deviceInfo
.
get
Brand
()
+
" "
+
deviceInfo
.
get
MobileModel
());
vo
.
put
(
"uuid"
,
new
DeviceUuidFactory
(
context
).
getDeviceUuid
());
vo
.
put
(
"osversion"
,
deviceInfo
.
getOSVersion
());
vo
.
put
(
"appversion"
,
deviceInfo
.
getVersionName
());
...
...
highgold/app/src/main/java/com/mints/highgold/mvp/presenters/LoanPresenter.java
View file @
7458a1f2
...
...
@@ -504,7 +504,7 @@ public class LoanPresenter extends BasePresenter<LoanView> {
vo
.
put
(
"os"
,
"android"
);
vo
.
put
(
"model"
,
deviceInfo
.
getMobileModel
());
vo
.
put
(
"model"
,
deviceInfo
.
get
Brand
()
+
" "
+
deviceInfo
.
get
MobileModel
());
vo
.
put
(
"uuid"
,
uuid
);
vo
.
put
(
"osversion"
,
deviceInfo
.
getOSVersion
());
vo
.
put
(
"appversion"
,
deviceInfo
.
getVersionName
());
...
...
@@ -595,7 +595,7 @@ public class LoanPresenter extends BasePresenter<LoanView> {
}
}
catch
(
Exception
e
)
{
}
vo
.
put
(
"model"
,
deviceInfo
.
getMobileModel
());
vo
.
put
(
"model"
,
deviceInfo
.
get
Brand
()
+
" "
+
deviceInfo
.
get
MobileModel
());
vo
.
put
(
"uuid"
,
new
DeviceUuidFactory
(
context
).
getDeviceUuid
());
vo
.
put
(
"osversion"
,
deviceInfo
.
getOSVersion
());
vo
.
put
(
"appversion"
,
deviceInfo
.
getVersionName
());
...
...
highgold/app/src/main/java/com/mints/highgold/mvp/presenters/LoginPresenter.java
View file @
7458a1f2
...
...
@@ -318,7 +318,7 @@ public class LoginPresenter extends BasePresenter<LoginView> {
}
}
catch
(
Exception
e
)
{
}
vo
.
put
(
"model"
,
deviceInfo
.
getMobileModel
());
vo
.
put
(
"model"
,
deviceInfo
.
get
Brand
()
+
" "
+
deviceInfo
.
get
MobileModel
());
vo
.
put
(
"uuid"
,
new
DeviceUuidFactory
(
context
).
getDeviceUuid
());
vo
.
put
(
"osversion"
,
deviceInfo
.
getOSVersion
());
vo
.
put
(
"appversion"
,
deviceInfo
.
getVersionName
());
...
...
highgold/app/src/main/java/com/mints/highgold/mvp/presenters/NewsWebviewPresenter.java
0 → 100755
View file @
7458a1f2
package
com
.
mints
.
highgold
.
mvp
.
presenters
;
import
com.mints.highgold.manager.AppHttpManager
;
import
com.mints.highgold.mvp.model.AlipayBindBean
;
import
com.mints.highgold.mvp.model.BaseResponse
;
import
com.mints.highgold.mvp.views.AlipayBindView
;
import
com.mints.highgold.mvp.views.NewsWebviewView
;
import
com.mints.library.net.neterror.BaseSubscriber
;
import
com.mints.library.net.neterror.Throwable
;
import
java.util.HashMap
;
public
class
NewsWebviewPresenter
extends
BasePresenter
<
NewsWebviewView
>
{
public
void
editUserMsg
(
HashMap
<
String
,
Object
>
vo
)
{
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
editUserMsg
(
vo
),
new
BaseSubscriber
<
BaseResponse
<
Object
>>()
{
@Override
public
void
onCompleted
()
{
if
(
isLinkView
())
return
;
}
@Override
public
void
onError
(
Throwable
e
)
{
if
(
isLinkView
())
return
;
}
@Override
public
void
onNext
(
BaseResponse
<
Object
>
baseResponse
)
{
if
(
isLinkView
())
return
;
}
});
}
}
highgold/app/src/main/java/com/mints/highgold/mvp/presenters/WxLoginPresenter.java
View file @
7458a1f2
...
...
@@ -152,7 +152,7 @@ public class WxLoginPresenter extends BasePresenter<WxLoginView> {
}
}
catch
(
Exception
e
)
{
}
vo
.
put
(
"model"
,
deviceInfo
.
getMobileModel
());
vo
.
put
(
"model"
,
deviceInfo
.
get
Brand
()
+
" "
+
deviceInfo
.
get
MobileModel
());
vo
.
put
(
"uuid"
,
new
DeviceUuidFactory
(
context
).
getDeviceUuid
());
vo
.
put
(
"osversion"
,
deviceInfo
.
getOSVersion
());
vo
.
put
(
"appversion"
,
deviceInfo
.
getVersionName
());
...
...
highgold/app/src/main/java/com/mints/highgold/mvp/views/NewsWebviewView.java
0 → 100755
View file @
7458a1f2
package
com
.
mints
.
highgold
.
mvp
.
views
;
import
com.mints.highgold.mvp.model.AlipayBindBean
;
public
interface
NewsWebviewView
extends
BaseView
{
}
highgold/app/src/main/java/com/mints/highgold/ui/activitys/AwardActivity.java
View file @
7458a1f2
...
...
@@ -23,6 +23,7 @@ import com.mints.highgold.BuildConfig;
import
com.mints.highgold.R
;
import
com.mints.highgold.ad.VedioAdingManager
;
import
com.mints.highgold.ad.banner.BannerAdmanager
;
import
com.mints.highgold.ad.inscreenvedio.MintegralInscreenVedioAdManager
;
import
com.mints.highgold.common.AppConfig
;
import
com.mints.highgold.common.Constant
;
import
com.mints.highgold.manager.TTAdManagerHolder
;
...
...
@@ -45,6 +46,8 @@ import com.mints.highgold.utils.SPUtil;
import
com.mints.highgold.utils.SoundPoolUtil
;
import
com.mints.highgold.utils.SpanUtils
;
import
com.mints.highgold.utils.Utils
;
import
com.mints.highgold.utils.rxutil.CommonRxTask
;
import
com.mints.highgold.utils.rxutil.RxjavaUtil
;
import
com.mints.library.utils.json.JsonUtil
;
import
com.mints.library.utils.nodoubleclick.AntiShake
;
import
com.qq.e.ads.rewardvideo.RewardVideoAD
;
...
...
@@ -56,6 +59,7 @@ import java.util.Calendar;
import
java.util.HashMap
;
import
butterknife.Bind
;
import
butterknife.ButterKnife
;
import
butterknife.OnClick
;
/**
...
...
@@ -89,6 +93,8 @@ public class AwardActivity extends BaseActivity implements AwardView {
LinearLayout
llAwardBg
;
@Bind
(
R
.
id
.
fsv_award
)
FoxStreamerView
fsvAward
;
@Bind
(
R
.
id
.
iv_banner
)
ImageView
ivBanner
;
private
AwardPresenter
awardPresenter
;
private
SPUtil
spUtil
;
...
...
@@ -142,13 +148,29 @@ public class AwardActivity extends BaseActivity implements AwardView {
flAwardAd
.
setVisibility
(
View
.
GONE
);
tvAwardHint
.
setVisibility
(
View
.
INVISIBLE
);
fsvAward
.
setVisibility
(
View
.
GONE
);
ivBanner
.
setVisibility
(
View
.
GONE
);
}
else
{
tvAwardHint
.
setVisibility
(
View
.
GONE
);
ivBanner
.
setVisibility
(
View
.
GONE
);
fsvAward
.
setVisibility
(
View
.
VISIBLE
);
bannerAdManager
=
new
BannerAdmanager
(
AwardActivity
.
this
);
bannerAdManager
.
showBannerAd
(
""
,
fsvAward
);
if
(
AppConfig
.
bannerAdType
==
0
)
{
ivBanner
.
setVisibility
(
View
.
GONE
);
fsvAward
.
setVisibility
(
View
.
VISIBLE
);
bannerAdManager
=
new
BannerAdmanager
(
AwardActivity
.
this
);
bannerAdManager
.
showBannerAd
(
""
,
fsvAward
);
AppConfig
.
bannerAdType
=
1
;
}
else
{
ivBanner
.
setVisibility
(
View
.
VISIBLE
);
fsvAward
.
setVisibility
(
View
.
GONE
);
ivBanner
.
setImageResource
(
R
.
mipmap
.
ic_award_banner
);
AppConfig
.
bannerAdType
=
0
;
}
}
initDataView
();
...
...
@@ -210,7 +232,6 @@ public class AwardActivity extends BaseActivity implements AwardView {
}
}
@Override
public
void
onDestroy
()
{
if
(
bannerAdManager
!=
null
)
{
...
...
@@ -247,11 +268,19 @@ public class AwardActivity extends BaseActivity implements AwardView {
return
super
.
onKeyDown
(
keyCode
,
event
);
}
@OnClick
({
R
.
id
.
iv_award_back
,
R
.
id
.
tv_award_next
})
@OnClick
({
R
.
id
.
iv_award_back
,
R
.
id
.
tv_award_next
,
R
.
id
.
iv_banner
})
public
void
onClick
(
View
view
)
{
if
(
AntiShake
.
check
(
view
.
getId
()))
return
;
Bundle
bundle
;
switch
(
view
.
getId
())
{
case
R
.
id
.
iv_banner
:
if
(
userConfig
!=
null
)
{
bundle
=
new
Bundle
();
bundle
.
putString
(
Constant
.
DAICHAO_URL
,
userConfig
.
getNiceUrl
());
readyGo
(
WebActivity
.
class
,
bundle
);
}
break
;
case
R
.
id
.
iv_award_back
:
// 界面回传值
if
(
isBackFlag
==
Constant
.
MAIN_CUR_TWO
)
{
...
...
@@ -285,7 +314,7 @@ public class AwardActivity extends BaseActivity implements AwardView {
//awardPresenter.addLoan(null);
Bundle
bundle
=
new
Bundle
();
bundle
=
new
Bundle
();
bundle
.
putString
(
Constant
.
DAICHAO_URL
,
userConfig
.
getLoanUrl
());
readyGo
(
WebActivity
.
class
,
bundle
);
}
...
...
@@ -624,6 +653,31 @@ public class AwardActivity extends BaseActivity implements AwardView {
llAwardBg
.
setBackground
(
getResources
().
getDrawable
(
R
.
mipmap
.
bg_award_drink
));
break
;
case
Constant
.
CARRIER_HOMEWATER_BUBBLE
:
// 首页喝水汽泡
tvAwardContent
.
setText
(
"恭喜获得"
+
curCoin
+
"金币"
);
tvAwardNext
.
setVisibility
(
View
.
GONE
);
tvAwardHint
.
setVisibility
(
View
.
GONE
);
llAwardBg
.
setBackground
(
getResources
().
getDrawable
(
R
.
mipmap
.
bg_award_gold
));
break
;
case
Constant
.
CARRIER_HOMEWATER_BUBBLE_TIME
:
// 首页喝水汽泡整点
RxjavaUtil
.
executeRxTask
(
new
CommonRxTask
<
String
>(
""
)
{
@Override
public
void
doInIOThread
()
{
try
{
Thread
.
sleep
(
800
);
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
}
@Override
public
void
doInUIThread
()
{
if
(!
AwardActivity
.
this
.
isFinishing
())
{
MintegralInscreenVedioAdManager
.
getInstance
(
AwardActivity
.
this
).
showMintegralInscreen
();
}
}
});
tvAwardContent
.
setText
(
"恭喜获得"
+
curCoin
+
"金币"
);
tvAwardNext
.
setVisibility
(
View
.
GONE
);
tvAwardHint
.
setVisibility
(
View
.
GONE
);
...
...
highgold/app/src/main/java/com/mints/highgold/ui/activitys/NewsWebviewActivity.java
View file @
7458a1f2
This diff is collapsed.
Click to expand it.
highgold/app/src/main/java/com/mints/highgold/ui/fragment/MainFragment.java
View file @
7458a1f2
...
...
@@ -27,8 +27,10 @@ import com.google.gson.JsonParser;
import
com.mints.highgold.BuildConfig
;
import
com.mints.highgold.R
;
import
com.mints.highgold.ad.VedioAdingManager
;
import
com.mints.highgold.ad.inscreenvedio.MintegralInscreenVedioAdManager
;
import
com.mints.highgold.common.AppConfig
;
import
com.mints.highgold.common.Constant
;
import
com.mints.highgold.common.DeviceInfo
;
import
com.mints.highgold.manager.AmapLocationManager
;
import
com.mints.highgold.manager.LiebaoManager
;
import
com.mints.highgold.manager.ShumeiManager
;
...
...
@@ -153,6 +155,7 @@ public class MainFragment extends BaseFragment
private
TTBannerManager
ttUtil
;
private
MainWaterBean
waterBean
;
private
MintegralInscreenVedioAdManager
mintegralInscreenVedioAdManager
;
@Override
protected
int
getContentViewLayoutID
()
{
...
...
@@ -300,6 +303,10 @@ public class MainFragment extends BaseFragment
CmGameSdk
.
removeGameAdCallback
();
CmGameSdk
.
removeGameExitInfoCallback
();
if
(
mintegralInscreenVedioAdManager
!=
null
)
{
mintegralInscreenVedioAdManager
.
destory
();
}
// 取消水滴动画
if
(
wvWater
!=
null
)
{
wvWater
.
destoryAnim
();
...
...
@@ -465,17 +472,17 @@ public class MainFragment extends BaseFragment
//测试数据
// data.setVedioplan_csj_vedio_rate(
5
);
// data.setVedioplan_lyh_vedio_rate(
5
);
// data.setVedioplan_csj_full_screen_video_rate(
5
);
// data.setVedioplan_hytech_vedio_rate(
5
);
// data.setVedioplan_csj_vedio_rate(
0
);
// data.setVedioplan_lyh_vedio_rate(
0
);
// data.setVedioplan_csj_full_screen_video_rate(
0
);
// data.setVedioplan_hytech_vedio_rate(
0
);
// data.setVedioplan_mintegral_vedio_rate(5);
//
// data.setVedioplan_csj_vedio_surplus(
2
);
// data.setVedioplan_lyh_vedio_surplus(
2
);
// data.setVedioplan_csj_full_screen_video_surplus(
3
);
// data.setVedioplan_hytech_vedio_surplus(
2
);
// data.setVedioplan_mintegral_vedio_surplus(2);
// data.setVedioplan_csj_vedio_surplus(
0
);
// data.setVedioplan_lyh_vedio_surplus(
0
);
// data.setVedioplan_csj_full_screen_video_surplus(
0
);
// data.setVedioplan_hytech_vedio_surplus(
0
);
// data.setVedioplan_mintegral_vedio_surplus(2
0
);
// 设置随机广告权重
if
(
vedioAdingManager
!=
null
)
{
...
...
@@ -701,12 +708,20 @@ public class MainFragment extends BaseFragment
}
}
System
.
out
.
println
(
"mcg __ 喝水 isMintegralInscreenFlag:"
+
AppConfig
.
isMintegralInscreenFlag
);
// 喝水时间
if
(
data
.
getNextGetCoinTime
()
>
0
)
{
wvWater
.
setTvDrinkBtnText
(
"喝水打卡"
);
wvWater
.
closeWaterViewTime
();
wvWater
.
setWaterViewTime
(
getActivity
(),
data
.
getNextGetCoinTime
());
}
else
{
if
(!
AppConfig
.
isMintegralInscreenFlag
)
{
if
(
mintegralInscreenVedioAdManager
!=
null
)
{
mintegralInscreenVedioAdManager
.
loadMintegralInscreen
();
}
}
wvWater
.
setTvDrinkBtnText
(
"喝水领金币"
);
wvWater
.
setWaterViewTimeGone
();
}
...
...
@@ -770,7 +785,7 @@ public class MainFragment extends BaseFragment
if
(
waterCoin
>
0
)
{
// 显示喝水金币
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
waterCoin
);
bundle
.
putString
(
Constant
.
MAIN_CARRIET_TURN
,
Constant
.
CARRIER_HOMEWATER_BUBBLE
);
bundle
.
putString
(
Constant
.
MAIN_CARRIET_TURN
,
Constant
.
CARRIER_HOMEWATER_BUBBLE
_TIME
);
}
else
{
bundle
.
putString
(
Constant
.
MAIN_CARRIET_TURN
,
Constant
.
CARRIER_HOMEWATER_HIT
);
}
...
...
@@ -918,6 +933,7 @@ public class MainFragment extends BaseFragment
userManager
=
UserManager
.
getInstance
();
liebaoManager
=
LiebaoManager
.
getInstance
();
vedioAdingManager
=
VedioAdingManager
.
getInstance
(
getActivity
());
mintegralInscreenVedioAdManager
=
MintegralInscreenVedioAdManager
.
getInstance
(
getActivity
());
mLocationHandler
=
new
AmapLocationManager
.
LocationHandler
(
getActivity
());
lvMainGamelist
.
setFocusable
(
false
);
...
...
highgold/app/src/main/java/com/mints/highgold/ui/widgets/NewWebView.java
0 → 100644
View file @
7458a1f2
package
com
.
mints
.
highgold
.
ui
.
widgets
;
import
android.content.Context
;
import
android.util.AttributeSet
;
import
android.webkit.WebView
;
public
class
NewWebView
extends
WebView
{
private
OnScrollChangeListener
mOnScrollChangeListener
;
public
NewWebView
(
Context
context
,
AttributeSet
attrs
)
{
super
(
context
,
attrs
);
}
@Override
protected
void
onScrollChanged
(
int
l
,
int
t
,
int
oldl
,
int
oldt
)
{
super
.
onScrollChanged
(
l
,
t
,
oldl
,
oldt
);
// webview的高度
try
{
float
webcontent
=
getContentHeight
()
*
getScale
();
// 当前webview的高度
float
webnow
=
getHeight
()
+
getScrollY
();
if
(
mOnScrollChangeListener
!=
null
)
{
if
(
Math
.
abs
(
webcontent
-
webnow
)
<
1
)
{
//处于底端
mOnScrollChangeListener
.
onPageEnd
(
l
,
t
,
oldl
,
oldt
);
}
else
if
(
getScrollY
()
==
0
)
{
//处于顶端
mOnScrollChangeListener
.
onPageTop
(
l
,
t
,
oldl
,
oldt
);
}
else
{
mOnScrollChangeListener
.
onScrollChanged
(
l
,
t
,
oldl
,
oldt
);
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
public
void
setOnScrollChangeListener
(
OnScrollChangeListener
listener
)
{
this
.
mOnScrollChangeListener
=
listener
;
}
public
interface
OnScrollChangeListener
{
public
void
onPageEnd
(
int
l
,
int
t
,
int
oldl
,
int
oldt
);
public
void
onPageTop
(
int
l
,
int
t
,
int
oldl
,
int
oldt
);
public
void
onScrollChanged
(
int
l
,
int
t
,
int
oldl
,
int
oldt
);
}
}
highgold/app/src/main/res/layout/activity_award.xml
View file @
7458a1f2
...
...
@@ -80,6 +80,13 @@
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
tools:fox_size=
"foxBr"
/>
<ImageView
android:id=
"@+id/iv_banner"
android:layout_marginTop=
"16pt"
android:scaleType=
"fitXY"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
</LinearLayout>
</FrameLayout>
...
...
highgold/app/src/main/res/layout/activity_news_webview.xml
View file @
7458a1f2
...
...
@@ -5,48 +5,66 @@
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<
Relative
Layout
<
Linear
Layout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<ImageView
android:id=
"@+id/tv_activity_back"
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingLeft=
"50pt"
android:paddingTop=
"70pt"
android:paddingRight=
"30pt"
android:paddingBottom=
"20pt"
android:scaleType=
"center"
android:src=
"@mipmap/ic_activity_arrow"
/>
android:orientation=
"horizontal"
>
<ImageView
android:id=
"@+id/tv_activity_back"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingLeft=
"50pt"
android:paddingTop=
"70pt"
android:paddingRight=
"30pt"
android:paddingBottom=
"20pt"
android:scaleType=
"center"
android:src=
"@mipmap/ic_activity_arrow"
/>
<ImageView
android:id=
"@+id/iv_activity_quit"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingLeft=
"20pt"
android:paddingTop=
"70pt"
android:paddingRight=
"40pt"
android:paddingBottom=
"20pt"
android:scaleType=
"center"
android:src=
"@mipmap/ic_activity_quit"
/>
<ImageView
android:id=
"@+id/iv_activity_quit"
</LinearLayout>
<TextView
android:id=
"@+id/tv_activity_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingLeft=
"20pt"
android:paddingTop=
"70pt"
android:paddingRight=
"40pt"
android:paddingBottom=
"20pt"
android:scaleType=
"center"
android:src=
"@mipmap/ic_activity_quit"
/>
</LinearLayout>
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"80pt"
android:textColor=
"@color/product_net_text"
android:textSize=
"14sp"
/>
</RelativeLayout>
<TextView
android:id=
"@+id/tv_activity_title"
android:visibility=
"gone"
android:id=
"@+id/tv_activity_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"80pt"
android:layout_marginTop=
"10pt"
android:layout_marginBottom=
"10pt"
android:layout_gravity=
"center_horizontal"
android:textColor=
"@color/product_net_text"
android:textSize=
"14sp"
/>
</RelativeLayout>
</LinearLayout>
<ProgressBar
android:id=
"@+id/pb_web"
style=
"?android:attr/progressBarStyleHorizontal"
...
...
@@ -57,7 +75,7 @@
android:max=
"100"
android:progressDrawable=
"@drawable/progress_bar_horizontal"
/>
<WebView
<
com.mints.highgold.ui.widgets.New
WebView
android:id=
"@+id/wb_news"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
...
...
highgold/app/src/main/res/mipmap-xhdpi/ic_award_banner.png
0 → 100644
View file @
7458a1f2
54.6 KB
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