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
61ea2bb2
Commit
61ea2bb2
authored
Nov 17, 2020
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化好兔监听
parent
7b24a2d9
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
295242 deletions
+21
-295242
mapping.txt
GoodMoney/app/mapping.txt
+0
-37397
seeds.txt
GoodMoney/app/seeds.txt
+0
-235355
MainFragment.kt
...main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
+17
-27
URIEncoder.java
...p/src/main/java/com/mints/goodmoney/utils/URIEncoder.java
+4
-0
unused.txt
GoodMoney/app/unused.txt
+0
-22463
No files found.
GoodMoney/app/mapping.txt
deleted
100644 → 0
View file @
7b24a2d9
This diff is collapsed.
Click to expand it.
GoodMoney/app/seeds.txt
deleted
100644 → 0
View file @
7b24a2d9
This diff is collapsed.
Click to expand it.
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
View file @
61ea2bb2
...
...
@@ -49,9 +49,10 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
private
var
littleVideoFragment
:
YLLittleVideoFragment
?
=
null
private
val
VEDIO_MAX_COUNT
=
12
// 当前缓存视频id最大数
private
val
vedioIdList
by
lazy
{
ArrayList
<
String
>()
}
//记录播放的视频id
private
var
isFirstLoadVedio
=
true
// 首次加载视频初始化
private
var
isClickStop
=
false
// 是否点击一览视频暂停
private
var
vedioId
=
""
// 视频id 记录界面切换时是否还给奖励
private
var
isToCreateReward
=
true
// 是否还有剩余红包 服务器返回
private
var
isFirstLoadVedio
=
true
// 首次加载视频初始化 本地判断
private
var
isAward
=
false
// 是否可以领金币 本地判断
// 广告权重相关
private
var
vedioAdingManager
:
VedioAdingManager
?
=
null
...
...
@@ -105,9 +106,6 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
}
littleVideoFragment
?.
onResume
()
if
(!
TextUtils
.
isEmpty
(
vedioId
))
{
resumeDownloadTime
(
vedioId
)
}
}
}
...
...
@@ -121,7 +119,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
super
.
onPause
()
littleVideoFragment
?.
onPause
()
pauseDownloadTime
()
//
pauseDownloadTime()
}
override
fun
setUserVisibleHint
(
isVisibleToUser
:
Boolean
)
{
...
...
@@ -173,11 +171,6 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
homePresenter
.
getHomeVedioMsg
()
}
override
fun
getHallBaseMsgFail
()
{
rewardCoin
=
0
rewardDoubleCoin
=
0
}
override
fun
getHomeVedioMsgSuc
(
data
:
MainVedioMsgBean
)
{
if
(
activity
==
null
||
requireActivity
().
isFinishing
)
{
return
...
...
@@ -187,11 +180,12 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
rewardCoin
=
data
.
rewardCoin
rewardDoubleCoin
=
data
.
rewardDoubleCoin
isToCreateReward
=
data
.
isToCreateReward
if
(
data
.
isToCreateReward
)
{
if
(
isToCreateReward
)
{
// 防止界面切换 重置倒计时
// 第一次能过 isFirstLoadVedio 判断好兔先加载视频
if
(!
isFirstLoadVedio
&&
!
cdvvYilanTime
.
isPlaying
)
{
if
(!
isFirstLoadVedio
&&
!
cdvvYilanTime
.
isPlaying
&&
!
isAward
)
{
cdvvYilanTime
?.
reset
()
cdvvYilanTime
?.
start
()
}
...
...
@@ -203,7 +197,9 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
override
fun
onClick
(
v
:
View
)
{
when
(
v
.
id
)
{
R
.
id
.
cdvvYilanTime
->
{
if
(
rewardCoin
>
0
)
{
if
(
isAward
&&
isToCreateReward
)
{
isAward
=
false
val
bundle
=
Bundle
()
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
rewardCoin
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CARRIER_HOMEVEDIO
)
...
...
@@ -228,21 +224,16 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
if
(
littleVideoFragment
==
null
)
{
littleVideoFragment
=
YLLittleVideoFragment
.
newInstance
()
transaction
.
add
(
R
.
id
.
yilan_fragment_frame_container
,
littleVideoFragment
!!
,
YLLittleVideoFragment
::
class
.
java
.
simpleName
)
// 设置点击的item播放状态,callback返回true标识用户已经处理了event,返回false,标识使用播放器内部逻辑处理event。
YLPlayerConfig
.
config
().
registerPlayerCallBack
(
object
:
OnPlayerCallBack
{
override
fun
onStart
(
p0
:
String
?,
videoid
:
String
,
p2
:
String
?)
{
// 防止网络异常时, 第一次加载倒计时红包
if
(
isFirstLoadVedio
)
{
isFirstLoadVedio
=
false
initTimeview
()
}
else
{
}
else
{
resumeDownloadTime
(
videoid
)
}
vedioId
=
videoid
LogUtil
.
d
(
TAG
,
"onStart videoid:${videoid}"
)
LogUtil
.
d
(
TAG
,
"onStart videoid:${videoid}"
)
}
override
fun
onPause
(
p0
:
String
?,
p1
:
String
?,
p2
:
String
?)
{
...
...
@@ -260,7 +251,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
override
fun
onLoopComplete
(
pager
:
String
?,
videoID
:
String
,
taskID
:
String
?,
num
:
Int
)
{
addVedioIdList
(
videoID
)
pauseDownloadTime
()
LogUtil
.
d
(
TAG
,
"onLoopComplete pager:${pager} videoID:${videoID} taskID:${taskID} num:${num}"
)
LogUtil
.
d
(
TAG
,
"onLoopComplete pager:${pager} videoID:${videoID} taskID:${taskID} num:${num}"
)
}
override
fun
onStuckStart
(
p0
:
String
?,
p1
:
String
?,
p2
:
String
?)
{
...
...
@@ -298,7 +289,6 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
* 倒计时红包暂停
*/
private
fun
pauseDownloadTime
()
{
isClickStop
=
true
cdvvYilanTime
?.
pause
()
}
...
...
@@ -312,8 +302,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
return
}
if
(
isClickStop
)
{
isClickStop
=
false
if
(!
isAward
)
{
cdvvYilanTime
?.
resume
()
}
}
...
...
@@ -324,7 +313,6 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
*/
private
fun
stopDownloadTime
()
{
// 暂停
isClickStop
=
true
cdvvYilanTime
?.
stop
()
}
...
...
@@ -342,6 +330,8 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
isFristWacthVideo
=
false
}
// 转满一圈,可领金币标记
isAward
=
true
cdvvYilanTime
?.
showRedbox
()
stopDownloadTime
()
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/utils/URIEncoder.java
0 → 100644
View file @
61ea2bb2
package
com
.
mints
.
goodmoney
.
utils
;
public
class
URIEncoder
{
}
GoodMoney/app/unused.txt
deleted
100644 → 0
View file @
7b24a2d9
This diff is collapsed.
Click to expand it.
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