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
43da4807
Commit
43da4807
authored
Apr 15, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化banner点击
parent
7e38fad0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+10
-4
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
43da4807
...
@@ -1510,14 +1510,20 @@ class MyFragment : BaseFragment(),
...
@@ -1510,14 +1510,20 @@ class MyFragment : BaseFragment(),
*/
*/
override
fun
onPageClick
(
position
:
Int
)
{
override
fun
onPageClick
(
position
:
Int
)
{
mBannerData
?.
let
{
mBannerData
?.
let
{
val
pkg
=
it
.
list
[
position
].
pkg
// 广告不在最后banner展示时,需要position-1,否则加入穿山甲广告导致数据越界
if
(!
TextUtils
.
isEmpty
(
pkg
)
&&
AppUtil
.
checkPackInfo
(
activity
!!
,
pkg
))
{
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
)
AppTryPlayManager
.
toTryPlay
(
pkg
)
}
else
{
}
else
{
//未安装
//未安装
val
bundle
=
Bundle
()
val
bundle
=
Bundle
()
bundle
.
putString
(
WebActivity
.
WEB_TITLE
,
it
.
list
[
p
osition
].
title
)
bundle
.
putString
(
WebActivity
.
WEB_TITLE
,
it
.
list
[
serverBannerP
osition
].
title
)
bundle
.
putString
(
WebActivity
.
WEB_URL
,
it
.
list
[
p
osition
].
url
)
bundle
.
putString
(
WebActivity
.
WEB_URL
,
it
.
list
[
serverBannerP
osition
].
url
)
readyGo
(
WebActivity
::
class
.
java
,
bundle
)
readyGo
(
WebActivity
::
class
.
java
,
bundle
)
}
}
}
}
...
...
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