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
b4afc767
Commit
b4afc767
authored
Sep 22, 2023
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
2cb786fe
Changes
24
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
544 additions
and
116 deletions
+544
-116
BannerManager.kt
...main/java/com/duben/dayplaylet/ad/banner/BannerManager.kt
+10
-9
InMoneyVideo.java
...main/java/com/duben/dayplaylet/ad/video/InMoneyVideo.java
+2
-0
InMoneyVideoNoPre.java
...java/com/duben/dayplaylet/ad/video/InMoneyVideoNoPre.java
+2
-0
Constant.kt
...app/src/main/java/com/duben/dayplaylet/common/Constant.kt
+4
-1
HongbaoBean.java
...main/java/com/duben/dayplaylet/mvp/model/HongbaoBean.java
+56
-0
MsgBean.kt
...p/src/main/java/com/duben/dayplaylet/mvp/model/MsgBean.kt
+1
-1
RedpkgPresenter.kt
...va/com/duben/dayplaylet/mvp/presenters/RedpkgPresenter.kt
+155
-0
RedpkgView.kt
...rc/main/java/com/duben/dayplaylet/mvp/views/RedpkgView.kt
+14
-0
LoanService.java
...p/src/main/java/com/duben/dayplaylet/net/LoanService.java
+34
-0
NineActivity.kt
...in/java/com/duben/dayplaylet/ui/activitys/NineActivity.kt
+3
-11
MsgAdapter.kt
...c/main/java/com/duben/dayplaylet/ui/adapter/MsgAdapter.kt
+2
-1
MusicFragment.kt
...in/java/com/duben/dayplaylet/ui/fragment/MusicFragment.kt
+1
-1
RedpkgFragment.kt
...n/java/com/duben/dayplaylet/ui/fragment/RedpkgFragment.kt
+195
-80
CountDownVideoView.java
...a/com/duben/dayplaylet/ui/widgets/CountDownVideoView.java
+10
-0
DramaApiDetailActivity.kt
.../com/duben/dayplaylet/video/csj/DramaApiDetailActivity.kt
+3
-1
progress_bar_ct3.xml
video/app/src/main/res/drawable/progress_bar_ct3.xml
+9
-0
progressbar_song_bg.xml
video/app/src/main/res/drawable/progressbar_song_bg.xml
+32
-0
fragment_main.xml
video/app/src/main/res/layout/fragment_main.xml
+5
-5
fragment_music.xml
video/app/src/main/res/layout/fragment_music.xml
+3
-3
item_msg_pic.xml
video/app/src/main/res/layout/item_msg_pic.xml
+1
-1
layout_red_box.xml
video/app/src/main/res/layout/layout_red_box.xml
+2
-2
bg_redpkg_enable.png
video/app/src/main/res/mipmap-xhdpi/bg_redpkg_enable.png
+0
-0
bg_redpkg_unenable.png
video/app/src/main/res/mipmap-xhdpi/bg_redpkg_unenable.png
+0
-0
hongbao.png
video/app/src/main/res/mipmap-xhdpi/hongbao.png
+0
-0
No files found.
video/app/src/main/java/com/duben/dayplaylet/ad/banner/BannerManager.kt
View file @
b4afc767
...
...
@@ -9,10 +9,8 @@ import com.bytedance.sdk.openadsdk.mediation.ad.MediationAdSlot
import
com.bytedance.sdk.openadsdk.mediation.ad.MediationNativeToBannerListener
import
com.duben.dayplaylet.BuildConfig
import
com.duben.dayplaylet.MintsApplication
import
com.duben.dayplaylet.ad.splash.SplashManager
import
com.duben.dayplaylet.common.Constant
import
com.duben.dayplaylet.manager.TrackManager
import
com.duben.dayplaylet.manager.UserManager
import
com.duben.dayplaylet.utils.LogUtil
import
com.duben.dayplaylet.utils.UIUtils
import
java.lang.ref.WeakReference
...
...
@@ -34,7 +32,7 @@ object BannerManager {
LogUtil
.
d
(
TAG
,
"gromore banner广告-> 1、进入加载"
)
/** 这里是简单的banner请求adSlot设置,如果需要更多的设置,可参考AdUtils.kt中bannerAdSlot函数部分。 */
va
r
adSlot
:
AdSlot
=
AdSlot
.
Builder
()
va
l
adSlot
:
AdSlot
=
AdSlot
.
Builder
()
.
setCodeId
(
BuildConfig
.
GROMORE_BANNER_CODE
)
// .setImageAcceptedSize(UIUtils.dp2px(weakActivity?.get(), 300f), UIUtils.dp2px(weakActivity?.get(), 45f)) // 单位px
.
setImageAcceptedSize
(
...
...
@@ -58,7 +56,7 @@ object BannerManager {
)
.
build
()
va
r
adNativeLoader
:
TTAdNative
=
TTAdSdk
.
getAdManager
().
createAdNative
(
weakActivity
?.
get
())
va
l
adNativeLoader
:
TTAdNative
=
TTAdSdk
.
getAdManager
().
createAdNative
(
weakActivity
?.
get
())
adNativeLoader
.
loadBannerExpressAd
(
adSlot
,
object
:
TTAdNative
.
NativeExpressAdListener
{
override
fun
onNativeExpressAdLoad
(
ads
:
MutableList
<
TTNativeExpressAd
>?)
{
LogUtil
.
d
(
TAG
,
"banner广告-> 2、 load success: "
+
if
(
ads
==
null
)
"0"
else
ads
?.
size
)
...
...
@@ -73,11 +71,14 @@ object BannerManager {
}
override
fun
onAdShow
(
view
:
View
?,
type
:
Int
)
{
if
(
bannerAd
!=
null
&&
bannerAd
!!
.
getMediationManager
().
getShowEcpm
()
!=
null
)
{
if
(
bannerAd
!=
null
&&
bannerAd
!!
.
mediationManager
.
showEcpm
!=
null
)
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"adcode"
]
=
bannerAd
!!
.
getMediationManager
().
getShowEcpm
().
getSlotId
()
vo
[
"ecpm"
]
=
bannerAd
!!
.
getMediationManager
().
getShowEcpm
().
getEcpm
()
vo
[
"adSource"
]
=
bannerAd
!!
.
getMediationManager
().
getShowEcpm
().
getSdkName
()
vo
[
"adcode"
]
=
bannerAd
!!
.
mediationManager
.
showEcpm
.
slotId
vo
[
"ecpm"
]
=
bannerAd
!!
.
mediationManager
.
showEcpm
.
ecpm
vo
[
"adSource"
]
=
bannerAd
!!
.
mediationManager
.
showEcpm
.
sdkName
vo
[
"adid"
]
=
BuildConfig
.
GROMORE_BANNER_CODE
vo
[
"adType"
]
=
Constant
.
GRO_MORE_ADTYPE5
TrackManager
.
getInstance
().
reporGromeEcpm
(
vo
)
...
...
@@ -126,7 +127,7 @@ object BannerManager {
if
(
bannerView
!=
null
&&
weakFrameLayout
!=
null
)
{
val
bannerContainer
=
weakFrameLayout
!!
.
get
()
bannerContainer
!!
.
removeAllViews
()
bannerContainer
!!
.
addView
(
bannerView
)
bannerContainer
.
addView
(
bannerView
)
}
}
}
\ No newline at end of file
video/app/src/main/java/com/duben/dayplaylet/ad/video/InMoneyVideo.java
View file @
b4afc767
...
...
@@ -266,6 +266,8 @@ public class InMoneyVideo {
strings
.
add
(
Constant
.
CARRIERTYPE_SONG_CLICK
);
strings
.
add
(
Constant
.
CARRIERTYPE_SONG_MORE
);
strings
.
add
(
Constant
.
CARRIERTYPE_SONG_ALL
);
strings
.
add
(
Constant
.
CARRIERTYPE_REWARD_HONGBAO
);
strings
.
add
(
Constant
.
CARRIERTYPE_REWARD_HONGBAO_MORE
);
return
strings
.
contains
(
carrierType
);
}
...
...
video/app/src/main/java/com/duben/dayplaylet/ad/video/InMoneyVideoNoPre.java
View file @
b4afc767
...
...
@@ -205,6 +205,8 @@ public class InMoneyVideoNoPre {
strings
.
add
(
Constant
.
CARRIERTYPE_SONG_CLICK
);
strings
.
add
(
Constant
.
CARRIERTYPE_SONG_MORE
);
strings
.
add
(
Constant
.
CARRIERTYPE_SONG_ALL
);
strings
.
add
(
Constant
.
CARRIERTYPE_REWARD_HONGBAO
);
strings
.
add
(
Constant
.
CARRIERTYPE_REWARD_HONGBAO_MORE
);
return
strings
.
contains
(
carrierType
);
}
...
...
video/app/src/main/java/com/duben/dayplaylet/common/Constant.kt
View file @
b4afc767
...
...
@@ -32,11 +32,14 @@ object Constant {
const
val
CARRIERTYPE_SING_OVER
=
"ONLY_SHOW"
//猜歌进度完成
const
val
CARRIERTYPE_SONG_CLICK
=
"REWARD_GUESS_SONG_CLICK"
//不看视频点击答题 的入参
const
val
CARRIERTYPE_SONG_MORE
=
"REWARD_GUESS_SONG_MORE"
//翻倍 的入参
const
val
CARRIERTYPE_SONG_ALL
=
"REWARD_GUESS_SONG_ALL"
//画着红包直接看视频的入参
const
val
CARRIERTYPE_REWARD_HONGBAO
=
"REWARD_HONGBAO"
//看视频得红包券的
const
val
CARRIERTYPE_REWARD_HONGBAO_MORE
=
"REWARD_HONGBAO_MORE"
//看视频得红包券的
const
val
CARRIERTYPE_FORCASH_HONGBAO
=
"FORCASH_HONGBAO"
//提现时候传入的
const
val
CARRIERTYPE_VEDIO_UNLOCK
=
"VEDIO_UNLOCK"
const
val
CARRIERTYPE_VEDIO
=
"REWARD_VEDIO"
//加金币
...
...
video/app/src/main/java/com/duben/dayplaylet/mvp/model/HongbaoBean.java
0 → 100644
View file @
b4afc767
package
com
.
duben
.
dayplaylet
.
mvp
.
model
;
import
java.io.Serializable
;
import
java.util.List
;
public
class
HongbaoBean
implements
Serializable
{
private
List
<
ListDTO
>
list
;
public
List
<
ListDTO
>
getList
()
{
return
list
;
}
public
void
setList
(
List
<
ListDTO
>
list
)
{
this
.
list
=
list
;
}
public
static
class
ListDTO
implements
Serializable
{
private
boolean
reward
;
private
Object
image
;
private
String
nickname
;
private
String
text
;
public
boolean
isReward
()
{
return
reward
;
}
public
void
setReward
(
boolean
reward
)
{
this
.
reward
=
reward
;
}
public
Object
getImage
()
{
return
image
;
}
public
void
setImage
(
Object
image
)
{
this
.
image
=
image
;
}
public
String
getNickname
()
{
return
nickname
;
}
public
void
setNickname
(
String
nickname
)
{
this
.
nickname
=
nickname
;
}
public
String
getText
()
{
return
text
;
}
public
void
setText
(
String
text
)
{
this
.
text
=
text
;
}
}
}
video/app/src/main/java/com/duben/dayplaylet/mvp/model/MsgBean.kt
View file @
b4afc767
...
...
@@ -10,5 +10,5 @@ class MsgBean(
var
content
:
String
?
=
""
,
// 内容
var
avatarImg
:
Any
?
=
null
,
// 头像图片地址
var
contentImg
:
Any
?
=
null
,
// 图片地址
var
showFinger
:
Boolean
=
false
,
//
图片地址
var
showFinger
:
Boolean
=
false
,
//
手指
)
\ No newline at end of file
video/app/src/main/java/com/duben/dayplaylet/mvp/presenters/RedpkgPresenter.kt
View file @
b4afc767
...
...
@@ -2,6 +2,7 @@ package com.duben.dayplaylet.mvp.presenters
import
com.duben.dayplaylet.manager.AppHttpManager
import
com.duben.dayplaylet.mvp.model.BaseResponse
import
com.duben.dayplaylet.mvp.model.HongbaoBean
import
com.duben.dayplaylet.mvp.views.RedpkgView
import
com.duben.library.net.neterror.BaseSubscriber
import
com.duben.library.net.neterror.Throwable
...
...
@@ -9,6 +10,160 @@ import com.google.gson.JsonObject
class
RedpkgPresenter
:
BasePresenter
<
RedpkgView
>()
{
// 初始化或者刷新
fun
rdHongbaoRefresh
()
{
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
rdHongbaoRefresh
(),
object
:
BaseSubscriber
<
BaseResponse
<
HongbaoBean
>>()
{
override
fun
onCompleted
()
{
if
(
isLinkView
)
return
}
override
fun
onError
(
e
:
Throwable
)
{
if
(
isLinkView
)
return
view
.
showToast
(
e
.
message
)
view
.
rdHongbaoRefreshFail
()
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
HongbaoBean
>)
{
if
(
isLinkView
)
return
val
code
=
baseResponse
.
status
val
message
=
baseResponse
.
message
when
(
code
)
{
200
->
{
view
.
rdHongbaoRefreshSuc
(
baseResponse
.
data
)
}
else
->
{
view
.
rdHongbaoRefreshFail
()
view
.
showToast
(
message
)
}
}
}
})
}
// 对话
fun
rdHongbaoTalk
()
{
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
rdHongbaoTalk
(),
object
:
BaseSubscriber
<
BaseResponse
<
HongbaoBean
>>()
{
override
fun
onCompleted
()
{
if
(
isLinkView
)
return
}
override
fun
onError
(
e
:
Throwable
)
{
if
(
isLinkView
)
return
view
.
showToast
(
e
.
message
)
view
.
rdHongbaoTalkFail
()
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
HongbaoBean
>)
{
if
(
isLinkView
)
return
val
code
=
baseResponse
.
status
val
message
=
baseResponse
.
message
when
(
code
)
{
200
->
{
view
.
rdHongbaoTalkSuc
(
baseResponse
.
data
)
}
else
->
{
view
.
rdHongbaoTalkFail
()
view
.
showToast
(
message
)
}
}
}
})
}
// 上拉加载更多
fun
rdHongbaoMore
()
{
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
rdHongbaoMore
(),
object
:
BaseSubscriber
<
BaseResponse
<
HongbaoBean
>>()
{
override
fun
onCompleted
()
{
if
(
isLinkView
)
return
}
override
fun
onError
(
e
:
Throwable
)
{
if
(
isLinkView
)
return
view
.
showToast
(
e
.
message
)
view
.
rdHongbaoMoreFail
()
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
HongbaoBean
>)
{
if
(
isLinkView
)
return
val
code
=
baseResponse
.
status
val
message
=
baseResponse
.
message
when
(
code
)
{
200
->
{
view
.
rdHongbaoMoreSuc
(
baseResponse
.
data
)
}
else
->
{
view
.
rdHongbaoMoreFail
()
view
.
showToast
(
message
)
}
}
}
})
}
// 点击红包
fun
rdHongbaoClick
()
{
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
rdHongbaoClick
(),
object
:
BaseSubscriber
<
BaseResponse
<
JsonObject
>>()
{
override
fun
onCompleted
()
{
if
(
isLinkView
)
return
}
override
fun
onError
(
e
:
Throwable
)
{
if
(
isLinkView
)
return
view
.
showToast
(
e
.
message
)
view
.
rdHongbaoClickFail
()
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
JsonObject
>)
{
if
(
isLinkView
)
return
val
code
=
baseResponse
.
status
val
message
=
baseResponse
.
message
when
(
code
)
{
200
->
{
val
data
=
baseResponse
.
data
if
(
data
!=
null
)
{
val
jsonObject
=
data
[
"list"
].
asJsonObject
val
isCash
=
jsonObject
[
"isCash"
].
asBoolean
if
(
isCash
)
{
view
.
rdHongbaoClickSuc
(
isCash
,
jsonObject
[
"cash"
].
asDouble
,
jsonObject
[
"unitId"
].
asString
)
}
else
{
view
.
rdHongbaoClickSuc
(
isCash
,
0.0
,
""
)
}
}
}
else
->
{
view
.
rdHongbaoClickFail
()
view
.
showToast
(
message
)
}
}
}
})
}
// 添加金币
fun
reportAddCoinMsg
(
carrierType
:
String
,
ecpmId
:
String
=
""
)
{
val
vo
=
HashMap
<
String
,
Any
>()
...
...
video/app/src/main/java/com/duben/dayplaylet/mvp/views/RedpkgView.kt
View file @
b4afc767
package
com.duben.dayplaylet.mvp.views
import
com.duben.dayplaylet.mvp.model.HongbaoBean
interface
RedpkgView
:
BaseView
{
fun
reportAddCoinMsgSuc
(
coin
:
Int
,
di
:
Int
)
fun
rdHongbaoRefreshSuc
(
data
:
HongbaoBean
)
fun
rdHongbaoRefreshFail
()
fun
rdHongbaoTalkSuc
(
data
:
HongbaoBean
)
fun
rdHongbaoTalkFail
()
fun
rdHongbaoMoreSuc
(
data
:
HongbaoBean
)
fun
rdHongbaoMoreFail
()
fun
rdHongbaoClickSuc
(
isCash
:
Boolean
,
cash
:
Double
,
unitId
:
String
)
fun
rdHongbaoClickFail
()
}
\ No newline at end of file
video/app/src/main/java/com/duben/dayplaylet/net/LoanService.java
View file @
b4afc767
...
...
@@ -4,6 +4,7 @@ import android.content.Context;
import
android.text.TextUtils
;
import
com.duben.dayplaylet.mvp.model.DrawInfoBean
;
import
com.duben.dayplaylet.mvp.model.HongbaoBean
;
import
com.duben.dayplaylet.mvp.model.RDVideoBean
;
import
com.duben.dayplaylet.mvp.model.RiskBean
;
import
com.duben.dayplaylet.mvp.model.SignInfoBean
;
...
...
@@ -249,6 +250,39 @@ public interface LoanService {
@POST
(
"api/reward/rdUserHallList"
)
Observable
<
BaseResponse
<
TaskInfoBean
>>
rdUserHallList
();
/**
* 红包群-初始化或者刷新
*
* @return
*/
@POST
(
"api/reward/rdHongbaoRefresh"
)
Observable
<
BaseResponse
<
HongbaoBean
>>
rdHongbaoRefresh
();
/**
* 红包群-对话
*
* @return
*/
@POST
(
"api/reward/rdHongbaoTalk"
)
Observable
<
BaseResponse
<
HongbaoBean
>>
rdHongbaoTalk
();
/**
* 红包群-上拉加载更多
*
* @return
*/
@POST
(
"api/reward/rdHongbaoMore"
)
Observable
<
BaseResponse
<
HongbaoBean
>>
rdHongbaoMore
();
/**
* 红包群-点击红包
*
* @return
*/
@POST
(
"api/reward/rdHongbaoClick"
)
Observable
<
BaseResponse
<
JsonObject
>>
rdHongbaoClick
();
/**
* 红包券提现列表
*
...
...
video/app/src/main/java/com/duben/dayplaylet/ui/activitys/NineActivity.kt
View file @
b4afc767
...
...
@@ -4,29 +4,21 @@ import android.app.Dialog
import
android.os.Bundle
import
android.os.Handler
import
android.os.Looper
import
android.text.TextUtils
import
android.view.View
import
com.airbnb.lottie.LottieAnimationView
import
com.airbnb.lottie.LottieComposition
import
com.airbnb.lottie.LottieCompositionFactory
import
com.airbnb.lottie.LottieDrawable
import
com.daimajia.androidanimations.library.Techniques
import
com.daimajia.androidanimations.library.YoYo
import
com.duben.dayplaylet.R
import
com.duben.dayplaylet.ad.AdManager
import
com.duben.dayplaylet.ad.AdStatusListener
import
com.duben.dayplaylet.ad.NoPreAdManager
import
com.duben.dayplaylet.ad.half.HalfScreenManager
import
com.duben.dayplaylet.common.AppConfig
import
com.duben.dayplaylet.common.Constant
import
com.duben.dayplaylet.manager.TrackManager
import
com.duben.dayplaylet.mvp.model.NineListBean
import
com.duben.dayplaylet.mvp.model.NineShowBean
import
com.duben.dayplaylet.ui.activitys.base.BaseActivity
import
com.duben.dayplaylet.ui.widgets.DialogListener
import
com.duben.dayplaylet.ui.widgets.WithDrawSucDialog
import
com.duben.dayplaylet.utils.ConsumerToastUtil
import
com.duben.dayplaylet.utils.SplitArrayUtils
import
com.duben.dayplaylet.utils.rxutil.CommonRxTask
import
com.duben.dayplaylet.utils.rxutil.RxjavaUtil
import
com.duben.library.utils.nodoubleclick.AntiShake
...
...
@@ -159,17 +151,17 @@ class NineActivity : BaseActivity(), View.OnClickListener {
lucky_panel2
.
tryToStop
(
5
)
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
showWithdrawSucDialog
()
showWithdrawSucDialog
(
0.0
)
},
2000
)
}
})
}
}
private
fun
showWithdrawSucDialog
()
{
private
fun
showWithdrawSucDialog
(
cash
:
Double
)
{
TrackManager
.
getInstance
().
addCashoutReq
(
drawId
)
mWithDrawSucDialog
=
WithDrawSucDialog
(
context
,
cash
,
object
:
DialogListener
()
{
WithDrawSucDialog
(
context
,
cash
.
toString
()
,
object
:
DialogListener
()
{
override
fun
onClick
(
dialog
:
Dialog
?,
v
:
View
?)
{
super
.
onClick
(
dialog
,
v
)
dialog
?.
dismiss
()
...
...
video/app/src/main/java/com/duben/dayplaylet/ui/adapter/MsgAdapter.kt
View file @
b4afc767
...
...
@@ -101,12 +101,13 @@ class MsgAdapter : BaseMultiItemQuickAdapter<MSGMultiItemEntity, BaseViewHolder>
setGravityLL
(
tvName
,
Gravity
.
END
)
}
if
(
msgBean
.
contentImg
==
null
)
{
GlideUtils
.
loadImageView
(
context
,
R
.
mipmap
.
hongbao
,
ivContent
)
GlideUtils
.
loadImageView
(
context
,
R
.
mipmap
.
bg_redpkg_enable
,
ivContent
)
}
else
{
GlideUtils
.
loadImageView
(
context
,
msgBean
.
contentImg
,
ivContent
)
}
ivContent
.
setOnClickListener
{
finger
.
visibility
=
View
.
GONE
mOnCustomChildClickListener
?.
onCustomChildClick
(
it
)
}
tvName
.
text
=
msgBean
.
name
...
...
video/app/src/main/java/com/duben/dayplaylet/ui/fragment/MusicFragment.kt
View file @
b4afc767
...
...
@@ -551,7 +551,7 @@ class MusicFragment : LazyLoadBaseFragment(), MusicView, View.OnClickListener {
rl_open_cash
.
visibility
=
View
.
VISIBLE
tv_open_cash_progress
.
text
=
String
.
format
(
"%
2d/%2
d"
,
"%
d/%
d"
,
it
.
completeCount
,
it
.
turnNeedCount
)
...
...
video/app/src/main/java/com/duben/dayplaylet/ui/fragment/RedpkgFragment.kt
View file @
b4afc767
This diff is collapsed.
Click to expand it.
video/app/src/main/java/com/duben/dayplaylet/ui/widgets/CountDownVideoView.java
View file @
b4afc767
...
...
@@ -21,6 +21,7 @@ public class CountDownVideoView extends LinearLayout {
private
ImageView
ivCountVedioRedbox
;
private
boolean
isPlaying
=
false
;
private
boolean
isOver
=
false
;
private
YoYo
.
YoYoString
rope
;
public
CountDownVideoView
(
Context
context
)
{
...
...
@@ -48,12 +49,14 @@ public class CountDownVideoView extends LinearLayout {
private
void
initListener
()
{
cdCountVedioView
.
setOnLoadingFinishListener
(()
->
{
if
(
countDownVideoListener
!=
null
)
{
isOver
=
true
;
countDownVideoListener
.
onLoadingFinish
();
}
});
}
public
void
start
()
{
isOver
=
false
;
cdCountVedioView
.
start
();
isPlaying
=
true
;
}
...
...
@@ -63,10 +66,12 @@ public class CountDownVideoView extends LinearLayout {
}
public
void
resume
()
{
isOver
=
false
;
cdCountVedioView
.
resume
();
}
public
void
reset
()
{
isOver
=
false
;
cdCountVedioView
.
reset
();
isPlaying
=
true
;
}
...
...
@@ -85,6 +90,11 @@ public class CountDownVideoView extends LinearLayout {
return
isPlaying
;
}
public
boolean
isOver
()
{
return
isOver
;
}
public
void
setTime
(
int
time
)
{
cdCountVedioView
.
setTime
(
time
);
}
...
...
video/app/src/main/java/com/duben/dayplaylet/video/csj/DramaApiDetailActivity.kt
View file @
b4afc767
...
...
@@ -433,7 +433,7 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
cdvv
.
setCountDownVideoListener
(
this
)
cl_red_box
.
isClickable
=
false
cl_red_box
.
setOnClickListener
{
if
(
cdvv
.
isPlaying
)
return
@setOnClickListener
if
(
!
cdvv
.
isOver
)
return
@setOnClickListener
dpWidget
?.
fragment
?.
onPause
()
showRedboxDialog
()
...
...
@@ -594,6 +594,8 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
videoPresenter
.
unlock
(
it
)
}
iv_pause
.
visibility
=
View
.
GONE
// 更新解锁集数
for
(
i
in
1
until
lockSet
)
{
val
hasUnlockList
:
MutableList
<
Int
>
=
...
...
video/app/src/main/res/drawable/progress_bar_ct3.xml
0 → 100644
View file @
b4afc767
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<!-- solid指定形状的填充色,只有android:color一个属性 -->
<solid
android:color=
"@color/color_FFDF85"
/>
<!-- padding设置内容区域离边界的间距 -->
<!-- corners设置圆角,只适用于rectangle -->
<corners
android:radius=
"30dp"
/>
</shape>
\ No newline at end of file
video/app/src/main/res/drawable/progressbar_song_bg.xml
0 → 100644
View file @
b4afc767
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:id=
"@android:id/background"
>
<shape>
<corners
android:radius=
"30dp"
/>
<solid
android:color=
"#FFE9E9"
/>
</shape>
</item>
<item
android:id=
"@android:id/secondaryProgress"
>
<scale
android:scaleWidth=
"100%"
>
<shape>
<corners
android:radius=
"30dp"
/>
<solid
android:color=
"@color/color_FFDF85"
/>
</shape>
</scale>
</item>
<item
android:id=
"@android:id/progress"
>
<!--
<clip>
<shape>
<corners android:topRightRadius="20dp"
android:bottomRightRadius="20dp"/>
<solid android:color="#FF009898"/>
</shape>
</clip>
-->
<scale
android:drawable=
"@drawable/progress_bar_ct3"
android:scaleWidth=
"100%"
/>
</item>
</layer-list>
\ No newline at end of file
video/app/src/main/res/layout/fragment_main.xml
View file @
b4afc767
...
...
@@ -65,10 +65,11 @@
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"16dp"
android:layout_marginTop=
"18dp"
android:visibility=
"gone"
android:layout_marginRight=
"16dp"
android:layout_marginBottom=
"10dp"
android:background=
"@drawable/shape_bg_write"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
android:visibility=
"gone"
>
<RelativeLayout
android:layout_width=
"match_parent"
...
...
@@ -105,8 +106,8 @@
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"4dp"
android:layout_marginRight=
"4dp"
android:layout_marginTop=
"4dp"
android:layout_marginRight=
"4dp"
android:layout_marginBottom=
"8dp"
android:overScrollMode=
"never"
/>
</LinearLayout>
...
...
@@ -117,7 +118,6 @@
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"15dp"
android:layout_marginTop=
"10dp"
android:layout_marginEnd=
"15dp"
/>
<TextView
...
...
@@ -176,8 +176,8 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"400dp"
android:visibility=
"gone"
android:layout_marginRight=
"20dp"
android:visibility=
"gone"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
>
...
...
video/app/src/main/res/layout/fragment_music.xml
View file @
b4afc767
...
...
@@ -18,7 +18,7 @@
android:layout_height=
"wrap_content"
android:layout_alignParentEnd=
"true"
android:layout_marginTop=
"160dp"
android:layout_marginEnd=
"
20
dp"
>
android:layout_marginEnd=
"
15
dp"
>
<ImageView
android:id=
"@+id/iv_open_cash"
...
...
@@ -34,10 +34,10 @@
android:layout_height=
"14dp"
android:layout_alignBottom=
"@id/iv_open_cash"
android:layout_centerHorizontal=
"true"
android:padding=
"1dp"
android:layout_marginBottom=
"22dp"
android:background=
"@drawable/shape_write"
android:progressDrawable=
"@drawable/progressbar_versus_changevedio_bg"
/>
android:padding=
"1dp"
android:progressDrawable=
"@drawable/progressbar_song_bg"
/>
<TextView
android:id=
"@+id/tv_open_cash_progress"
...
...
video/app/src/main/res/layout/item_msg_pic.xml
View file @
b4afc767
...
...
@@ -54,7 +54,7 @@
android:id=
"@+id/iv_content"
android:layout_width=
"200dp"
android:layout_height=
"85dp"
android:src=
"@mipmap/
hongbao
"
/>
android:src=
"@mipmap/
bg_redpkg_enable
"
/>
<com.airbnb.lottie.LottieAnimationView
android:id=
"@+id/finger_view"
...
...
video/app/src/main/res/layout/layout_red_box.xml
View file @
b4afc767
...
...
@@ -27,10 +27,10 @@
android:id=
"@+id/triangle"
android:layout_width=
"12dp"
android:layout_height=
"12dp"
android:layout_marginStart=
"30dp"
android:background=
"@drawable/shape_triangle"
android:visibility=
"gone"
app:layout_constraintStart_toStartOf=
"@id/tv_tips"
app:layout_constraintEnd_toEndOf=
"@id/linearLayout"
app:layout_constraintStart_toStartOf=
"@id/linearLayout"
app:layout_constraintTop_toBottomOf=
"@id/tv_tips"
/>
<LinearLayout
...
...
video/app/src/main/res/mipmap-xhdpi/bg_redpkg_enable.png
0 → 100644
View file @
b4afc767
20.3 KB
video/app/src/main/res/mipmap-xhdpi/bg_redpkg_unenable.png
0 → 100644
View file @
b4afc767
17 KB
video/app/src/main/res/mipmap-xhdpi/hongbao.png
deleted
100755 → 0
View file @
2cb786fe
12.1 KB
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