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
d7913e62
Commit
d7913e62
authored
Jan 05, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加讯飞部分功能
parent
5eeb81ae
Changes
38
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
584 additions
and
636 deletions
+584
-636
build.gradle
GoodMoney/app/build.gradle
+15
-5
proguard-rules.pro
GoodMoney/app/proguard-rules.pro
+14
-1
AndroidManifest.xml
GoodMoney/app/src/main/AndroidManifest.xml
+5
-0
InitAppService.kt
...y/app/src/main/java/com/mints/goodmoney/InitAppService.kt
+0
-48
MintsApplication.java
...p/src/main/java/com/mints/goodmoney/MintsApplication.java
+73
-0
BaseVedioAd.kt
...src/main/java/com/mints/goodmoney/ad/vedio/BaseVedioAd.kt
+2
-2
CsjVedioAdManager.java
.../java/com/mints/goodmoney/ad/vedio/CsjVedioAdManager.java
+2
-5
MhVedioAdManager.kt
...ain/java/com/mints/goodmoney/ad/vedio/MhVedioAdManager.kt
+2
-2
VedioAdingManager.java
.../java/com/mints/goodmoney/ad/vedio/VedioAdingManager.java
+1
-2
WnVedioAdManager.kt
...ain/java/com/mints/goodmoney/ad/vedio/WnVedioAdManager.kt
+2
-3
YlhVedioAdManager.java
.../java/com/mints/goodmoney/ad/vedio/YlhVedioAdManager.java
+2
-4
Constant.kt
.../app/src/main/java/com/mints/goodmoney/common/Constant.kt
+3
-1
KylTabBean.kt
...src/main/java/com/mints/goodmoney/mvp/model/KylTabBean.kt
+21
-2
KylVedioBean.kt
...c/main/java/com/mints/goodmoney/mvp/model/KylVedioBean.kt
+44
-2
KuYinYuePagePresenter.kt
...m/mints/goodmoney/mvp/presenters/KuYinYuePagePresenter.kt
+15
-36
KylVedioPresenter.kt
...a/com/mints/goodmoney/mvp/presenters/KylVedioPresenter.kt
+3
-28
KuYinYuePageView.kt
...in/java/com/mints/goodmoney/mvp/views/KuYinYuePageView.kt
+5
-3
KylVedioView.kt
...c/main/java/com/mints/goodmoney/mvp/views/KylVedioView.kt
+1
-7
LoanService.java
...pp/src/main/java/com/mints/goodmoney/net/LoanService.java
+36
-18
AwardActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
+1
-1
DrawcashActivity.kt
...java/com/mints/goodmoney/ui/activitys/DrawcashActivity.kt
+1
-1
KylVedioActivity.kt
...java/com/mints/goodmoney/ui/activitys/KylVedioActivity.kt
+165
-98
MainActivity.kt
...ain/java/com/mints/goodmoney/ui/activitys/MainActivity.kt
+1
-1
MorningClockActivity.kt
.../com/mints/goodmoney/ui/activitys/MorningClockActivity.kt
+1
-1
KylPageAdapter.kt
...ain/java/com/mints/goodmoney/ui/adapter/KylPageAdapter.kt
+11
-12
KuYinYueFragment.kt
.../java/com/mints/goodmoney/ui/fragment/KuYinYueFragment.kt
+40
-52
KuYinYuePageFragment.kt
...a/com/mints/goodmoney/ui/fragment/KuYinYuePageFragment.kt
+63
-167
MainFragment.kt
...main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
+4
-3
MoneyFragment.kt
...ain/java/com/mints/goodmoney/ui/fragment/MoneyFragment.kt
+11
-5
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+2
-1
XmlyPageFragment.kt
.../java/com/mints/goodmoney/ui/fragment/XmlyPageFragment.kt
+1
-0
DrawcashVideoDialog.kt
...ava/com/mints/goodmoney/ui/widgets/DrawcashVideoDialog.kt
+1
-2
JZVideoPlayerStandardLoopVideo.java
.../goodmoney/ui/widgets/JZVideoPlayerStandardLoopVideo.java
+1
-1
activity_kyl_vedio.xml
GoodMoney/app/src/main/res/layout/activity_kyl_vedio.xml
+22
-100
fragment_main_kyl.xml
GoodMoney/app/src/main/res/layout/fragment_main_kyl.xml
+2
-2
fragment_main_kyl_page.xml
GoodMoney/app/src/main/res/layout/fragment_main_kyl_page.xml
+2
-2
item_rv_kyl_page.xml
GoodMoney/app/src/main/res/layout/item_rv_kyl_page.xml
+3
-2
item_rv_xmly_page.xml
GoodMoney/app/src/main/res/layout/item_rv_xmly_page.xml
+6
-16
No files found.
GoodMoney/app/build.gradle
View file @
d7913e62
...
...
@@ -9,8 +9,8 @@ android {
applicationId
"com.mints.goodmoney"
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
versionCode
1
0
versionName
"1.
0.9
"
versionCode
1
1
versionName
"1.
1.0
"
flavorDimensions
"default"
// dex突破65535的限制
...
...
@@ -174,6 +174,16 @@ dependencies {
implementation
'com.king.zxing:zxing-lite:1.1.7-androidx'
// toast
implementation
'com.hjq:toast:8.8'
// 视频
implementation
'cn.jzvd:jiaozivideoplayer:7.0.5'
// 附件下载更新
implementation
'com.mindorks.android:prdownloader:0.6.0'
// 视频壁纸
implementation
'com.dingmouren.videowallpaper:videowallpaper:1.0.1'
// 圆角库
implementation
'com.github.SheHuan:NiceImageView:1.0.5'
// 工具类
// gson
...
...
@@ -248,9 +258,9 @@ dependencies {
implementation
(
name:
'mh-adsdk-ext'
,
ext:
'aar'
)
implementation
(
name:
'ks_3.3.5.3'
,
ext:
'aar'
)
// 聚乐云
implementation
(
name:
'okgo-2.
1
'
,
ext:
'aar'
)
implementation
(
name:
'scenemodule-2.
1
'
,
ext:
'aar'
)
implementation
(
name:
'scenead-2.
1
'
,
ext:
'aar'
)
implementation
(
name:
'okgo-2.
2
'
,
ext:
'aar'
)
implementation
(
name:
'scenemodule-2.
2
'
,
ext:
'aar'
)
implementation
(
name:
'scenead-2.
2
'
,
ext:
'aar'
)
implementation
'com.just.agentweb:agentweb:4.1.2'
// 喜马拉雅 已集成
...
...
GoodMoney/app/proguard-rules.pro
View file @
d7913e62
...
...
@@ -558,4 +558,17 @@
-dontwarn com.ximalaya.ting.android.opensdk.
*
*
-keep interface com.ximalaya.ting.android.opensdk.
*
* {*;}
-keep class com.ximalaya.ting.android.opensdk.
*
* { *; }
# ======================= 喜马拉雅 END ================
\ No newline at end of file
# ======================= 喜马拉雅 END ================
# ===================== JZVedio START ================
-keep public class cn.jzvd.JZMediaSystem {*; }
-keep public class cn.jzvd.demo.CustomMedia.CustomMedia {*; }
-keep public class cn.jzvd.demo.CustomMedia.JZMediaIjk {*; }
-keep public class cn.jzvd.demo.CustomMedia.JZMediaSystemAssertFolder {*; }
-keep class tv.danmaku.ijk.media.player.
*
* {*; }
-dontwarn tv.danmaku.ijk.media.player.*
-keep interface tv.danmaku.ijk.media.player.
*
* { *; }
# ======================= JZVedio END ================
\ No newline at end of file
GoodMoney/app/src/main/AndroidManifest.xml
View file @
d7913e62
...
...
@@ -33,6 +33,7 @@
<uses-permission
android:name=
"android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"
/>
<uses-permission
android:name=
"android.permission.CHANGE_NETWORK_STATE"
/>
<uses-permission
android:name=
"android.permission.ACCESS_BACKGROUND_LOCATION"
/>
<uses-permission
android:name=
"android.permission.SET_WALLPAPER"
/>
<application
android:name=
".MintsApplication"
...
...
@@ -212,6 +213,10 @@
<activity
android:name=
".ui.activitys.XmlyActivity"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.activitys.KylVedioActivity"
android:configChanges=
"orientation|screenSize|keyboardHidden"
android:screenOrientation=
"portrait"
/>
<service
android:name=
".service.UpdateService"
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/InitAppService.kt
View file @
d7913e62
...
...
@@ -62,18 +62,9 @@ class InitAppService : IntentService("InitializeService") {
* 子线程进行初始化SDK操作
*/
private
fun
initApplication
()
{
// TalkingData数据埋点与错误日志
TalkingDataConfig
()
// 初始化ShareSDK
MobSDK
.
init
(
this
)
// 友盟初始化
initUm
(
this
)
//logger
initLogger
()
// 极光推送
initJpush
()
...
...
@@ -81,45 +72,6 @@ class InitAppService : IntentService("InitializeService") {
initBxm
(
this
.
application
)
}
/**
* 设置TalkingData
*/
private
fun
TalkingDataConfig
()
{
TCAgent
.
LOG_ON
=
BuildConfig
.
DEBUG
val
talkingData_id
=
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"TD_KEY"
)
val
td_channel_id
=
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
)
TCAgent
.
init
(
this
,
talkingData_id
,
td_channel_id
)
TCAgent
.
setReportUncaughtExceptions
(
true
)
}
/**
* 友盟初始化
*/
fun
initUm
(
context
:
Context
?)
{
/**
* 参数4:设备类型,必须参数,传参数为UMConfigure.DEVICE_TYPE_PHONE则表示手机;传参数为UMConfigure.DEVICE_TYPE_BOX则表示盒子;默认为手机。
* 参数5:Push推送业务的secret,需要集成Push功能时必须传入Push的secret,否则传空。
*/
UMConfigure
.
init
(
context
,
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"UMENG_KEY"
),
CommonUtils
.
getAppMetaData
(
context
,
"CHANNEL_NAME"
),
UMConfigure
.
DEVICE_TYPE_PHONE
,
""
)
UMConfigure
.
setLogEnabled
(
true
)
MobclickAgent
.
setPageCollectionMode
(
MobclickAgent
.
PageMode
.
LEGACY_MANUAL
)
}
/**
* 自定义logger
*/
private
fun
initLogger
()
{
if
(
IS_DEBUG
)
{
val
formatStrategy
:
FormatStrategy
=
PrettyFormatStrategy
.
newBuilder
()
.
showThreadInfo
(
false
)
//是否选择显示线程信息,默认为true
.
methodCount
(
0
)
//方法数显示多少行,默认2行
.
methodOffset
(
7
)
//隐藏方法内部调用到偏移量,默认5
.
tag
(
"mints---network"
)
//自定义TAG全部标签,默认PRETTY_LOGGER
.
build
()
Logger
.
addLogAdapter
(
AndroidLogAdapter
(
formatStrategy
))
}
}
/**
* 绑定jpush
*/
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/MintsApplication.java
View file @
d7913e62
...
...
@@ -11,6 +11,8 @@ import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import
androidx.multidex.MultiDexApplication
;
import
com.bun.miitmdid.core.JLibrary
;
import
com.downloader.PRDownloader
;
import
com.downloader.PRDownloaderConfig
;
import
com.hjq.toast.ToastUtils
;
import
com.mints.goodmoney.common.Constant
;
import
com.mints.goodmoney.manager.ChannelManager
;
...
...
@@ -26,6 +28,14 @@ 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.library.utils.CommonUtils
;
import
com.orhanobut.logger.AndroidLogAdapter
;
import
com.orhanobut.logger.FormatStrategy
;
import
com.orhanobut.logger.Logger
;
import
com.orhanobut.logger.PrettyFormatStrategy
;
import
com.tendcloud.tenddata.TCAgent
;
import
com.umeng.analytics.MobclickAgent
;
import
com.umeng.commonsdk.UMConfigure
;
import
com.ximalaya.ting.android.opensdk.constants.ConstantsOpenSdk
;
import
com.ximalaya.ting.android.opensdk.datatrasfer.CommonRequest
;
import
com.ximalaya.ting.android.opensdk.player.service.XmPlayerConfig
;
...
...
@@ -152,6 +162,12 @@ public class MintsApplication extends MultiDexApplication {
// 喜马拉雅
initXmly
();
// 自定义logger
bindLogger
();
// PR下载附件
initPRDownloader
();
}
private
void
initXmly
()
{
...
...
@@ -167,6 +183,31 @@ public class MintsApplication extends MultiDexApplication {
}
}
/**
* 自定义logger
*/
private
void
bindLogger
()
{
//自定义logger
FormatStrategy
formatStrategy
=
PrettyFormatStrategy
.
newBuilder
()
.
showThreadInfo
(
false
)
//是否选择显示线程信息,默认为true
.
methodCount
(
0
)
//方法数显示多少行,默认2行
.
methodOffset
(
7
)
//隐藏方法内部调用到偏移量,默认5
// .logStrategy(customLog) //打印日志的策略,默认LogCat
.
tag
(
"mints---network"
)
//自定义TAG全部标签,默认PRETTY_LOGGER
.
build
();
Logger
.
addLogAdapter
(
new
AndroidLogAdapter
(
formatStrategy
));
}
/**
* PR下载附件
*/
private
void
initPRDownloader
()
{
PRDownloaderConfig
config
=
PRDownloaderConfig
.
newBuilder
()
.
setDatabaseEnabled
(
true
)
.
build
();
PRDownloader
.
initialize
(
this
,
config
);
}
private
MiitHelper
.
AppIdsUpdater
appIdsUpdater
=
ids
->
OAID
=
ids
;
/**
...
...
@@ -182,6 +223,38 @@ public class MintsApplication extends MultiDexApplication {
}
}
/**
* 设置TalkingData
*/
public
void
TalkingDataConfig
()
{
try
{
TCAgent
.
LOG_ON
=
BuildConfig
.
DEBUG
;
String
talkingData_id
=
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"TD_KEY"
);
String
td_channel_id
=
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
);
TCAgent
.
init
(
this
,
talkingData_id
,
td_channel_id
);
TCAgent
.
setReportUncaughtExceptions
(
true
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
/**
* 友盟初始化
*/
public
void
initUm
(
Context
context
)
{
try
{
/**
* 参数4:设备类型,必须参数,传参数为UMConfigure.DEVICE_TYPE_PHONE则表示手机;传参数为UMConfigure.DEVICE_TYPE_BOX则表示盒子;默认为手机。
* 参数5:Push推送业务的secret,需要集成Push功能时必须传入Push的secret,否则传空。
*/
UMConfigure
.
init
(
context
,
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"UMENG_KEY"
),
CommonUtils
.
getAppMetaData
(
context
,
"CHANNEL_NAME"
),
UMConfigure
.
DEVICE_TYPE_PHONE
,
""
);
UMConfigure
.
setLogEnabled
(
BuildConfig
.
DEBUG
);
MobclickAgent
.
setPageCollectionMode
(
MobclickAgent
.
PageMode
.
LEGACY_MANUAL
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
/**
* app退出
*/
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/vedio/BaseVedioAd.kt
View file @
d7913e62
package
com.mints.goodmoney.ad.v
ide
o
package
com.mints.goodmoney.ad.v
edi
o
import
android.app.Activity
import
android.content.DialogInterface
...
...
@@ -11,7 +11,7 @@ import com.mints.goodmoney.ui.widgets.LoadingDialog
import
com.mints.goodmoney.utils.ToastUtil
import
java.util.HashMap
open
class
BaseV
ide
oAd
(
activity
:
Activity
)
:
BaseView
{
open
class
BaseV
edi
oAd
(
activity
:
Activity
)
:
BaseView
{
open
var
activity
:
Activity
?
=
null
var
progressDialog
:
LoadingDialog
?
=
null
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/vedio/CsjVedioAdManager.java
View file @
d7913e62
package
com
.
mints
.
goodmoney
.
ad
.
v
ide
o
;
package
com
.
mints
.
goodmoney
.
ad
.
v
edi
o
;
import
android.app.Activity
;
import
android.text.TextUtils
;
import
com.bytedance.sdk.openadsdk.AdSlot
;
import
com.bytedance.sdk.openadsdk.TTAdConstant
;
import
com.bytedance.sdk.openadsdk.TTAdNative
;
import
com.bytedance.sdk.openadsdk.TTRewardVideoAd
;
import
com.mints.goodmoney.BuildConfig
;
import
com.mints.goodmoney.MintsApplication
;
import
com.mints.goodmoney.common.Constant
;
import
com.mints.goodmoney.manager.TTNativeExpressManager
;
import
com.mints.goodmoney.manager.TrackManager
;
...
...
@@ -16,7 +14,6 @@ import com.mints.goodmoney.manager.TtCsjAdManager;
import
com.mints.goodmoney.manager.UserManager
;
import
com.mints.goodmoney.utils.LogUtil
;
import
com.mints.goodmoney.utils.MD5
;
import
com.mints.library.utils.CommonUtils
;
import
com.mints.library.utils.json.JsonUtil
;
import
net.grandcentrix.tray.AppPreferences
;
...
...
@@ -26,7 +23,7 @@ import java.util.HashMap;
/**
* 穿山甲激励视频广告
*/
public
class
CsjVedioAdManager
extends
BaseV
ide
oAd
{
public
class
CsjVedioAdManager
extends
BaseV
edi
oAd
{
private
static
CsjVedioAdManager
_inst
;
private
AppPreferences
ps
;
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/vedio/MhVedioAdManager.kt
View file @
d7913e62
package
com.mints.goodmoney.ad.v
ide
o
package
com.mints.goodmoney.ad.v
edi
o
import
android.app.Activity
import
com.maplehaze.adsdk.video.RewardVideoAd
...
...
@@ -13,7 +13,7 @@ import com.mints.goodmoney.utils.LogUtil
* 枫岚广告视频
*/
class
MhVedioAdManager
private
constructor
(
activity
:
Activity
)
:
BaseV
ide
oAd
(
activity
),
VedioAdManagerView
{
BaseV
edi
oAd
(
activity
),
VedioAdManagerView
{
private
val
TAG
=
MhVedioAdManager
::
class
.
java
.
simpleName
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/vedio/VedioAdingManager.java
View file @
d7913e62
package
com
.
mints
.
goodmoney
.
ad
.
v
ide
o
;
package
com
.
mints
.
goodmoney
.
ad
.
v
edi
o
;
import
android.app.Activity
;
import
android.text.TextUtils
;
...
...
@@ -8,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.lang.ref.WeakReference
;
import
java.util.ArrayList
;
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/vedio/WnVedioAdManager.kt
View file @
d7913e62
package
com.mints.goodmoney.ad.v
ide
o
package
com.mints.goodmoney.ad.v
edi
o
import
android.app.Activity
import
com.mints.goodmoney.common.Constant
...
...
@@ -8,13 +8,12 @@ import com.mints.goodmoney.mvp.presenters.WnVedioAdPresenter
import
com.mints.goodmoney.mvp.views.VedioAdManagerView
import
com.mints.goodmoney.utils.LogUtil
import
com.wannuosili.sdk.*
import
java.util.*
/**
* 闪电盒子视频
*/
class
WnVedioAdManager
private
constructor
(
activity
:
Activity
)
:
BaseV
ide
oAd
(
activity
),
VedioAdManagerView
{
BaseV
edi
oAd
(
activity
),
VedioAdManagerView
{
private
val
TAG
=
WnVedioAdManager
::
class
.
java
.
simpleName
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/vedio/YlhVedioAdManager.java
View file @
d7913e62
package
com
.
mints
.
goodmoney
.
ad
.
v
ide
o
;
package
com
.
mints
.
goodmoney
.
ad
.
v
edi
o
;
import
android.app.Activity
;
import
android.os.SystemClock
;
import
com.mints.goodmoney.MintsApplication
;
import
com.mints.goodmoney.common.Constant
;
import
com.mints.goodmoney.manager.TrackManager
;
import
com.mints.goodmoney.manager.YlhAdManager
;
import
com.mints.goodmoney.mvp.presenters.YlhVedioAdPresenter
;
import
com.mints.goodmoney.mvp.views.VedioAdManagerView
;
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
;
import
com.qq.e.comm.util.AdError
;
...
...
@@ -18,7 +16,7 @@ import com.qq.e.comm.util.AdError;
/**
* 优量汇视频
*/
public
class
YlhVedioAdManager
extends
BaseV
ide
oAd
implements
VedioAdManagerView
{
public
class
YlhVedioAdManager
extends
BaseV
edi
oAd
implements
VedioAdManagerView
{
private
static
YlhVedioAdManager
_inst
;
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/common/Constant.kt
View file @
d7913e62
...
...
@@ -126,6 +126,7 @@ object Constant {
const
val
CARRIER_BLESSINGBAG
=
"BLESSINGBAG"
//首页福袋
const
val
CARRIER_BLESSINGBAG_DOUBLE
=
"BLESSINGBAG_DOUBLE"
//首页福袋翻倍
const
val
CARRIER_XMLY_CHALLENGE
=
"XMLY_CHALLENGE"
//喜马拉雅听书
const
val
CARRIER_KUYINYUE_VEDIO
=
"KUYINYUE_VEDIO"
//酷音乐视频
const
val
CHALLENGE_SHAREFRIEND
=
"CHALLENGE_SHAREFRIEND"
//邀请好友
...
...
@@ -213,5 +214,6 @@ object Constant {
const
val
RISK_EVENT_ID_DRAWCASH
=
2
const
val
RISK_EVENT_ID_TASK
=
3
// 分页 条数
const
val
PAGE_SIZE
=
15
}
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/model/KylTabBean.kt
View file @
d7913e62
package
com.mints.goodmoney.mvp.model
class
KylTabBean
{
}
\ No newline at end of file
import
java.io.Serializable
/**
* 酷音乐tab
*/
data class
KylTabBean
(
val
payUrl
:
String
,
val
rootArr
:
List
<
RootArr
>,
val
showAdCount
:
Int
)
:
Serializable
data class
RootArr
(
val
desc
:
String
,
val
detimg
:
String
,
val
id
:
String
,
val
intro
:
String
,
val
name
:
String
,
val
simg
:
String
,
val
targetid
:
String
,
val
type
:
String
)
:
Serializable
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/model/KylVedioBean.kt
View file @
d7913e62
package
com.mints.goodmoney.mvp.model
class
KylVedioBean
{
}
\ No newline at end of file
import
java.io.Serializable
/**
* 酷音乐视频列表
*/
data class
KylVedioBean
(
val
`data`
:
List
<
Data
>,
val
desc
:
String
,
val
more
:
String
,
val
px
:
String
,
val
retcode
:
String
,
val
retdesc
:
String
,
val
total
:
Int
):
Serializable
data class
Data
(
val
charge
:
String
,
val
duration
:
String
,
val
height
:
String
,
val
id
:
String
,
val
labels
:
List
<
String
>,
val
nm
:
String
,
val
price
:
String
,
val
pvurl
:
String
,
val
seton
:
String
,
val
size
:
String
,
val
song
:
Song
,
val
tp
:
String
,
val
url
:
String
,
val
videos
:
List
<
Video
>,
val
width
:
String
):
Serializable
data class
Song
(
val
name
:
String
,
val
singer
:
String
):
Serializable
data class
Video
(
val
height
:
String
,
val
size
:
String
,
val
url
:
String
,
val
width
:
String
):
Serializable
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/KuYinYuePagePresenter.kt
View file @
d7913e62
package
com.mints.goodmoney.mvp.presenters
import
com.google.gson.JsonObject
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.manager.AppHttpManager
import
com.mints.goodmoney.mvp.model.BaseResponse
import
com.mints.goodmoney.mvp.model.KylVedioBean
import
com.mints.goodmoney.mvp.views.BookView
import
com.mints.goodmoney.mvp.views.KuYinYuePageView
import
com.mints.goodmoney.utils.LogUtil
import
com.mints.library.net.neterror.BaseSubscriber
import
com.mints.library.net.neterror.Throwable
import
com.mints.library.utils.json.JsonUtil
import
java.util.*
class
BookPresenter
:
BasePresenter
<
Book
View
>()
{
class
KuYinYuePagePresenter
:
BasePresenter
<
KuYinYuePage
View
>()
{
fun
addReadSeconds
(
seconds
:
Int
)
{
fun
getXfPageMsg
(
targetid
:
String
,
page
:
Int
,
pageCount
:
Int
)
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"seconds"
]
=
seconds
vo
[
"targetid"
]
=
targetid
vo
[
"page"
]
=
page
vo
[
"size"
]
=
pageCount
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
addReadSeconds
(
vo
),
object
:
BaseSubscriber
<
BaseResponse
<
JsonObject
>>()
{
.
call
(
loanService
.
getXfPageMsg
(
vo
),
object
:
BaseSubscriber
<
BaseResponse
<
KylVedioBean
>>()
{
override
fun
onCompleted
()
{
}
override
fun
onError
(
e
:
Throwable
)
{
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
JsonObject
>)
{
if
(
isLinkView
)
return
val
code
=
baseResponse
.
getStatus
()
val
data
=
baseResponse
.
data
when
(
code
)
{
200
->
{
if
(
data
!=
null
)
{
val
coin
=
data
[
"coin"
].
asInt
view
.
readSecondsSuc
(
coin
)
}
}
else
->
view
.
showToast
(
baseResponse
.
getMessage
())
}
}
})
}
fun
getReadInfo
()
{
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
getReadInfo
(),
object
:
BaseSubscriber
<
BaseResponse
<
JsonObject
>>()
{
override
fun
onCompleted
()
{
}
override
fun
onError
(
e
:
Throwable
)
{
view
.
getXfPageMsgFail
()
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
JsonObject
>)
{
override
fun
onNext
(
baseResponse
:
BaseResponse
<
KylVedioBean
>)
{
if
(
isLinkView
)
return
val
code
=
baseResponse
.
getStatus
()
val
data
=
baseResponse
.
data
when
(
code
)
{
200
->
{
if
(
data
!=
null
)
{
val
msg
=
data
.
getAsJsonObject
(
"msg"
)
view
.
readInfo
(
msg
[
"needSecods"
].
asInt
,
msg
[
"coin"
].
asInt
,
msg
[
"completeSeconds"
].
asInt
)
}
view
.
getXfPageMsgSuc
(
baseResponse
.
data
)
}
else
->
view
.
showToast
(
baseResponse
.
getMessage
())
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/KylVedioPresenter.kt
View file @
d7913e62
...
...
@@ -4,11 +4,12 @@ import com.google.gson.JsonObject
import
com.mints.goodmoney.manager.AppHttpManager
import
com.mints.goodmoney.mvp.model.BaseResponse
import
com.mints.goodmoney.mvp.views.BookView
import
com.mints.goodmoney.mvp.views.KylVedioView
import
com.mints.library.net.neterror.BaseSubscriber
import
com.mints.library.net.neterror.Throwable
import
java.util.*
class
BookPresenter
:
BasePresenter
<
Book
View
>()
{
class
KylVedioPresenter
:
BasePresenter
<
KylVedio
View
>()
{
fun
addReadSeconds
(
seconds
:
Int
)
{
val
vo
=
HashMap
<
String
,
Any
>()
...
...
@@ -30,7 +31,7 @@ class BookPresenter : BasePresenter<BookView>() {
200
->
{
if
(
data
!=
null
)
{
val
coin
=
data
[
"coin"
].
asInt
view
.
readSecondsSuc
(
coin
)
//
view.readSecondsSuc(coin)
}
}
else
->
view
.
showToast
(
baseResponse
.
getMessage
())
...
...
@@ -39,30 +40,4 @@ class BookPresenter : BasePresenter<BookView>() {
})
}
fun
getReadInfo
()
{
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
getReadInfo
(),
object
:
BaseSubscriber
<
BaseResponse
<
JsonObject
>>()
{
override
fun
onCompleted
()
{
}
override
fun
onError
(
e
:
Throwable
)
{
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
JsonObject
>)
{
if
(
isLinkView
)
return
val
code
=
baseResponse
.
getStatus
()
val
data
=
baseResponse
.
data
when
(
code
)
{
200
->
{
if
(
data
!=
null
)
{
val
msg
=
data
.
getAsJsonObject
(
"msg"
)
view
.
readInfo
(
msg
[
"needSecods"
].
asInt
,
msg
[
"coin"
].
asInt
,
msg
[
"completeSeconds"
].
asInt
)
}
}
else
->
view
.
showToast
(
baseResponse
.
getMessage
())
}
}
})
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/views/KuYinYuePageView.kt
View file @
d7913e62
package
com.mints.goodmoney.mvp.views
import
com.mints.goodmoney.mvp.model.KylVedioBean
interface
BookView
:
BaseView
{
fun
readSecondsSuc
(
coin
:
Int
)
fun
readInfo
(
sumTime
:
Int
,
sumCoin
:
Int
,
readTime
:
Int
)
interface
KuYinYuePageView
:
BaseView
{
fun
getXfPageMsgSuc
(
data
:
KylVedioBean
)
fun
getXfPageMsgFail
()
}
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/views/KylVedioView.kt
View file @
d7913e62
...
...
@@ -2,12 +2,6 @@ package com.mints.goodmoney.mvp.views
import
com.mints.goodmoney.mvp.model.AccountMsgBean
interface
AccountMergeView
:
BaseView
{
fun
getKeepAccountMsgSuc
(
data
:
AccountMsgBean
)
fun
getKeepAccountMsgFail
()
fun
toKeepAccountSuc
()
fun
toKeepAccountFail
()
interface
KylVedioView
:
BaseView
{
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/net/LoanService.java
View file @
d7913e62
...
...
@@ -12,6 +12,8 @@ import com.mints.goodmoney.mvp.model.DrawcashRecordBean;
import
com.mints.goodmoney.mvp.model.FriendHallMsgBean
;
import
com.mints.goodmoney.mvp.model.FriendsTaskBean
;
import
com.mints.goodmoney.mvp.model.GoldRecordBean
;
import
com.mints.goodmoney.mvp.model.KylTabBean
;
import
com.mints.goodmoney.mvp.model.KylVedioBean
;
import
com.mints.goodmoney.mvp.model.MainVedioMsgBean
;
import
com.mints.goodmoney.mvp.model.MealBean
;
import
com.mints.goodmoney.mvp.model.MorningClockBean
;
...
...
@@ -485,6 +487,22 @@ public interface LoanService {
@POST
(
"api/checkJDNewUsers"
)
Observable
<
BaseResponse
<
DrawcashBean
>>
checkJDNewUsers
(
@Body
Map
<
String
,
Object
>
vo
);
/**
* 获取酷音乐视频(讯飞)tab
*
* @return
*/
@POST
(
"api/getXfBRTRoot"
)
Observable
<
BaseResponse
<
KylTabBean
>>
getXfBRTRoot
();
/**
* 获取酷音乐视频(讯飞)列表
*
* @return
*/
@POST
(
"api/getXfPageMsg"
)
Observable
<
BaseResponse
<
KylVedioBean
>>
getXfPageMsg
(
@Body
Map
<
String
,
Object
>
vo
);
/**
* 默认http工厂
*/
...
...
@@ -498,29 +516,29 @@ public interface LoanService {
builder
.
readTimeout
(
20
,
TimeUnit
.
SECONDS
);
builder
.
writeTimeout
(
20
,
TimeUnit
.
SECONDS
);
// if (BuildConfig.DEBUG) {
// HttpLoggingInterceptor logging = new HttpLoggingInterceptor();
// logging.setLevel(HttpLoggingInterceptor.Level.BODY);
// builder.interceptors().add(logging);
// }
if
(
BuildConfig
.
DEBUG
)
{
HttpLoggingInterceptor
logging
=
new
HttpLoggingInterceptor
(
message
->
{
if
(
TextUtils
.
isEmpty
(
message
))
return
;
String
s
=
message
.
substring
(
0
,
1
);
String
request
=
message
.
substring
(
0
,
4
);
if
(
"{"
.
equals
(
s
)
||
"["
.
equals
(
s
))
{
Logger
.
json
(
message
);
}
else
if
(
request
.
contains
(
"-->"
)
||
request
.
contains
(
"<--"
))
{
Logger
.
d
(
"Method"
+
message
);
}
else
{
Logger
.
d
(
"params:"
+
message
);
}
});
HttpLoggingInterceptor
logging
=
new
HttpLoggingInterceptor
();
logging
.
setLevel
(
HttpLoggingInterceptor
.
Level
.
BODY
);
builder
.
interceptors
().
add
(
logging
);
}
// if (BuildConfig.DEBUG) {
// HttpLoggingInterceptor logging = new HttpLoggingInterceptor(message -> {
// if (TextUtils.isEmpty(message)) return;
// String s = message.substring(0, 1);
// String request = message.substring(0, 4);
// if ("{".equals(s) || "[".equals(s)) {
// Logger.json(message);
// } else if (request.contains("-->") || request.contains("<--")) {
// Logger.d("Method" + message);
// } else {
// Logger.d("params:" + message);
// }
// });
// logging.setLevel(HttpLoggingInterceptor.Level.BODY);
// builder.interceptors().add(logging);
// }
OkHttpInterceptor
okHttpInterceptor
=
new
OkHttpInterceptor
(
AESUtils
.
getDefaultKey
());
builder
.
interceptors
().
add
(
okHttpInterceptor
);
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
View file @
d7913e62
...
...
@@ -6,7 +6,7 @@ import android.view.KeyEvent
import
android.view.View
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.express.PreLoadExpressManager
import
com.mints.goodmoney.ad.v
ide
o.VedioAdingManager
import
com.mints.goodmoney.ad.v
edi
o.VedioAdingManager
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.common.DeviceInfo.Companion.instance
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/DrawcashActivity.kt
View file @
d7913e62
...
...
@@ -8,7 +8,7 @@ import androidx.recyclerview.widget.GridLayoutManager
import
cn.sharesdk.framework.ShareSDK
import
cn.sharesdk.wechat.friends.Wechat
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.v
ide
o.VedioAdingManager
import
com.mints.goodmoney.ad.v
edi
o.VedioAdingManager
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.login.LoginApi
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/KylVedioActivity.kt
View file @
d7913e62
This diff is collapsed.
Click to expand it.
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/MainActivity.kt
View file @
d7913e62
...
...
@@ -10,7 +10,7 @@ import androidx.fragment.app.FragmentManager
import
androidx.fragment.app.FragmentTransaction
import
com.ireader.ireadersdk.IreaderApi
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.v
ide
o.VedioAdingManager
import
com.mints.goodmoney.ad.v
edi
o.VedioAdingManager
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.ad.express.TTPreLoadCarrierExpressManager
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/MorningClockActivity.kt
View file @
d7913e62
...
...
@@ -4,7 +4,7 @@ import android.os.Bundle
import
android.view.View
import
androidx.recyclerview.widget.GridLayoutManager
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.v
ide
o.VedioAdingManager
import
com.mints.goodmoney.ad.v
edi
o.VedioAdingManager
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.ad.express.TTPreLoadCarrierExpressManager
import
com.mints.goodmoney.manager.TtCsjAdManager
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/adapter/KylPageAdapter.kt
View file @
d7913e62
...
...
@@ -8,35 +8,35 @@ import android.widget.ImageView
import
android.widget.TextView
import
androidx.recyclerview.widget.RecyclerView
import
com.mints.goodmoney.R
import
com.mints.goodmoney.mvp.model.Data
import
com.mints.goodmoney.utils.ToolUtil
import
com.mints.library.utils.GlideUtils
import
com.shehuan.niv.NiceImageView
import
com.ximalaya.ting.android.opensdk.model.album.Album
class
XmlyPageAdapter
(
val
xmlyPageList
:
MutableList
<
Album
>)
:
RecyclerView
.
Adapter
<
Xmly
PageAdapter
.
ViewHolder
>()
{
class
KylPageAdapter
(
val
kylPageList
:
MutableList
<
Data
>)
:
RecyclerView
.
Adapter
<
Kyl
PageAdapter
.
ViewHolder
>()
{
lateinit
var
context
:
Context
lateinit
var
mOnItemClickListener
:
OnItemClickListener
inner
class
ViewHolder
(
view
:
View
)
:
RecyclerView
.
ViewHolder
(
view
)
{
val
ivXmlyPage
:
ImageView
=
view
.
findViewById
(
R
.
id
.
ivXmlyPage
)
val
tvXmlyPageContent
:
TextView
=
view
.
findViewById
(
R
.
id
.
tvXmlyPageContent
)
val
tvXmlyPagecount
:
TextView
=
view
.
findViewById
(
R
.
id
.
tvXmlyPagecount
)
val
ivKylPage
:
NiceImageView
=
view
.
findViewById
(
R
.
id
.
ivKylPage
)
val
tvKylPageContent
:
TextView
=
view
.
findViewById
(
R
.
id
.
tvKylPageContent
)
}
override
fun
onCreateViewHolder
(
parent
:
ViewGroup
,
viewType
:
Int
):
ViewHolder
{
context
=
parent
.
context
val
view
=
LayoutInflater
.
from
(
context
).
inflate
(
R
.
layout
.
item_rv_
xmly
_page
,
parent
,
false
)
val
view
=
LayoutInflater
.
from
(
context
).
inflate
(
R
.
layout
.
item_rv_
kyl
_page
,
parent
,
false
)
val
viewHolder
=
ViewHolder
(
view
)
return
viewHolder
}
override
fun
onBindViewHolder
(
holder
:
ViewHolder
,
position
:
Int
)
{
val
album
=
xmlyPageList
[
position
]
holder
.
tvXmlyPageContent
.
text
=
album
.
recommendReason
holder
.
tvXmlyPagecount
.
text
=
ToolUtil
.
formatNum
(
album
.
playCount
.
toString
(),
false
)
GlideUtils
.
loadImageView
(
holder
.
itemView
.
context
,
album
.
coverUrlLarge
,
holder
.
ivXmlyPage
)
val
data
=
kylPageList
[
position
]
holder
.
tvKylPageContent
.
text
=
data
.
nm
GlideUtils
.
loadImageView
(
holder
.
itemView
.
context
,
data
.
pvurl
,
holder
.
ivKylPage
)
holder
.
itemView
.
setOnClickListener
{
if
(
::
mOnItemClickListener
.
isInitialized
)
{
...
...
@@ -45,7 +45,7 @@ class XmlyPageAdapter(val xmlyPageList: MutableList<Album>) :
}
}
override
fun
getItemCount
()
=
xmly
PageList
.
size
override
fun
getItemCount
()
=
kyl
PageList
.
size
interface
OnItemClickListener
{
fun
onItemClick
(
position
:
Int
)
...
...
@@ -54,5 +54,4 @@ class XmlyPageAdapter(val xmlyPageList: MutableList<Album>) :
fun
setOnItemClickListener
(
listener
:
OnItemClickListener
)
{
mOnItemClickListener
=
listener
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/KuYinYueFragment.kt
View file @
d7913e62
...
...
@@ -3,28 +3,26 @@ package com.mints.goodmoney.ui.fragment
import
android.view.View
import
androidx.fragment.app.Fragment
import
androidx.viewpager.widget.ViewPager
import
com.fly.scenemodule.util.GsonUtils
import
com.mints.goodmoney.R
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.manager.AppHttpManager
import
com.mints.goodmoney.mvp.model.BaseResponse
import
com.mints.goodmoney.mvp.model.KylTabBean
import
com.mints.goodmoney.ui.adapter.MessageFragAdapter
import
com.mints.goodmoney.ui.fragment.base.LazyLoadBaseFragment
import
com.mints.goodmoney.utils.LogUtil
import
com.ximalaya.ting.android.opensdk.datatrasfer.CommonRequest
import
com.ximalaya.ting.android.opensdk.datatrasfer.IDataCallBack
import
com.ximalaya.ting.android.opensdk.model.category.CategoryList
import
kotlinx.android.synthetic.main.fragment_main_xmly.*
import
com.mints.library.net.neterror.BaseSubscriber
import
com.mints.library.net.neterror.Throwable
import
kotlinx.android.synthetic.main.fragment_main_kyl.*
import
java.util.*
import
kotlin.collections.ArrayList
import
kotlin.concurrent.schedule
/**
* 描述:
喜马拉雅
* 描述:
酷音乐视频(讯飞)
* 作者:孟崔广
*/
class
Xmly
Fragment
:
LazyLoadBaseFragment
()
{
class
KuYinYue
Fragment
:
LazyLoadBaseFragment
()
{
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
fragment_main_
xmly
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
fragment_main_
kyl
override
fun
initViewsAndEvents
()
{
...
...
@@ -32,57 +30,47 @@ class XmlyFragment : LazyLoadBaseFragment() {
override
fun
onFragmentFirstVisible
()
{
super
.
onFragmentFirstVisible
()
load
Data
()
get
Data
()
}
private
fun
load
Data
()
{
private
fun
get
Data
()
{
showLoading
(
"加载中..."
)
// 获取分类数据
val
vo
=
hashMapOf
<
String
,
String
>()
CommonRequest
.
getCategories
(
vo
,
object
:
IDataCallBack
<
CategoryList
>
{
override
fun
onSuccess
(
p0
:
CategoryList
?)
{
initViewAndData
(
p0
)
}
AppHttpManager
.
getInstance
(
baseApplication
)
.
call
(
baseApplication
.
loanService
.
getXfBRTRoot
(),
object
:
BaseSubscriber
<
BaseResponse
<
KylTabBean
>>()
{
override
fun
onError
(
e
:
Throwable
)
{
hideLoading
()
override
fun
onError
(
p0
:
Int
,
p1
:
String
?)
{
LogUtil
.
e
(
p1
)
hideLoading
()
}
}
})
}
override
fun
onNext
(
t
:
BaseResponse
<
KylTabBean
>)
{
hideLoading
()
private
fun
initViewAndData
(
categoryList
:
CategoryList
?)
{
// hideLoading()
categoryList
?.
let
{
val
tabs
:
MutableList
<
String
>
=
ArrayList
()
val
fragments
:
MutableList
<
Fragment
>
=
ArrayList
()
var
tempPageSize
=
18
if
(
it
.
categories
.
size
<
18
)
{
tempPageSize
=
it
.
categories
.
size
}
initViewAndData
(
t
.
data
)
}
})
}
for
(
i
in
0
until
tempPageSize
)
{
tabs
.
add
(
it
.
categories
[
i
].
categoryName
)
fragments
.
add
(
XmlyPageFragment
(
it
.
categories
[
i
].
id
))
}
private
fun
initViewAndData
(
tabBean
:
KylTabBean
)
{
val
tabs
:
MutableList
<
String
>
=
ArrayList
()
val
fragments
:
MutableList
<
Fragment
>
=
ArrayList
()
for
(
i
in
0
until
tabBean
.
rootArr
.
size
)
{
tabs
.
add
(
tabBean
.
rootArr
[
i
].
name
)
fragments
.
add
(
KuYinYuePageFragment
(
tabBean
.
rootArr
[
i
].
targetid
))
}
Timer
().
schedule
(
1000
)
{
activity
?.
runOnUiThread
{
hideLoading
()
xtFragmentXmly
.
visibility
=
View
.
VISIBLE
}
Timer
().
schedule
(
500
)
{
activity
?.
runOnUiThread
{
hideLoading
()
xtFragmentKyl
.
visibility
=
View
.
VISIBLE
}
xtFragmentXmly
.
overScrollMode
=
ViewPager
.
OVER_SCROLL_NEVER
vpFragmentXmly
.
offscreenPageLimit
=
tabs
.
size
+
3
val
adapter
=
MessageFragAdapter
(
childFragmentManager
,
fragments
,
tabs
)
vpFragmentXmly
.
adapter
=
adapter
xtFragmentXmly
.
setxTabDisplayNum
(
tabs
.
size
)
xtFragmentXmly
.
setupWithViewPager
(
vpFragmentXmly
)
}
xtFragmentKyl
.
overScrollMode
=
ViewPager
.
OVER_SCROLL_NEVER
vpFragmentKyl
.
offscreenPageLimit
=
tabs
.
size
+
3
val
adapter
=
MessageFragAdapter
(
childFragmentManager
,
fragments
,
tabs
)
vpFragmentKyl
.
adapter
=
adapter
xtFragmentKyl
.
setxTabDisplayNum
(
tabs
.
size
)
xtFragmentKyl
.
setupWithViewPager
(
vpFragmentKyl
)
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/KuYinYuePageFragment.kt
View file @
d7913e62
This diff is collapsed.
Click to expand it.
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
View file @
d7913e62
...
...
@@ -15,9 +15,8 @@ import com.daimajia.androidanimations.library.YoYo.YoYoString
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.express.PreLoadExpressManager
import
com.mints.goodmoney.ad.express.TTPreLoadExpressManager
import
com.mints.goodmoney.ad.express.TTPreLoadExpressXmlyManager
import
com.mints.goodmoney.ad.v
ide
o.VedioAdingManager
import
com.mints.goodmoney.ad.v
edi
o.VedioAdingManager
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.manager.*
...
...
@@ -145,7 +144,9 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
private
fun
uploadDeviceInfo
()
{
// if (!ps.getBoolean(Constant.FIRST_DEVICE_FLAG, false)) {
homePresenter
.
comSaveTerminalInfo
(
ps
)
homePresenter
.
comSaveTerminalInfo
(
ps
)
baseApplication
.
initUm
(
context
)
baseApplication
.
TalkingDataConfig
()
// }
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MoneyFragment.kt
View file @
d7913e62
...
...
@@ -20,18 +20,17 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
const
val
FRAGMENT_TAG_BOOKSTORE
=
"FRAGMENT_TAG_BOOKSTORE"
const
val
FRAGMENT_TAG_NEWS
=
"FRAGMENT_TAG_NEWS"
const
val
FRAGMENT_TAG_GAME
=
"FRAGMENT_TAG_GAME"
const
val
FRAGMENT_TAG_KYL
=
"FRAGMENT_TAG_KYL"
const
val
FRAGMENT_TAG_XMLY
=
"FRAGMENT_TAG_XMLY"
}
// private var mainFragment: MainFragment? = null
// private var liebaoGameFragment: LiebaoGameFragment? = null
private
var
currentFragment
:
Fragment
?
=
null
private
var
mainFragment
:
Fragment
?
=
null
private
var
bookStoreFragment
:
Fragment
?
=
null
private
var
newsFragment
:
Fragment
?
=
null
private
var
xmlyGameFragment
:
Fragment
?
=
null
private
var
liebaoGameFragment
:
Fragment
?
=
null
private
var
kuYinyueFragment
:
Fragment
?
=
null
private
var
curPosition
=
0
//当前标签选中的下标
...
...
@@ -44,7 +43,8 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
override
fun
onHiddenChanged
(
hidden
:
Boolean
)
{
if
(
curPosition
==
0
)
{
mainFragment
?.
onHiddenChanged
(
hidden
)
}
else
if
(
curPosition
==
3
)
{
}
else
if
(
curPosition
==
3
)
{
liebaoGameFragment
?.
onHiddenChanged
(
hidden
)
}
super
.
onHiddenChanged
(
hidden
)
...
...
@@ -198,8 +198,14 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
if
(
liebaoGameFragment
==
null
)
{
liebaoGameFragment
=
LiebaoGameFragment
()
}
addOrShowFragment
(
childFragmentManager
,
liebaoGam
eFragment
!!
,
FRAGMENT_TAG_GAME
)
addOrShowFragment
(
childFragmentManager
,
kuYinyu
eFragment
!!
,
FRAGMENT_TAG_GAME
)
}
// 3 -> {
// if (kuYinyueFragment == null) {
// kuYinyueFragment = KuYinYueFragment()
// }
// addOrShowFragment(childFragmentManager, kuYinyueFragment!!, FRAGMENT_TAG_KYL)
// }
}
curPosition
=
tab
.
position
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
d7913e62
...
...
@@ -17,7 +17,7 @@ import com.mints.goodmoney.R
import
com.mints.goodmoney.ad.banner.BannerManager
import
com.mints.goodmoney.ad.express.TTPreLoadCarrierExpressManager
import
com.mints.goodmoney.ad.express.TTPreLoadExpressXmlyManager
import
com.mints.goodmoney.ad.v
ide
o.VedioAdingManager
import
com.mints.goodmoney.ad.v
edi
o.VedioAdingManager
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.manager.*
...
...
@@ -992,4 +992,5 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
AppConfig
.
flVedioAdCount
=
data
.
vedioRules
.
fL_VEDIO
.
surplus
LogUtil
.
d
(
TAG
,
"首页视频数:csjCount:${AppConfig.csjVedioAdCount} ylhCount:${AppConfig.ylhAdCount} sdhzCount:${AppConfig.wnVedioAdCount} flCount:${AppConfig.flVedioAdCount}"
)
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/XmlyPageFragment.kt
View file @
d7913e62
...
...
@@ -84,6 +84,7 @@ class XmlyPageFragment(private val categoryId: Long) : LazyLoadBaseFragment(),
override
fun
onRefresh
(
refreshLayout
:
RefreshLayout
)
{
xmlyPage
=
1
xmlyData
.
clear
()
srl_xmly
.
resetNoMoreData
()
loadData
()
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/widgets/DrawcashVideoDialog.kt
View file @
d7913e62
...
...
@@ -8,8 +8,7 @@ import android.view.View
import
android.view.WindowManager
import
android.widget.TextView
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.video.VedioAdingManager
import
com.mints.goodmoney.ad.video.WnVedioAdManager
import
com.mints.goodmoney.ad.vedio.VedioAdingManager
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.manager.TrackManager
import
com.mints.goodmoney.mvp.model.VedioAdingBean
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/widgets/JZVideoPlayerStandardLoopVideo.java
View file @
d7913e62
package
com
.
mints
.
highgold
.
ui
.
widgets
;
package
com
.
mints
.
goodmoney
.
ui
.
widgets
;
import
android.content.Context
;
import
android.util.AttributeSet
;
...
...
GoodMoney/app/src/main/res/layout/activity_kyl_vedio.xml
View file @
d7913e62
<?xml version="1.0" encoding="utf-8"?>
<
Relative
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<
androidx.constraintlayout.widget.Constraint
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/black"
tools:context=
".ui.activitys.HytechVedioActivity"
>
android:background=
"@color/black"
>
<
ImageView
android:id=
"@+id/
iv_hytechvideo_root
"
<
com.mints.goodmoney.ui.widgets.JZVideoPlayerStandardLoopVideo
android:id=
"@+id/
jzvdStd
"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
<com.mints.highgold.ui.widgets.JZVideoPlayerStandardLoopVideo
android:id=
"@+id/jz_hytechvideo"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
<FrameLayout
android:id=
"@+id/fl_hytechvedio_touch"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/full_transparent"
>
<LinearLayout
android:id=
"@+id/ll_hytechvedio_item"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:layout_marginLeft=
"30pt"
android:layout_marginRight=
"30pt"
android:layout_marginBottom=
"100pt"
android:background=
"@drawable/shape_vedio_white"
android:orientation=
"horizontal"
android:paddingLeft=
"30pt"
android:paddingTop=
"30pt"
android:paddingRight=
"40pt"
android:paddingBottom=
"30pt"
android:visibility=
"invisible"
>
<com.shehuan.niv.NiceImageView
android:id=
"@+id/ic_hytechvideo"
android:layout_width=
"110pt"
android:layout_height=
"110pt"
android:src=
"@mipmap/ic_launcher"
app:corner_radius=
"10dp"
/>
<RelativeLayout
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginLeft=
"10pt"
android:layout_marginRight=
"10pt"
android:layout_weight=
"1"
android:paddingLeft=
"10pt"
>
<TextView
android:id=
"@+id/tv_hytechvideo_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"6pt"
android:textColor=
"@color/black"
android:textSize=
"12sp"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/tv_hytechvideo_subtitle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/tv_hytechvideo_title"
android:textColor=
"@color/loan_tv_choose_paycash_text"
android:textSize=
"10sp"
/>
</RelativeLayout>
<TextView
android:id=
"@+id/tv_hytechvideo_next"
android:layout_width=
"78dp"
android:layout_height=
"32dp"
android:layout_gravity=
"center_vertical"
android:background=
"@drawable/shape_tv_gold"
android:gravity=
"center"
android:text=
"查看"
android:textColor=
"@color/white"
android:textSize=
"10sp"
/>
</LinearLayout>
</FrameLayout>
<RelativeLayout
<ImageView
android:id=
"@+id/ivBack"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_marginTop=
"70pt"
android:layout_marginRight=
"40pt"
>
android:layout_marginLeft=
"4dp"
android:layout_marginTop=
"4dp"
android:padding=
"20dp"
android:src=
"@mipmap/ic_left_arrow"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/tv_hytechvedio_time"
android:layout_width=
"50pt"
android:layout_height=
"50pt"
android:background=
"@drawable/shape_back"
android:gravity=
"center"
android:textColor=
"@color/white"
android:textSize=
"12sp"
/>
<ImageView
android:id=
"@+id/ivSetting"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"20dp"
android:layout_marginBottom=
"100dp"
android:src=
"@mipmap/ic_launcher"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
/>
<ImageView
android:id=
"@+id/iv_hytechvedio_back"
android:layout_width=
"50pt"
android:layout_height=
"50pt"
android:src=
"@mipmap/ic_cancel"
android:visibility=
"gone"
/>
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
GoodMoney/app/src/main/res/layout/fragment_main_kyl.xml
View file @
d7913e62
...
...
@@ -6,7 +6,7 @@
android:orientation=
"vertical"
>
<com.androidkun.xtablayout.XTabLayout
android:id=
"@+id/xtFragment
Xmly
"
android:id=
"@+id/xtFragment
Kyl
"
android:visibility=
"invisible"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
...
...
@@ -22,7 +22,7 @@
app:xTabTextSize=
"14sp"
/>
<com.mints.goodmoney.ui.widgets.MyViewPager
android:id=
"@+id/vpFragment
Xmly
"
android:id=
"@+id/vpFragment
Kyl
"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
...
...
GoodMoney/app/src/main/res/layout/fragment_main_kyl_page.xml
View file @
d7913e62
...
...
@@ -7,7 +7,7 @@
android:orientation=
"vertical"
>
<com.scwang.smartrefresh.layout.SmartRefreshLayout
android:id=
"@+id/srl_
xmly
"
android:id=
"@+id/srl_
kyl
"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
app:srlAccentColor=
"@color/gray"
...
...
@@ -18,7 +18,7 @@
android:layout_height=
"wrap_content"
/>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/
xmlyPageVip
"
android:id=
"@+id/
rvPageKyl
"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginTop=
"6dp"
...
...
GoodMoney/app/src/main/res/layout/item_rv_kyl_page.xml
View file @
d7913e62
...
...
@@ -2,14 +2,14 @@
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_margin=
"
6
dp"
android:layout_margin=
"
4
dp"
android:background=
"@color/white"
android:orientation=
"vertical"
>
<ImageView
android:id=
"@+id/ivXmlyPage"
android:layout_width=
"match_parent"
android:layout_height=
"
18
0dp"
android:layout_height=
"
30
0dp"
android:scaleType=
"fitXY"
android:src=
"@mipmap/bg_eat"
/>
...
...
@@ -27,6 +27,7 @@
android:textStyle=
"bold"
/>
<TextView
android:visibility=
"gone"
android:id=
"@+id/tvXmlyPagecount"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
...
...
GoodMoney/app/src/main/res/layout/item_rv_xmly_page.xml
View file @
d7913e62
...
...
@@ -2,19 +2,21 @@
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_margin=
"6dp"
android:background=
"@color/white"
android:orientation=
"vertical"
>
<ImageView
android:id=
"@+id/iv
Xmly
Page"
<
com.shehuan.niv.Nice
ImageView
android:id=
"@+id/iv
Kyl
Page"
android:layout_width=
"match_parent"
android:layout_height=
"180dp"
android:scaleType=
"fitXY"
android:src=
"@mipmap/bg_eat"
/>
android:src=
"@mipmap/bg_eat"
app:corner_radius=
"10dp"
/>
<TextView
android:id=
"@+id/tv
Xmly
PageContent"
android:id=
"@+id/tv
Kyl
PageContent"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_margin=
"6dp"
...
...
@@ -26,16 +28,4 @@
android:textSize=
"14sp"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/tvXmlyPagecount"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"6dp"
android:layout_marginBottom=
"6dp"
android:drawableLeft=
"@mipmap/ic_headset"
android:drawablePadding=
"6dp"
android:gravity=
"center_vertical"
android:text=
"7.2亿"
android:textColor=
"@color/color_AAA"
android:textSize=
"12sp"
/>
</LinearLayout>
\ No newline at end of file
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