Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_vedio
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_vedio
Commits
392fad80
Commit
392fad80
authored
Aug 01, 2023
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
05317956
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
11 deletions
+25
-11
DrawExpressManager.kt
...in/java/com/mints/helivideo/ad/draw/DrawExpressManager.kt
+7
-1
ExpressManager.kt
...ain/java/com/mints/helivideo/ad/express/ExpressManager.kt
+1
-1
MyFragment.kt
...c/main/java/com/mints/helivideo/ui/fragment/MyFragment.kt
+10
-7
NineContinueDialog.kt
...java/com/mints/helivideo/ui/widgets/NineContinueDialog.kt
+7
-2
No files found.
video/app/src/main/java/com/mints/helivideo/ad/draw/DrawExpressManager.kt
View file @
392fad80
...
...
@@ -9,6 +9,7 @@ import android.view.ViewGroup
import
android.widget.*
import
com.bumptech.glide.Glide
import
com.bytedance.sdk.openadsdk.*
import
com.bytedance.sdk.openadsdk.mediation.ad.MediationAdSlot
import
com.bytedance.sdk.openadsdk.mediation.ad.MediationExpressRenderListener
import
com.bytedance.sdk.openadsdk.mediation.ad.MediationViewBinder
import
com.mints.helivideo.BuildConfig
...
...
@@ -111,12 +112,17 @@ class DrawExpressManager {
UIUtils
.
getScreenWidth
(
activity
),
UIUtils
.
getScreenHeight
(
activity
)
)
.
setMediationAdSlot
(
MediationAdSlot
.
Builder
()
.
setMuted
(
true
)
.
build
()
)
.
setAdCount
(
3
)
//请求广告数量为1到3条 (优先采用平台配置的数量)
.
build
()
adNativeLoader
.
loadDrawFeedAd
(
adslot
,
object
:
TTAdNative
.
DrawFeedAdListener
{
override
fun
onError
(
p0
:
Int
,
p1
:
String
?)
{
LogUtil
.
e
(
TAG
,
"gr
eenroom
draw信息流--> 3、load feed ad error : $p0, $p1"
)
LogUtil
.
e
(
TAG
,
"gr
omore
draw信息流--> 3、load feed ad error : $p0, $p1"
)
isLoadSuccess
=
0
}
...
...
video/app/src/main/java/com/mints/helivideo/ad/express/ExpressManager.kt
View file @
392fad80
...
...
@@ -105,7 +105,7 @@ class ExpressManager {
adNativeLoader
.
loadFeedAd
(
adslot
,
object
:
TTAdNative
.
FeedAdListener
{
override
fun
onError
(
p0
:
Int
,
p1
:
String
?)
{
LogUtil
.
e
(
TAG
,
"gr
eenroom
信息流--> 3、load feed ad error : $p0, $p1"
)
LogUtil
.
e
(
TAG
,
"gr
omore
信息流--> 3、load feed ad error : $p0, $p1"
)
isLoadSuccess
=
0
}
...
...
video/app/src/main/java/com/mints/helivideo/ui/fragment/MyFragment.kt
View file @
392fad80
...
...
@@ -362,13 +362,16 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
// 继续观看逻辑
private
fun
showContinueDialog
()
{
nineShowBean
?.
let
{
NineContinueDialog
(
requireActivity
(),
it
.
need
-
it
.
complete
,
object
:
DialogListener
()
{
override
fun
onClick
(
dialog
:
Dialog
?,
v
:
View
?)
{
super
.
onClick
(
dialog
,
v
)
dialog
?.
dismiss
()
clickTurn
()
}
}).
show
()
NineContinueDialog
(
requireActivity
(),
it
.
need
-
it
.
complete
-
1
,
object
:
DialogListener
()
{
override
fun
onClick
(
dialog
:
Dialog
?,
v
:
View
?)
{
super
.
onClick
(
dialog
,
v
)
dialog
?.
dismiss
()
clickTurn
()
}
}).
show
()
}
}
//----9宫格逻辑--结束--//
...
...
video/app/src/main/java/com/mints/helivideo/ui/widgets/NineContinueDialog.kt
View file @
392fad80
...
...
@@ -8,6 +8,7 @@ import android.view.WindowManager
import
android.widget.ImageView
import
android.widget.TextView
import
com.mints.helivideo.R
import
com.mints.helivideo.utils.SpanUtils
class
NineContinueDialog
(
activity
:
Activity
,
...
...
@@ -38,8 +39,12 @@ class NineContinueDialog(
val
tv_nine_next
=
findViewById
<
TextView
>(
R
.
id
.
tv_nine_next
)
val
tv_nine_close
=
findViewById
<
ImageView
>(
R
.
id
.
tv_nine_close
)
tv_nine_text
.
text
=
String
.
format
(
"再看%d次即可抽奖"
,
watchCount
)
tv_nine_text
.
text
=
SpanUtils
()
.
append
(
"再看"
)
.
append
(
"$watchCount"
)
.
setForegroundColor
(
context
.
resources
.
getColor
(
R
.
color
.
red
))
.
append
(
"次即可抽奖"
)
.
create
()
listener
.
setDialog
(
this
)
tv_nine_next
.
setOnClickListener
(
listener
)
tv_nine_close
.
setOnClickListener
{
dismiss
()
}
...
...
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