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
74fd7d45
Commit
74fd7d45
authored
Apr 16, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.2.3 添加小满科技
parent
8f12c68e
Changes
26
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
203 additions
and
230 deletions
+203
-230
build.gradle
GoodMoney/app/build.gradle
+2
-2
InitAppService.kt
...y/app/src/main/java/com/mints/goodmoney/InitAppService.kt
+0
-1
AppConfig.java
...p/src/main/java/com/mints/goodmoney/common/AppConfig.java
+2
-3
Constant.kt
.../app/src/main/java/com/mints/goodmoney/common/Constant.kt
+4
-0
TtCsjAdManager.java
...main/java/com/mints/goodmoney/manager/TtCsjAdManager.java
+1
-0
YlhAdManager.kt
...src/main/java/com/mints/goodmoney/manager/YlhAdManager.kt
+1
-0
BaseResponse.java
...main/java/com/mints/goodmoney/mvp/model/BaseResponse.java
+0
-1
Presenter.java
...in/java/com/mints/goodmoney/mvp/presenters/Presenter.java
+0
-1
VersionUpdatePresenter.java
...ints/goodmoney/mvp/presenters/VersionUpdatePresenter.java
+0
-1
BaseView.java
...src/main/java/com/mints/goodmoney/mvp/views/BaseView.java
+0
-1
DrawcashActivity.kt
...java/com/mints/goodmoney/ui/activitys/DrawcashActivity.kt
+2
-3
XiaomanActivity.kt
.../java/com/mints/goodmoney/ui/activitys/XiaomanActivity.kt
+187
-191
BannerBaseAdapter.java
...ava/com/mints/goodmoney/ui/adapter/BannerBaseAdapter.java
+0
-1
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+3
-2
BannerView.java
.../main/java/com/mints/goodmoney/ui/widgets/BannerView.java
+0
-2
BaseDialog.java
...ava/com/mints/goodmoney/ui/widgets/dialog/BaseDialog.java
+0
-1
LoadingDialog.java
.../com/mints/goodmoney/ui/widgets/dialog/LoadingDialog.java
+0
-1
BubbleConfigBuilder.java
...nts/goodmoney/ui/widgets/seekbar/BubbleConfigBuilder.java
+0
-1
RotateListener.java
...odmoney/ui/widgets/wheelsruf/listener/RotateListener.java
+0
-1
WheelSurfPanView.java
...goodmoney/ui/widgets/wheelsruf/view/WheelSurfPanView.java
+0
-4
WheelSurfView.java
...ts/goodmoney/ui/widgets/wheelsruf/view/WheelSurfView.java
+0
-4
MiscUtil.java
...app/src/main/java/com/mints/goodmoney/utils/MiscUtil.java
+0
-4
PermissionUtils.java
.../main/java/com/mints/goodmoney/utils/PermissionUtils.java
+0
-2
ToastUtil.java
...pp/src/main/java/com/mints/goodmoney/utils/ToastUtil.java
+0
-1
ToolUtil.java
...app/src/main/java/com/mints/goodmoney/utils/ToolUtil.java
+0
-1
build.gradle
GoodMoney/build.gradle
+1
-1
No files found.
GoodMoney/app/build.gradle
View file @
74fd7d45
...
...
@@ -15,8 +15,8 @@ android {
applicationId
"com.mints.goodmoney"
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
versionCode
2
3
versionName
"1.2.
2
"
versionCode
2
4
versionName
"1.2.
3
"
flavorDimensions
"default"
// dex突破65535的限制
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/InitAppService.kt
View file @
74fd7d45
...
...
@@ -9,7 +9,6 @@ import cn.jpush.android.api.JPushInterface
import
com.downloader.PRDownloader
import
com.downloader.PRDownloaderConfig
import
com.mints.goodmoney.manager.BxmManager.initBxm
import
com.mints.goodmoney.ui.widgets.CircleImageView
import
com.mob.MobSDK
/**
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/common/AppConfig.java
View file @
74fd7d45
...
...
@@ -3,7 +3,6 @@ package com.mints.goodmoney.common;
/**
* 描述:配置app设置开关
* 作者:孟崔广
* 时间:2017/10/10 17:51
* 邮箱:mengcga@163.com
*/
public
class
AppConfig
{
...
...
@@ -84,11 +83,11 @@ public class AppConfig {
/**
* csjFull 剩余广告播放数
*/
public
static
int
csjFullVideoAdCount
=
5
;
public
static
int
csjFullVideoAdCount
=
0
;
/**
* flVideo 剩余广告播放数
*/
public
static
int
flVideoAdCount
=
5
;
public
static
int
flVideoAdCount
=
0
;
/**
* shVideo 剩余广告播放数
*/
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/common/Constant.kt
View file @
74fd7d45
...
...
@@ -251,4 +251,8 @@ object Constant {
// 蘑菇星球引导页
const
val
MOKU_FLAG_GUIDE
=
"moku_flag_guide"
//page
const
val
ACTIVITY_ID
=
"activity_id"
const
val
ACTIVITY_TITLE
=
"activity_title"
}
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/TtCsjAdManager.java
View file @
74fd7d45
...
...
@@ -44,6 +44,7 @@ public class TtCsjAdManager {
public
static
String
TT_AD_VEDIO_SMALLHOMEVEDIO
=
"945744186"
;
// 短视频翻倍
public
static
String
TT_AD_VEDIO_KYLVEDIO
=
"945791766"
;
// 来电秀视频
public
static
String
TT_AD_VEDIO_READ
=
"945997554"
;
// 听读
public
static
String
TT_AD_VEDIO_XIAOMAN
=
"946012845"
;
// 小满科技
/*全屏视频*/
public
static
String
TT_AD_FULLVEDIO_ALL
=
"945752969"
;
// 通用
/*信息流*/
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/YlhAdManager.kt
View file @
74fd7d45
...
...
@@ -36,6 +36,7 @@ object YlhAdManager {
var
YLH_AD_VEDIO_HOMEVEDIO_POSTID
=
"4051451341464487"
// 首页视频翻倍
var
YLH_AD_VEDIO_SMALLHOMEVEDIO_POSTID
=
"9051152341362610"
// 短视频翻倍
var
YLH_AD_VEDIO_KYLVEDIO_POSTID
=
"8001950728967276"
// 来电秀视频
var
YLH_AD_VEDIO_XIAOMAN_POSTID
=
"3081971852112087"
// 小满科技
/*信息流*/
var
YLH_AD_NATIVEEXPRESS_JULEYUN
=
"8041941770890627"
//聚乐云
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/model/BaseResponse.java
View file @
74fd7d45
...
...
@@ -5,7 +5,6 @@ import java.io.Serializable;
/**
* 描述:BaseResponse
* 作者:孟崔广
* 时间:2017/10/10 10:51
* 邮箱:mengcga@163.com
*/
public
class
BaseResponse
<
T
>
implements
Serializable
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/Presenter.java
View file @
74fd7d45
...
...
@@ -3,7 +3,6 @@ package com.mints.goodmoney.mvp.presenters;
/**
* 描述:Presenter
* 作者:孟崔广
* 时间:2017/10/10 10:51
* 邮箱:mengcga@163.com
*/
public
interface
Presenter
<
V
>
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/VersionUpdatePresenter.java
View file @
74fd7d45
...
...
@@ -43,7 +43,6 @@ import rx.android.schedulers.AndroidSchedulers;
/**
* 描述:版本更新
* 作者:孟崔广
* 时间:2017/10/10 10:51
* 邮箱:mengcga@163.com
*/
public
class
VersionUpdatePresenter
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/views/BaseView.java
View file @
74fd7d45
...
...
@@ -5,7 +5,6 @@ import com.mints.goodmoney.MintsApplication;
/**
* 描述:BaseView
* 作者:孟崔广
* 时间:2017/10/10 17:51
* 邮箱:mengcga@163.com
*/
public
interface
BaseView
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/DrawcashActivity.kt
View file @
74fd7d45
...
...
@@ -318,9 +318,8 @@ class DrawcashActivity : BaseActivity(),
"ksWeight:${data.kS_VEDIO}"
)
// 广告视频数
AppConfig
.
csjVideoAdCount
=
10
AppConfig
.
ylhAdCount
=
10
AppConfig
.
csjFullVideoAdCount
=
10
AppConfig
.
csjVideoAdCount
=
5
AppConfig
.
ylhAdCount
=
5
}
/**
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/XiaomanActivity.kt
View file @
74fd7d45
...
...
@@ -21,6 +21,9 @@ import com.bytedance.sdk.openadsdk.TTRewardVideoAd
import
com.google.gson.Gson
import
com.mints.goodmoney.R
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.manager.TtCsjAdManager
import
com.mints.goodmoney.manager.UserManager
import
com.mints.goodmoney.manager.YlhAdManager
import
com.mints.goodmoney.mvp.model.JsBridgeBean
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.qq.e.ads.banner2.UnifiedBannerADListener
...
...
@@ -36,8 +39,8 @@ import kotlinx.android.synthetic.main.header_layout.*
class
XiaomanActivity
:
BaseActivity
(),
View
.
OnClickListener
{
private
var
carrierType
=
""
//传入载体
private
var
carrierType_title
=
""
//传入载体
private
var
placeId
=
""
//
private
var
activityTitle
=
""
//
private
var
isPlaySuccess
=
false
private
var
rewardVideoAD
:
RewardVideoAD
?
=
null
private
var
unifiedBannerView
:
UnifiedBannerView
?
=
null
...
...
@@ -60,14 +63,14 @@ class XiaomanActivity : BaseActivity(), View.OnClickListener {
override
fun
getBundleExtras
(
extras
:
Bundle
?)
{
super
.
getBundleExtras
(
extras
)
extras
?.
let
{
carrierType
=
it
.
getString
(
Constant
.
MAIN_CARRIER_TYPE
,
""
)
carrierType_title
=
it
.
getString
(
Constant
.
MAIN_CARRIER
_TITLE
,
""
)
placeId
=
it
.
getString
(
Constant
.
ACTIVITY_ID
,
""
)
activityTitle
=
it
.
getString
(
Constant
.
ACTIVITY
_TITLE
,
""
)
}
}
override
fun
initViewsAndEvents
()
{
iv_left_icon
.
visibility
=
View
.
VISIBLE
iv_left_icon
.
setImageResource
(
R
.
mipmap
.
ic_arrow_back
)
tv_title
.
text
=
carrierType_t
itle
tv_title
.
text
=
activityT
itle
initListener
()
/**
* CampaignFragment.newInstance("这里为userId")
...
...
@@ -76,7 +79,7 @@ class XiaomanActivity : BaseActivity(), View.OnClickListener {
*/
val
fragment
=
CampaignFragment
.
newInstance
(
System
.
currentTimeMillis
().
toString
()
+
""
)
// fragment.setPlaceId(intent.getStringExtra("placeId"))
fragment
.
setPlaceId
(
carrierType
)
fragment
.
setPlaceId
(
placeId
)
// fragment.setPlaceId("3497")
fragment
.
setCallback
(
object
:
CampaignCallback
()
{
...
...
@@ -109,10 +112,10 @@ class XiaomanActivity : BaseActivity(), View.OnClickListener {
return
}
when
(
bean
.
adType
)
{
"4"
->
loadCSJBannerAd
(
fragment
,
bean
)
//穿山甲激励视频
"5"
->
loadGDTBannerAd
(
fragment
,
bean
)
//广点通激励视频
"13"
->
loadCSJBannerAd
(
fragment
,
bean
)
//穿山甲横幅
"14"
->
loadGDTNativeExpressAd
(
fragment
,
bean
)
//广点通横幅
//
"4" -> loadCSJBannerAd(fragment, bean)//穿山甲激励视频
//
"5" -> loadGDTBannerAd(fragment, bean)//广点通激励视频
//
"13" -> loadCSJBannerAd(fragment, bean)//穿山甲横幅
//
"14" -> loadGDTNativeExpressAd(fragment, bean)//广点通横幅
}
}
...
...
@@ -163,68 +166,68 @@ class XiaomanActivity : BaseActivity(), View.OnClickListener {
* @param fragment
* @param bean
*/
private
fun
loadGDTNativeExpressAd
(
fragment
:
CampaignFragment
,
bean
:
JsBridgeBean
)
{
// 创建广告
mNativeExpressAD2
=
NativeExpressAD2
(
applicationContext
,
"3081971852112087
"
,
object
:
NativeExpressAD2
.
AdLoadListener
{
override
fun
onLoadSuccess
(
list
:
List
<
NativeExpressADData2
>)
{
fragment
.
setBannerLoad
(
bean
.
requestId
)
gdtBannerRenderAd
(
fragment
,
bean
,
list
)
}
override
fun
onNoAD
(
adError
:
AdError
)
{
fragment
.
setBannerError
(
bean
.
requestId
)
}
})
mNativeExpressAD2
?.
setAdSize
(
390
,
0
)
// 单位dp
mNativeExpressAD2
?.
loadAd
(
1
)
destroyAd
()
bannerContainer
?.
removeAllViews
()
}
//
private fun loadGDTNativeExpressAd(fragment: CampaignFragment, bean: JsBridgeBean) {
//
//
// 创建广告
// mNativeExpressAD2 = NativeExpressAD2(applicationContext, "
", object : NativeExpressAD2.AdLoadListener {
//
override fun onLoadSuccess(list: List<NativeExpressADData2>) {
//
fragment.setBannerLoad(bean.requestId)
//
gdtBannerRenderAd(fragment, bean, list)
//
}
//
//
override fun onNoAD(adError: AdError) {
//
fragment.setBannerError(bean.requestId)
//
}
//
})
//
mNativeExpressAD2?.setAdSize(390, 0) // 单位dp
//
mNativeExpressAD2?.loadAd(1)
//
destroyAd()
//
bannerContainer?.removeAllViews()
//
}
/**
* 渲染广告
* @param adDataList
*/
private
fun
gdtBannerRenderAd
(
fragment
:
CampaignFragment
,
bean
:
JsBridgeBean
,
adDataList
:
List
<
NativeExpressADData2
>)
{
if
(
adDataList
.
size
>
0
)
{
bannerContainer
?.
removeAllViews
()
mNativeExpressADData2
=
adDataList
[
0
]
mNativeExpressADData2
?.
setAdEventListener
(
object
:
AdEventListener
{
override
fun
onClick
()
{
Log
.
i
(
TAG
,
"onClick: $mNativeExpressADData2"
)
fragment
.
setBannerClick
(
bean
.
requestId
)
}
override
fun
onExposed
()
{
Log
.
i
(
TAG
,
"onImpression: $mNativeExpressADData2"
)
fragment
.
setBannerExpose
(
bean
.
requestId
)
}
override
fun
onRenderSuccess
()
{
Log
.
i
(
TAG
,
"onRenderSuccess: $mNativeExpressADData2"
)
bannerContainer
?.
removeAllViews
()
if
(
mNativeExpressADData2
?.
getAdView
()
!=
null
)
{
bannerContainer
?.
addView
(
mNativeExpressADData2
?.
getAdView
())
}
}
override
fun
onRenderFail
()
{
Log
.
i
(
TAG
,
"onRenderFail: $mNativeExpressADData2"
)
fragment
.
setBannerError
(
bean
.
requestId
)
}
override
fun
onAdClosed
()
{
Log
.
i
(
TAG
,
"onAdClosed: $mNativeExpressADData2"
)
fragment
.
setBannerClose
(
bean
.
requestId
)
bannerContainer
?.
removeAllViews
()
mNativeExpressADData2
?.
destroy
()
}
})
mNativeExpressADData2
!!
.
render
()
}
}
//
private fun gdtBannerRenderAd(fragment: CampaignFragment, bean: JsBridgeBean, adDataList: List<NativeExpressADData2>) {
//
if (adDataList.size > 0) {
//
bannerContainer?.removeAllViews()
//
mNativeExpressADData2 = adDataList[0]
//
mNativeExpressADData2?.setAdEventListener(object : AdEventListener {
//
override fun onClick() {
//
Log.i(TAG, "onClick: $mNativeExpressADData2")
//
fragment.setBannerClick(bean.requestId)
//
}
//
//
override fun onExposed() {
//
Log.i(TAG, "onImpression: $mNativeExpressADData2")
//
fragment.setBannerExpose(bean.requestId)
//
}
//
//
override fun onRenderSuccess() {
//
Log.i(TAG, "onRenderSuccess: $mNativeExpressADData2")
//
bannerContainer?.removeAllViews()
//
if (mNativeExpressADData2?.getAdView() != null) {
//
bannerContainer?.addView(mNativeExpressADData2?.getAdView())
//
}
//
}
//
//
override fun onRenderFail() {
//
Log.i(TAG, "onRenderFail: $mNativeExpressADData2")
//
fragment.setBannerError(bean.requestId)
//
}
//
//
override fun onAdClosed() {
//
Log.i(TAG, "onAdClosed: $mNativeExpressADData2")
//
fragment.setBannerClose(bean.requestId)
//
bannerContainer?.removeAllViews()
//
mNativeExpressADData2?.destroy()
//
}
//
})
//
mNativeExpressADData2!!.render()
//
}
//
}
/**
...
...
@@ -233,11 +236,7 @@ class XiaomanActivity : BaseActivity(), View.OnClickListener {
* @param bean
*/
private
fun
loadGDTRewardVideo
(
fragment
:
CampaignFragment
,
bean
:
JsBridgeBean
)
{
var
pid
=
bean
.
pid
// TODO: 2021/1/8 demo中代码位写死, 媒体注意替换
pid
=
"3081971852112087"
val
appId
=
"1111046903"
rewardVideoAD
=
RewardVideoAD
(
applicationContext
,
appId
,
pid
,
object
:
RewardVideoADListener
{
rewardVideoAD
=
RewardVideoAD
(
applicationContext
,
YlhAdManager
.
YLH_AD_APPID
,
bean
.
pid
,
object
:
RewardVideoADListener
{
override
fun
onADLoad
()
{
Log
.
e
(
TAG
,
"onADLoad"
)
rewardVideoAD
?.
showAD
()
...
...
@@ -294,52 +293,52 @@ class XiaomanActivity : BaseActivity(), View.OnClickListener {
* @param fragment
* @param bean
*/
private
fun
loadGDTBannerAd
(
fragment
:
CampaignFragment
?,
bean
:
JsBridgeBean
)
{
var
pid
=
bean
.
pid
// TODO: 2021/1/8 demo中代码位写死, 媒体注意替换
pid
=
"3081971852112087
"
//广点通底部Banner
unifiedBannerView
=
UnifiedBannerView
(
this
@XiaomanActivity
,
pid
,
object
:
UnifiedBannerADListener
{
override
fun
onNoAD
(
adError
:
AdError
)
{
Log
.
e
(
TAG
,
"广告加载失败: onNoAD"
)
fragment
?.
setBannerError
(
bean
.
requestId
)
}
override
fun
onADReceive
()
{
Log
.
e
(
TAG
,
"广告加载成功回调: onADReceive"
)
fragment
?.
setBannerLoad
(
bean
.
requestId
)
}
override
fun
onADExposure
()
{
Log
.
e
(
TAG
,
"广告曝光: onADExposure"
)
//2.2.7.1 曝光上报,在活动入口渲染完成后必须调用
fragment
?.
setBannerExpose
(
bean
.
requestId
)
}
override
fun
onADClosed
()
{
Log
.
e
(
TAG
,
"广告关闭: onADClosed"
)
fragment
?.
setBannerClose
(
bean
.
requestId
)
}
override
fun
onADClicked
()
{
Log
.
e
(
TAG
,
"广告点击: onADClicked"
)
//2.2.7.2 点击上报,活动入口点击时进行调用必须调用
fragment
?.
setBannerClick
(
bean
.
requestId
)
}
override
fun
onADLeftApplication
()
{
Log
.
e
(
TAG
,
"广告点击离开 APP : onADLeftApplication"
)
}
override
fun
onADOpenOverlay
()
{
Log
.
e
(
TAG
,
"广告打开浮层: onADOpenOverlay"
)
}
override
fun
onADCloseOverlay
()
{
Log
.
e
(
TAG
,
"广告浮层关闭: onADCloseOverlay"
)
}
})
bannerContainer
?.
addView
(
unifiedBannerView
,
getUnifiedBannerLayoutParams
())
unifiedBannerView
!!
.
loadAD
()
}
//
private fun loadGDTBannerAd(fragment: CampaignFragment?, bean: JsBridgeBean) {
//
var pid = bean.pid
//
// TODO: 2021/1/8 demo中代码位写死, 媒体注意替换
// pid = "
"
//
//广点通底部Banner
//
unifiedBannerView = UnifiedBannerView(this@XiaomanActivity, pid, object : UnifiedBannerADListener {
//
override fun onNoAD(adError: AdError) {
//
Log.e(TAG, "广告加载失败: onNoAD")
//
fragment?.setBannerError(bean.requestId)
//
}
//
//
override fun onADReceive() {
//
Log.e(TAG, "广告加载成功回调: onADReceive")
//
fragment?.setBannerLoad(bean.requestId)
//
}
//
//
override fun onADExposure() {
//
Log.e(TAG, "广告曝光: onADExposure")//2.2.7.1 曝光上报,在活动入口渲染完成后必须调用
//
fragment?.setBannerExpose(bean.requestId)
//
}
//
//
override fun onADClosed() {
//
Log.e(TAG, "广告关闭: onADClosed")
//
fragment?.setBannerClose(bean.requestId)
//
}
//
//
override fun onADClicked() {
//
Log.e(TAG, "广告点击: onADClicked")//2.2.7.2 点击上报,活动入口点击时进行调用必须调用
//
fragment?.setBannerClick(bean.requestId)
//
}
//
//
override fun onADLeftApplication() {
//
Log.e(TAG, "广告点击离开 APP : onADLeftApplication")
//
}
//
//
override fun onADOpenOverlay() {
//
Log.e(TAG, "广告打开浮层: onADOpenOverlay")
//
}
//
//
override fun onADCloseOverlay() {
//
Log.e(TAG, "广告浮层关闭: onADCloseOverlay")
//
}
//
})
//
bannerContainer?.addView(unifiedBannerView, getUnifiedBannerLayoutParams())
//
unifiedBannerView!!.loadAD()
//
}
/**
* 加载穿山甲视频广告
...
...
@@ -347,15 +346,12 @@ class XiaomanActivity : BaseActivity(), View.OnClickListener {
* @param bean
*/
private
fun
loadBytedanceAd
(
fragment
:
CampaignFragment
,
bean
:
JsBridgeBean
)
{
//2.2.9.2 广告数据上报//底部穿山甲banner
var
pid
=
bean
.
pid
// TODO: 2021/1/8 demo中代码位写死, 媒体注意替换
pid
=
"946012845"
val
adSlot
=
AdSlot
.
Builder
()
.
setCodeId
(
pid
)
// 这里要替换成 bean.pid
.
setCodeId
(
bean
.
pid
)
// 这里要替换成 bean.pid
.
setAdCount
(
1
)
//个性化模板广告需要设置期望个性化模板广告的大小,单位dp,激励视频场景,只要设置的值大于0即可
.
setExpressViewAcceptedSize
(
500f
,
500f
)
.
setImageAcceptedSize
(
1080
,
1920
)
//非必传参数,仅奖励发放服务端回调时需要使用
.
setUserID
(
"user123"
)
//非必传参数,仅奖励发放服务端回调时需要使用
.
setUserID
(
UserManager
.
getInstance
().
userID
)
//非必传参数,仅奖励发放服务端回调时需要使用
.
setMediaExtra
(
"media_extra"
)
.
build
()
val
mTTAdNative
=
TTAdSdk
.
getAdManager
().
createAdNative
(
applicationContext
)
...
...
@@ -425,36 +421,36 @@ class XiaomanActivity : BaseActivity(), View.OnClickListener {
* @param fragment
* @param bean
*/
private
fun
loadCSJBannerAd
(
fragment
:
CampaignFragment
,
bean
:
JsBridgeBean
)
{
val
mTTAdNative
=
TTAdSdk
.
getAdManager
().
createAdNative
(
applicationContext
)
//2.2.9.3穿山甲底部banner
var
pid
=
bean
.
pid
// 在demo中,为了方便测试,写死.媒体在实际应用中注意替换
pid
=
"946012845"
val
adSlot
=
AdSlot
.
Builder
()
.
setCodeId
(
pid
)
//广告位id
.
setSupportDeepLink
(
true
)
.
setAdCount
(
1
)
//请求广告数量为1到3条
.
setExpressViewAcceptedSize
(
600f
,
0f
)
//期望模板广告view的size,单位dp
.
build
()
mTTAdNative
.
loadBannerExpressAd
(
adSlot
,
object
:
TTAdNative
.
NativeExpressAdListener
{
//请求失败回调
override
fun
onError
(
code
:
Int
,
message
:
String
)
{
fragment
.
setBannerError
(
bean
.
requestId
)
}
//请求成功回调
override
fun
onNativeExpressAdLoad
(
ads
:
List
<
TTNativeExpressAd
>)
{
if
(
ads
==
null
||
ads
.
size
==
0
)
{
return
}
fragment
.
setBannerLoad
(
bean
.
requestId
)
mTTAd
=
ads
[
0
]
mTTAd
?.
setSlideIntervalTime
(
30
*
1000
)
//设置轮播间隔 ms,不调用则不进行轮播展示
bindBytedanceBannerAdListener
(
fragment
,
bean
,
mTTAd
!!
)
mTTAd
?.
render
()
//调用render开始渲染广告
}
})
}
//
private fun loadCSJBannerAd(fragment: CampaignFragment, bean: JsBridgeBean) {
//
val mTTAdNative = TTAdSdk.getAdManager().createAdNative(applicationContext)//2.2.9.3穿山甲底部banner
//
var pid = bean.pid
//
// 在demo中,为了方便测试,写死.媒体在实际应用中注意替换
//
pid = "946012845"
//
val adSlot = AdSlot.Builder()
//
.setCodeId(pid) //广告位id
//
.setSupportDeepLink(true)
//
.setAdCount(1) //请求广告数量为1到3条
//
.setExpressViewAcceptedSize(600f, 0f) //期望模板广告view的size,单位dp
//
.build()
//
mTTAdNative.loadBannerExpressAd(adSlot, object : TTAdNative.NativeExpressAdListener {
//
//请求失败回调
//
override fun onError(code: Int, message: String) {
//
fragment.setBannerError(bean.requestId)
//
}
//
//
//请求成功回调
//
override fun onNativeExpressAdLoad(ads: List<TTNativeExpressAd>) {
//
if (ads == null || ads.size == 0) {
//
return
//
}
//
fragment.setBannerLoad(bean.requestId)
//
mTTAd = ads[0]
//
mTTAd?.setSlideIntervalTime(30 * 1000) //设置轮播间隔 ms,不调用则不进行轮播展示
//
bindBytedanceBannerAdListener(fragment, bean, mTTAd!!)
//
mTTAd?.render() //调用render开始渲染广告
//
}
//
})
//
}
/**
* 绑定穿山甲banner类型监听
...
...
@@ -462,31 +458,31 @@ class XiaomanActivity : BaseActivity(), View.OnClickListener {
* @param bean
* @param ad
*/
private
fun
bindBytedanceBannerAdListener
(
fragment
:
CampaignFragment
,
bean
:
JsBridgeBean
,
ad
:
TTNativeExpressAd
)
{
//绑定穿山甲banner监听
ad
.
setExpressInteractionListener
(
object
:
TTNativeExpressAd
.
ExpressAdInteractionListener
{
override
fun
onAdClicked
(
view
:
View
,
type
:
Int
)
{
fragment
.
setBannerClick
(
bean
.
requestId
)
}
override
fun
onAdShow
(
view
:
View
,
type
:
Int
)
{}
override
fun
onRenderFail
(
view
:
View
,
msg
:
String
,
code
:
Int
)
{
fragment
.
setBannerError
(
bean
.
requestId
)
}
override
fun
onRenderSuccess
(
view
:
View
,
width
:
Float
,
height
:
Float
)
{
fragment
.
setBannerExpose
(
bean
.
requestId
)
//在渲染成功回调时展示广告,提升体验
bannerContainer
?.
removeAllViews
()
bannerContainer
?.
addView
(
view
)
}
})
//dislike设置
bindDislike
(
fragment
,
bean
,
ad
)
if
(
ad
.
interactionType
!=
TTAdConstant
.
INTERACTION_TYPE_DOWNLOAD
)
{
return
}
}
//
private fun bindBytedanceBannerAdListener(fragment: CampaignFragment, bean: JsBridgeBean, ad: TTNativeExpressAd) {//绑定穿山甲banner监听
//
ad.setExpressInteractionListener(object : TTNativeExpressAd.ExpressAdInteractionListener {
//
override fun onAdClicked(view: View, type: Int) {
//
fragment.setBannerClick(bean.requestId)
//
}
//
//
override fun onAdShow(view: View, type: Int) {}
//
override fun onRenderFail(view: View, msg: String, code: Int) {
//
fragment.setBannerError(bean.requestId)
//
}
//
//
override fun onRenderSuccess(view: View, width: Float, height: Float) {
//
fragment.setBannerExpose(bean.requestId)
//
//在渲染成功回调时展示广告,提升体验
//
bannerContainer?.removeAllViews()
//
bannerContainer?.addView(view)
//
}
//
})
//
//
//dislike设置
//
bindDislike(fragment, bean, ad)
//
if (ad.interactionType != TTAdConstant.INTERACTION_TYPE_DOWNLOAD) {
//
return
//
}
//
}
/**
* 穿山甲banner广告关闭事件绑定
...
...
@@ -494,20 +490,20 @@ class XiaomanActivity : BaseActivity(), View.OnClickListener {
* @param bean
* @param ad
*/
private
fun
bindDislike
(
fragment
:
CampaignFragment
,
bean
:
JsBridgeBean
,
ad
:
TTNativeExpressAd
)
{
//使用默认个性化模板中默认dislike弹出样式
ad
.
setDislikeCallback
(
this
@XiaomanActivity
,
object
:
TTAdDislike
.
DislikeInteractionCallback
{
override
fun
onSelected
(
position
:
Int
,
value
:
String
)
{
//用户选择不喜欢原因后,移除广告展示
fragment
.
setBannerClose
(
bean
.
requestId
)
bannerContainer
?.
removeAllViews
()
}
override
fun
onCancel
()
{}
override
fun
onRefuse
()
{}
})
}
//
private fun bindDislike(fragment: CampaignFragment, bean: JsBridgeBean, ad: TTNativeExpressAd) {
//
//
//使用默认个性化模板中默认dislike弹出样式
//
ad.setDislikeCallback(this@XiaomanActivity, object : TTAdDislike.DislikeInteractionCallback {
//
override fun onSelected(position: Int, value: String) {
//
//用户选择不喜欢原因后,移除广告展示
//
fragment.setBannerClose(bean.requestId)
//
bannerContainer?.removeAllViews()
//
}
//
//
override fun onCancel() {}
//
override fun onRefuse() {}
//
})
//
}
override
fun
onBackPressed
()
{
finish
()
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/adapter/BannerBaseAdapter.java
View file @
74fd7d45
...
...
@@ -21,7 +21,6 @@ import java.util.List;
/**
* @author Pinger
* @since 2017/3/8 0008 下午 6:29
* ViewPager基类适配器,需要传入Item视图和数据
*/
public
abstract
class
BannerBaseAdapter
<
T
>
extends
PagerAdapter
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
74fd7d45
...
...
@@ -949,8 +949,8 @@ class MyFragment : BaseFragment(),
Constant
.
HOT_ACTIVITY_SHEEP
->
{
XmManager
.
exprotClick
(
hotBean
.
xmPlaceId
)
val
bundle
=
Bundle
()
bundle
.
putString
(
Constant
.
MAIN_CARRIER
_TITLE
,
hotBean
.
title
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
hotBean
.
xmPlaceId
)
bundle
.
putString
(
Constant
.
ACTIVITY
_TITLE
,
hotBean
.
title
)
bundle
.
putString
(
Constant
.
ACTIVITY_ID
,
hotBean
.
xmPlaceId
)
readyGo
(
XiaomanActivity
::
class
.
java
,
bundle
)
}
Constant
.
HOT_ACTIVITY_WATER
->
{
...
...
@@ -1284,6 +1284,7 @@ class MyFragment : BaseFragment(),
AppConfig
.
shVideoAdCount
=
data
.
vedioRules
.
corAl_VIDEO
.
surplus
AppConfig
.
ksVideoAdCount
=
data
.
vedioRules
.
kS_VEDIO
.
surplus
AppConfig
.
rtaVideoAdCount
=
data
.
vedioRules
.
rtA_VEDIO
.
surplus
AppConfig
.
csjFullVideoAdCount
=
data
.
vedioRules
.
csjfulL_VEDIO
.
surplus
LogUtil
.
d
(
TAG
,
"首页视频数:csjCount:${AppConfig.csjVideoAdCount} "
+
"ylhCount:${AppConfig.ylhAdCount} "
+
"sdhzCount:${AppConfig.wnVideoAdCount} "
+
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/widgets/BannerView.java
View file @
74fd7d45
...
...
@@ -3,7 +3,6 @@ package com.mints.goodmoney.ui.widgets;
/*
* Author: renjinlong
* Email: chinarenlong@foxmail.com
* Date: 2017/8/15
* Description:
*/
...
...
@@ -38,7 +37,6 @@ import java.lang.reflect.Field;
/**
* @author Pinger
* @since 2017/3/8 0008 下午 3:26
* 自定义无限轮转的海报控件,抽离了适配器和滑动事件,更加轻便。
* 请在布局使用当前类,相关属性可以通过布局或者代码设置,
* 适配器继承BannerBaseAdapter,指定数据类型,填充布局即可
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/widgets/dialog/BaseDialog.java
View file @
74fd7d45
...
...
@@ -10,7 +10,6 @@ import androidx.annotation.StyleRes;
/**
* 描述:dialog屏幕适配
* 作者:孟崔广
* 时间:2017/10/10 17:51
* 邮箱:mengcga@163.com
*/
public
abstract
class
BaseDialog
extends
Dialog
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/widgets/dialog/LoadingDialog.java
View file @
74fd7d45
...
...
@@ -18,7 +18,6 @@ import com.mints.goodmoney.R;
/**
* 描述:加载中dialog
* 作者:孟崔广
* 时间:2017/10/10 17:51
* 邮箱:mengcga@163.com
*/
public
class
LoadingDialog
extends
Dialog
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/widgets/seekbar/BubbleConfigBuilder.java
View file @
74fd7d45
...
...
@@ -11,7 +11,6 @@ import static com.mints.goodmoney.ui.widgets.seekbar.BubbleUtils.sp2px;
/**
* config BubbleSeekBar's attributes
* <p/>
* Created by woxingxiao on 2017-03-14.
*/
public
class
BubbleConfigBuilder
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/widgets/wheelsruf/listener/RotateListener.java
View file @
74fd7d45
...
...
@@ -4,7 +4,6 @@ import android.animation.ValueAnimator;
import
android.widget.ImageView
;
/**
* Created by cretin on 2017/12/27.
* 用于回调动画过程和结果
*/
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/widgets/wheelsruf/view/WheelSurfPanView.java
View file @
74fd7d45
...
...
@@ -27,10 +27,6 @@ import com.mints.goodmoney.ui.widgets.wheelsruf.listener.RotateListener;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* Created by cretin on 2017/12/26.
*/
public
class
WheelSurfPanView
extends
View
{
private
Context
mContext
;
//记录视图的大小
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/widgets/wheelsruf/view/WheelSurfView.java
View file @
74fd7d45
...
...
@@ -19,10 +19,6 @@ import com.mints.goodmoney.ui.widgets.wheelsruf.listener.RotateListener;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* Created by cretin on 2017/12/26.
*/
public
class
WheelSurfView
extends
RelativeLayout
{
//当前的圆盘VIew
private
WheelSurfPanView
mWheelSurfPanView
;
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/utils/MiscUtil.java
View file @
74fd7d45
...
...
@@ -4,10 +4,6 @@ import android.content.Context;
import
android.graphics.Paint
;
import
android.view.View
;
/**
* Created by littlejie on 2017/2/22.
*/
public
class
MiscUtil
{
/**
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/utils/PermissionUtils.java
View file @
74fd7d45
...
...
@@ -15,8 +15,6 @@ import java.util.List;
/**
* Desction:授权工具类
* Author:pengjianbo
* Date:2017/1/15 AM2:39
*/
public
class
PermissionUtils
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/utils/ToastUtil.java
View file @
74fd7d45
...
...
@@ -16,7 +16,6 @@ import com.mints.goodmoney.R;
/**
* 描述:Toast
* 作者:孟崔广
* 时间:2017/10/10 17:51
* 邮箱:mengcga@163.com
*/
public
class
ToastUtil
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/utils/ToolUtil.java
View file @
74fd7d45
...
...
@@ -181,7 +181,6 @@ public class ToolUtil {
* 数字格式化显示
* 小于万默认显示 大于万以1.7万方式显示最大是9999.9万
* 大于亿以1.1亿方式显示最大没有限制都是亿单位
* make by dongxh 2017年12月28日上午10:05:22
* </pre>
*
* @param num 格式化的数字
...
...
GoodMoney/build.gradle
View file @
74fd7d45
...
...
@@ -53,8 +53,8 @@ buildscript {
url
'http://maven.aliyun.com/nexus/content/repositories/releases/'
}
// 添加小满科技
maven
{
url
'http://maven.aliyun.com/nexus/content/repositories/jcenter'
}
maven
{
url
"https://jitpack.io"
}
maven
{
url
"https://maven.google.com"
}
maven
{
url
"https://maven.linzhuxin.com/repository/lzoom_read_sdk_prd/"
}
}
...
...
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