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
0edc09f2
Commit
0edc09f2
authored
May 10, 2021
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去除信息流广告
parent
161702eb
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
55 additions
and
55 deletions
+55
-55
AwardActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
+2
-2
MorningClockActivity.kt
.../com/mints/goodmoney/ui/activitys/MorningClockActivity.kt
+1
-1
WalkActivity.kt
...ain/java/com/mints/goodmoney/ui/activitys/WalkActivity.kt
+1
-1
WaterActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/WaterActivity.kt
+1
-1
BaseActivity.java
...a/com/mints/goodmoney/ui/activitys/base/BaseActivity.java
+1
-1
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+49
-49
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
View file @
0edc09f2
...
...
@@ -77,7 +77,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
pushAward
()
}
initExpress
()
//
initExpress()
initListener
()
initDataView
()
}
...
...
@@ -398,7 +398,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
SoundPoolUtil
.
getInstance
().
onDestory
()
PreLoadExpressManager
.
onDestroy
()
flAwardAd
?.
removeAllViews
()
//
flAwardAd?.removeAllViews()
videoAdingManager
.
setVideoAdingListener
(
null
)
videoAdingManager
.
onDestroy
()
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/MorningClockActivity.kt
View file @
0edc09f2
...
...
@@ -47,7 +47,7 @@ class MorningClockActivity : BaseActivity(), View.OnClickListener, MorningClockV
override
fun
onResume
()
{
super
.
onResume
()
initExpress
()
//
initExpress()
morningClockPresenter
.
getUpEarlySignMsg
()
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/WalkActivity.kt
View file @
0edc09f2
...
...
@@ -37,7 +37,7 @@ class WalkActivity : BaseActivity(), View.OnClickListener, WalkView, StepView.St
override
fun
onResume
()
{
super
.
onResume
()
initExpress
()
//
initExpress()
walkPresenter
.
getWalkMsg
()
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/WaterActivity.kt
View file @
0edc09f2
...
...
@@ -34,7 +34,7 @@ class WaterActivity : BaseActivity(), View.OnClickListener, WaterView.WaterViewL
override
fun
onResume
()
{
super
.
onResume
()
initExpress
()
//
initExpress()
waterPresenter
.
getWaterMsg
()
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/base/BaseActivity.java
View file @
0edc09f2
...
...
@@ -35,7 +35,7 @@ public abstract class BaseActivity extends BaseAppCompatActivity implements Base
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
getWindow
().
addFlags
(
WindowManager
.
LayoutParams
.
FLAG_SECURE
);
//
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);
if
(
android
.
os
.
Build
.
VERSION
.
SDK_INT
!=
Build
.
VERSION_CODES
.
O
)
{
setRequestedOrientation
(
ActivityInfo
.
SCREEN_ORIENTATION_PORTRAIT
);
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
0edc09f2
...
...
@@ -111,8 +111,8 @@ class MyFragment : BaseFragment(),
private
var
mainMyAdapter
:
MainMyAdapter
?
=
null
// Banner
private
var
mAdBannerAdapter
:
AdBannerAdapter
?
=
null
private
var
mBannerData
:
RotationChartBean
?
=
null
//
private var mAdBannerAdapter: AdBannerAdapter? = null
//
private var mBannerData: RotationChartBean? = null
// 高额任务
private
var
mCurrentPkg
:
String
?
=
null
...
...
@@ -144,7 +144,7 @@ class MyFragment : BaseFragment(),
override
fun
onPause
()
{
super
.
onPause
()
banner_view
.
stopAutoScroll
()
//
banner_view.stopAutoScroll()
item_clock_signview
.
stopRedbox
()
}
...
...
@@ -216,7 +216,7 @@ class MyFragment : BaseFragment(),
myPresenter
.
getSignInHomePageMsg
()
myPresenter
.
myHotActivity
()
myPresenter
.
getHallBaseMsg
()
myPresenter
.
myRotationChart
()
//
myPresenter.myRotationChart()
userConfig
=
data
handleRecyData
()
...
...
@@ -365,33 +365,33 @@ class MyFragment : BaseFragment(),
* 设置Banner
*/
override
fun
getMyRotationChartSuc
(
data
:
RotationChartBean
)
{
mBannerData
=
data
if
(
mBannerData
?.
list
==
null
||
mBannerData
?.
list
!!
.
size
==
0
)
{
mAdBannerAdapter
=
null
fl_my_banner
.
visibility
=
View
.
VISIBLE
LogUtil
.
d
(
"TAG"
,
"getMyRotationChartSuc"
)
banner_view
.
visibility
=
View
.
GONE
banner_view
.
stopAutoScroll
()
BannerManager
.
getTtBanner
(
TtCsjAdManager
.
TT_AD_BANNER_MY
,
fl_my_banner
)
}
else
{
fl_my_banner
.
visibility
=
View
.
GONE
banner_view
.
visibility
=
View
.
VISIBLE
mAdBannerAdapter
=
AdBannerAdapter
(
activity
)
mAdBannerAdapter
?.
let
{
val
list
:
MutableList
<
RotationChartBean
.
ListBean
?>
=
mutableListOf
()
list
.
addAll
(
mBannerData
?.
list
!!
)
list
.
add
(
data
.
position
,
null
)
it
.
setOnPageClickListener
(
this
)
it
.
setData
(
list
)
it
.
setAdPosition
(
data
.
position
)
banner_view
.
setAdapter
(
it
)
}
banner_view
.
startAutoScroll
()
}
//
mBannerData = data
//
//
if (mBannerData?.list == null || mBannerData?.list!!.size == 0) {
//
mAdBannerAdapter = null
//
//
fl_my_banner.visibility = View.VISIBLE
//
LogUtil.d("TAG", "getMyRotationChartSuc")
//
banner_view.visibility = View.GONE
//
banner_view.stopAutoScroll()
//
BannerManager.getTtBanner(TtCsjAdManager.TT_AD_BANNER_MY, fl_my_banner)
//
} else {
//
//
fl_my_banner.visibility = View.GONE
//
banner_view.visibility = View.VISIBLE
//
mAdBannerAdapter = AdBannerAdapter(activity)
//
//
mAdBannerAdapter?.let {
//
val list: MutableList<RotationChartBean.ListBean?> = mutableListOf()
//
list.addAll(mBannerData?.list!!)
//
list.add(data.position, null)
//
it.setOnPageClickListener(this)
//
it.setData(list)
//
it.setAdPosition(data.position)
//
banner_view.setAdapter(it)
//
}
//
banner_view.startAutoScroll()
//
}
}
override
fun
onRefresh
(
refreshLayout
:
RefreshLayout
)
{
...
...
@@ -1505,24 +1505,24 @@ class MyFragment : BaseFragment(),
* Banner点击事件
*/
override
fun
onPageClick
(
position
:
Int
)
{
mBannerData
?.
let
{
// 广告不在最后banner展示时,需要position-1,否则加入穿山甲广告导致数据越界
var
serverBannerPosition
=
position
if
(
it
.
list
.
size
!=
it
.
position
)
{
serverBannerPosition
=
position
-
1
}
val
pkg
=
it
.
list
[
serverBannerPosition
].
pkg
if
(!
TextUtils
.
isEmpty
(
pkg
)
&&
AppUtil
.
checkPackInfo
(
requireActivity
(),
pkg
))
{
AppTryPlayManager
.
toTryPlay
(
pkg
)
}
else
{
//未安装
val
bundle
=
Bundle
()
bundle
.
putString
(
WebActivity
.
WEB_TITLE
,
it
.
list
[
serverBannerPosition
].
title
)
bundle
.
putString
(
WebActivity
.
WEB_URL
,
it
.
list
[
serverBannerPosition
].
url
)
readyGo
(
WebActivity
::
class
.
java
,
bundle
)
}
}
//
mBannerData?.let {
//
// 广告不在最后banner展示时,需要position-1,否则加入穿山甲广告导致数据越界
//
var serverBannerPosition = position
//
if (it.list.size != it.position) {
//
serverBannerPosition = position - 1
//
}
//
//
val pkg = it.list[serverBannerPosition].pkg
//
if (!TextUtils.isEmpty(pkg) && AppUtil.checkPackInfo(requireActivity(), pkg)) {
//
AppTryPlayManager.toTryPlay(pkg)
//
} else {
//
//未安装
//
val bundle = Bundle()
//
bundle.putString(WebActivity.WEB_TITLE, it.list[serverBannerPosition].title)
//
bundle.putString(WebActivity.WEB_URL, it.list[serverBannerPosition].url)
//
readyGo(WebActivity::class.java, bundle)
//
}
//
}
}
}
\ 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