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
525cffb2
Commit
525cffb2
authored
May 28, 2024
by
mengcuiguang2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
c0b7065b
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
165 additions
and
169 deletions
+165
-169
build.gradle
video/app/build.gradle
+2
-2
UserBean.java
...main/java/com/duben/miaoquplaylet/mvp/model/UserBean.java
+1
-1
HomePresenter.kt
...a/com/duben/miaoquplaylet/mvp/presenters/HomePresenter.kt
+33
-33
MyPresenter.kt
...ava/com/duben/miaoquplaylet/mvp/presenters/MyPresenter.kt
+29
-29
NinePresenter.kt
...a/com/duben/miaoquplaylet/mvp/presenters/NinePresenter.kt
+1
-1
VideoPresenter.kt
.../com/duben/miaoquplaylet/mvp/presenters/VideoPresenter.kt
+29
-29
LoanService.java
...rc/main/java/com/duben/miaoquplaylet/net/LoanService.java
+24
-24
MainFragment.kt
.../java/com/duben/miaoquplaylet/ui/fragment/MainFragment.kt
+16
-6
TxVideoAdapter.kt
...om/duben/miaoquplaylet/video/tx/adapter/TxVideoAdapter.kt
+14
-22
NewTxVideoAdapter.kt
.../miaoquplaylet/video/tx/newrecommend/NewTxVideoAdapter.kt
+14
-22
item_block_view.xml
video/app/src/main/res/layout/item_block_view.xml
+2
-0
No files found.
video/app/build.gradle
View file @
525cffb2
...
@@ -10,8 +10,8 @@ android {
...
@@ -10,8 +10,8 @@ android {
applicationId
"com.duben.miaoquplaylet"
applicationId
"com.duben.miaoquplaylet"
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
versionCode
25
versionCode
701
versionName
"
2.0.5
"
versionName
"
7.0.1
"
flavorDimensions
"default"
flavorDimensions
"default"
// dex突破65535的限制
// dex突破65535的限制
...
...
video/app/src/main/java/com/duben/miaoquplaylet/mvp/model/UserBean.java
View file @
525cffb2
...
@@ -95,6 +95,6 @@ public class UserBean implements Serializable {
...
@@ -95,6 +95,6 @@ public class UserBean implements Serializable {
}
}
public
int
getActiviteFlag
()
{
public
int
getActiviteFlag
()
{
return
activiteFlag
;
return
1
;
}
}
}
}
video/app/src/main/java/com/duben/miaoquplaylet/mvp/presenters/HomePresenter.kt
View file @
525cffb2
...
@@ -78,39 +78,39 @@ class HomePresenter : BasePresenter<HomeView>() {
...
@@ -78,39 +78,39 @@ class HomePresenter : BasePresenter<HomeView>() {
}
}
private
fun
showTurn
()
{
private
fun
showTurn
()
{
AppHttpManager
.
getInstance
(
loanApplication
)
//
AppHttpManager.getInstance(loanApplication)
.
call
(
loanService
.
showTurn
(),
//
.call(loanService.showTurn(),
object
:
BaseSubscriber
<
BaseResponse
<
NineShowBean
>>()
{
//
object : BaseSubscriber<BaseResponse<NineShowBean>>() {
override
fun
onCompleted
()
{
//
override fun onCompleted() {
if
(
isLinkView
)
return
//
if (isLinkView) return
}
//
}
//
override
fun
onNext
(
baseResponse
:
BaseResponse
<
NineShowBean
>)
{
//
override fun onNext(baseResponse: BaseResponse<NineShowBean>) {
if
(
isLinkView
)
return
//
if (isLinkView) return
//
val
code
=
baseResponse
.
status
//
val code = baseResponse.status
val
message
=
baseResponse
.
message
//
val message = baseResponse.message
when
(
code
)
{
//
when (code) {
200
->
{
//
200 -> {
val
data
=
baseResponse
.
data
//
val data = baseResponse.data
if
(
data
!=
null
)
{
//
if (data != null) {
view
.
showTurnSuc
(
data
)
//
view.showTurnSuc(data)
//
// AppPreferencesManager.get()
//
//
AppPreferencesManager.get()
// .put(Constant.LUCKY_FLAG, data.isShow)
//
//
.put(Constant.LUCKY_FLAG, data.isShow)
// AppPreferencesManager.get()
//
//
AppPreferencesManager.get()
// .put(Constant.LUCKY_COMPLETE, data.complete)
//
//
.put(Constant.LUCKY_COMPLETE, data.complete)
// AppPreferencesManager.get()
//
//
AppPreferencesManager.get()
// .put(Constant.LUCKY_NEED, data.need)
//
//
.put(Constant.LUCKY_NEED, data.need)
}
//
}
}
//
}
}
//
}
}
//
}
//
override
fun
onError
(
e
:
Throwable
?)
{
//
override fun onError(e: Throwable?) {
if
(
isLinkView
)
return
//
if (isLinkView) return
}
//
}
})
//
})
}
}
...
...
video/app/src/main/java/com/duben/miaoquplaylet/mvp/presenters/MyPresenter.kt
View file @
525cffb2
...
@@ -130,35 +130,35 @@ class MyPresenter : BasePresenter<MyView>() {
...
@@ -130,35 +130,35 @@ class MyPresenter : BasePresenter<MyView>() {
}
}
fun
showTurn
()
{
fun
showTurn
()
{
AppHttpManager
.
getInstance
(
loanApplication
)
//
AppHttpManager.getInstance(loanApplication)
.
call
(
loanService
.
showTurn
(),
//
.call(loanService.showTurn(),
object
:
BaseSubscriber
<
BaseResponse
<
NineShowBean
>>()
{
//
object : BaseSubscriber<BaseResponse<NineShowBean>>() {
override
fun
onCompleted
()
{
//
override fun onCompleted() {
if
(
isLinkView
)
return
//
if (isLinkView) return
view
.
hideLoading
()
//
view.hideLoading()
}
//
}
//
override
fun
onNext
(
baseResponse
:
BaseResponse
<
NineShowBean
>)
{
//
override fun onNext(baseResponse: BaseResponse<NineShowBean>) {
if
(
isLinkView
)
return
//
if (isLinkView) return
//
view
.
hideLoading
()
//
view.hideLoading()
val
code
=
baseResponse
.
status
//
val code = baseResponse.status
val
message
=
baseResponse
.
message
//
val message = baseResponse.message
//
when
(
code
)
{
//
when (code) {
200
->
view
.
showTurnSuc
(
baseResponse
.
data
)
//
200 -> view.showTurnSuc(baseResponse.data)
else
->
{
//
else -> {
view
.
showToast
(
message
)
////
view.showToast(message)
}
//
}
}
//
}
}
//
}
//
override
fun
onError
(
e
:
Throwable
?)
{
//
override fun onError(e: Throwable?) {
if
(
isLinkView
)
return
//
if (isLinkView) return
view
.
hideLoading
()
//
view.hideLoading()
view
.
showToast
(
e
?.
message
)
//
view.showToast(e?.message)
}
//
}
})
//
})
}
}
...
...
video/app/src/main/java/com/duben/miaoquplaylet/mvp/presenters/NinePresenter.kt
View file @
525cffb2
...
@@ -65,7 +65,7 @@ class NinePresenter : BasePresenter<NineView>() {
...
@@ -65,7 +65,7 @@ class NinePresenter : BasePresenter<NineView>() {
when
(
code
)
{
when
(
code
)
{
200
->
view
.
showTurnSuc
(
baseResponse
.
data
)
200
->
view
.
showTurnSuc
(
baseResponse
.
data
)
else
->
{
else
->
{
view
.
showToast
(
message
)
//
view.showToast(message)
}
}
}
}
}
}
...
...
video/app/src/main/java/com/duben/miaoquplaylet/mvp/presenters/VideoPresenter.kt
View file @
525cffb2
...
@@ -171,35 +171,35 @@ class VideoPresenter : BasePresenter<VideoView>() {
...
@@ -171,35 +171,35 @@ class VideoPresenter : BasePresenter<VideoView>() {
}
}
fun
showTurn
()
{
fun
showTurn
()
{
AppHttpManager
.
getInstance
(
loanApplication
)
//
AppHttpManager.getInstance(loanApplication)
.
call
(
loanService
.
showTurn
(),
//
.call(loanService.showTurn(),
object
:
BaseSubscriber
<
BaseResponse
<
NineShowBean
>>()
{
//
object : BaseSubscriber<BaseResponse<NineShowBean>>() {
override
fun
onCompleted
()
{
//
override fun onCompleted() {
if
(
isLinkView
)
return
//
if (isLinkView) return
view
.
hideLoading
()
//
view.hideLoading()
}
//
}
//
override
fun
onNext
(
baseResponse
:
BaseResponse
<
NineShowBean
>)
{
//
override fun onNext(baseResponse: BaseResponse<NineShowBean>) {
if
(
isLinkView
)
return
//
if (isLinkView) return
//
view
.
hideLoading
()
//
view.hideLoading()
val
code
=
baseResponse
.
status
//
val code = baseResponse.status
val
message
=
baseResponse
.
message
//
val message = baseResponse.message
//
when
(
code
)
{
//
when (code) {
200
->
view
.
showTurnSuc
(
baseResponse
.
data
)
//
200 -> view.showTurnSuc(baseResponse.data)
else
->
{
//
else -> {
view
.
showToast
(
message
)
////
view.showToast(message)
}
//
}
}
//
}
}
//
}
//
override
fun
onError
(
e
:
Throwable
?)
{
//
override fun onError(e: Throwable?) {
if
(
isLinkView
)
return
//
if (isLinkView) return
view
.
hideLoading
()
//
view.hideLoading()
view
.
showToast
(
e
?.
message
)
//
view.showToast(e?.message)
}
//
}
})
//
})
}
}
...
...
video/app/src/main/java/com/duben/miaoquplaylet/net/LoanService.java
View file @
525cffb2
...
@@ -155,7 +155,7 @@ public interface LoanService {
...
@@ -155,7 +155,7 @@ public interface LoanService {
*
*
* @return
* @return
*/
*/
@POST
(
"api/vedio/unlock"
)
@POST
(
"api/vedio
V1
/unlock"
)
Observable
<
BaseResponse
<
IndexList
>>
unlock
(
@Body
Map
<
String
,
Object
>
vo
);
Observable
<
BaseResponse
<
IndexList
>>
unlock
(
@Body
Map
<
String
,
Object
>
vo
);
/**
/**
...
@@ -163,7 +163,7 @@ public interface LoanService {
...
@@ -163,7 +163,7 @@ public interface LoanService {
*
*
* @return
* @return
*/
*/
@POST
(
"api/vedio/types"
)
@POST
(
"api/vedio
V1
/types"
)
Observable
<
BaseResponse
<
HotStyleTypesList
>>
getHomeV1Types
();
Observable
<
BaseResponse
<
HotStyleTypesList
>>
getHomeV1Types
();
/**
/**
...
@@ -171,7 +171,7 @@ public interface LoanService {
...
@@ -171,7 +171,7 @@ public interface LoanService {
*
*
* @return
* @return
*/
*/
@POST
(
"api/vedio/listByType"
)
@POST
(
"api/vedio
V1
/listByType"
)
Observable
<
BaseResponse
<
BannerList
>>
getHomeV1List
(
@Body
Map
<
String
,
Object
>
vo
);
Observable
<
BaseResponse
<
BannerList
>>
getHomeV1List
(
@Body
Map
<
String
,
Object
>
vo
);
/**
/**
...
@@ -179,7 +179,7 @@ public interface LoanService {
...
@@ -179,7 +179,7 @@ public interface LoanService {
*
*
* @return
* @return
*/
*/
@POST
(
"api/vedio/feedback"
)
@POST
(
"api/vedio
V1
/feedback"
)
Observable
<
BaseResponse
<
Object
>>
feedback
(
@Body
Map
<
String
,
Object
>
vo
);
Observable
<
BaseResponse
<
Object
>>
feedback
(
@Body
Map
<
String
,
Object
>
vo
);
/**
/**
...
@@ -187,7 +187,7 @@ public interface LoanService {
...
@@ -187,7 +187,7 @@ public interface LoanService {
*
*
* @return
* @return
*/
*/
@POST
(
"api/vedio/topTabs/v0821"
)
@POST
(
"api/vedio
V1
/topTabs/v0821"
)
Observable
<
BaseResponse
<
BannerList
>>
topTabs
();
Observable
<
BaseResponse
<
BannerList
>>
topTabs
();
/**
/**
...
@@ -195,7 +195,7 @@ public interface LoanService {
...
@@ -195,7 +195,7 @@ public interface LoanService {
*
*
* @return
* @return
*/
*/
@POST
(
"api/vedio/orders"
)
@POST
(
"api/vedio
V1
/orders"
)
Observable
<
BaseResponse
<
BannerList
>>
orders
();
Observable
<
BaseResponse
<
BannerList
>>
orders
();
...
@@ -204,7 +204,7 @@ public interface LoanService {
...
@@ -204,7 +204,7 @@ public interface LoanService {
*
*
* @return
* @return
*/
*/
@POST
(
"api/vedio/getIndexList"
)
@POST
(
"api/vedio
V1
/getIndexList"
)
Observable
<
BaseResponse
<
IndexList
>>
getIndexList
(
@Body
Map
<
String
,
Object
>
vo
);
Observable
<
BaseResponse
<
IndexList
>>
getIndexList
(
@Body
Map
<
String
,
Object
>
vo
);
/**
/**
...
@@ -212,7 +212,7 @@ public interface LoanService {
...
@@ -212,7 +212,7 @@ public interface LoanService {
*
*
* @return
* @return
*/
*/
@POST
(
"api/vedio/getIndexList"
)
@POST
(
"api/vedio
V1
/getIndexList"
)
Observable
<
BaseResponse
<
IndexList
>>
getIndexList2
(
@Body
Map
<
String
,
Object
>
vo
);
Observable
<
BaseResponse
<
IndexList
>>
getIndexList2
(
@Body
Map
<
String
,
Object
>
vo
);
/**
/**
...
@@ -220,7 +220,7 @@ public interface LoanService {
...
@@ -220,7 +220,7 @@ public interface LoanService {
*
*
* @return
* @return
*/
*/
@POST
(
"api/vedio/getIndex"
)
@POST
(
"api/vedio
V1
/getIndex"
)
Observable
<
BaseResponse
<
Object
>>
getIndex
(
@Body
Map
<
String
,
Object
>
vo
);
Observable
<
BaseResponse
<
Object
>>
getIndex
(
@Body
Map
<
String
,
Object
>
vo
);
/**
/**
...
@@ -228,7 +228,7 @@ public interface LoanService {
...
@@ -228,7 +228,7 @@ public interface LoanService {
*
*
* @return
* @return
*/
*/
@POST
(
"api/vedio/collect"
)
@POST
(
"api/vedio
V1
/collect"
)
Observable
<
BaseResponse
<
Object
>>
collect
(
@Body
Map
<
String
,
Object
>
vo
);
Observable
<
BaseResponse
<
Object
>>
collect
(
@Body
Map
<
String
,
Object
>
vo
);
/**
/**
...
@@ -236,7 +236,7 @@ public interface LoanService {
...
@@ -236,7 +236,7 @@ public interface LoanService {
*
*
* @return
* @return
*/
*/
@POST
(
"api/vedio/cancelCollect"
)
@POST
(
"api/vedio
V1
/cancelCollect"
)
Observable
<
BaseResponse
<
Object
>>
cancelCollect
(
@Body
Map
<
String
,
Object
>
vo
);
Observable
<
BaseResponse
<
Object
>>
cancelCollect
(
@Body
Map
<
String
,
Object
>
vo
);
/**
/**
...
@@ -244,7 +244,7 @@ public interface LoanService {
...
@@ -244,7 +244,7 @@ public interface LoanService {
*
*
* @return
* @return
*/
*/
@POST
(
"api/vedio/collectList"
)
@POST
(
"api/vedio
V1
/collectList"
)
Observable
<
BaseResponse
<
BannerList
>>
collectList
();
Observable
<
BaseResponse
<
BannerList
>>
collectList
();
/**
/**
...
@@ -260,73 +260,73 @@ public interface LoanService {
...
@@ -260,73 +260,73 @@ public interface LoanService {
*
*
* @return
* @return
*/
*/
@POST
(
"api/vedio/history"
)
@POST
(
"api/vedio
V1
/history"
)
Observable
<
BaseResponse
<
BannerList
>>
history
();
Observable
<
BaseResponse
<
BannerList
>>
history
();
/**
/**
* 提交视频信息
* 提交视频信息
*/
*/
@POST
(
"api/vedio/reportIndex"
)
@POST
(
"api/vedio
V1
/reportIndex"
)
Observable
<
BaseResponse
<
Object
>>
reportIndex
(
@Body
Map
<
String
,
Object
>
vo
);
Observable
<
BaseResponse
<
Object
>>
reportIndex
(
@Body
Map
<
String
,
Object
>
vo
);
/**
/**
* 推荐
* 推荐
*/
*/
@POST
(
"api/vedio/autoList"
)
@POST
(
"api/vedio
V1
/autoList"
)
Observable
<
BaseResponse
<
BannerList
>>
autoList
();
Observable
<
BaseResponse
<
BannerList
>>
autoList
();
/**
/**
* 穿山甲上传剧集
* 穿山甲上传剧集
*/
*/
@POST
(
"api/vedio/initCsj"
)
@POST
(
"api/vedio
V1
/initCsj"
)
Observable
<
BaseResponse
<
Object
>>
commitCsjShotInfo
(
@Body
Map
<
String
,
Object
>
vo
);
Observable
<
BaseResponse
<
Object
>>
commitCsjShotInfo
(
@Body
Map
<
String
,
Object
>
vo
);
/**
/**
* 推荐
* 推荐
*/
*/
@POST
(
"api/vedio/firstVedio"
)
@POST
(
"api/vedio
V1
/firstVedio"
)
Observable
<
BaseResponse
<
IndexList
>>
getSoltVedio
();
Observable
<
BaseResponse
<
IndexList
>>
getSoltVedio
();
/**
/**
* 匹配推荐
* 匹配推荐
*/
*/
@POST
(
"api/vedio/vedio3Msg"
)
@POST
(
"api/vedio
V1
/vedio3Msg"
)
Observable
<
BaseResponse
<
RecoBean
>>
getRecommendVedio
();
Observable
<
BaseResponse
<
RecoBean
>>
getRecommendVedio
();
/**
/**
* 9宫格信息
* 9宫格信息
*/
*/
@POST
(
"api/vedio/getTurnConfig"
)
@POST
(
"api/vedio
V1
/getTurnConfig"
)
Observable
<
BaseResponse
<
NineListBean
>>
getTurnConfig
();
Observable
<
BaseResponse
<
NineListBean
>>
getTurnConfig
();
/**
/**
* 9宫格抽奖
* 9宫格抽奖
*/
*/
@POST
(
"api/vedio/toTurn"
)
@POST
(
"api/vedio
V1
/toTurn"
)
Observable
<
BaseResponse
<
NineListBean
.
NineBean
>>
toTurn
();
Observable
<
BaseResponse
<
NineListBean
.
NineBean
>>
toTurn
();
/**
/**
* 是否展示9宫格
* 是否展示9宫格
*/
*/
@POST
(
"api/vedio/showTurn"
)
@POST
(
"api/vedio
V1
/showTurn"
)
Observable
<
BaseResponse
<
NineShowBean
>>
showTurn
();
Observable
<
BaseResponse
<
NineShowBean
>>
showTurn
();
/**
/**
* 获取推荐状态
* 获取推荐状态
*/
*/
@POST
(
"api/vedio/showVedio4"
)
@POST
(
"api/vedio
V1
/showVedio4"
)
Observable
<
BaseResponse
<
JsonObject
>>
firstShowVedio
();
Observable
<
BaseResponse
<
JsonObject
>>
firstShowVedio
();
/**
/**
* 推荐banner
* 推荐banner
*/
*/
@POST
(
"api/vedio/vedio4Msg"
)
@POST
(
"api/vedio
V1
/vedio4Msg"
)
Observable
<
BaseResponse
<
RecommendBannerList
>>
vedio4Msg
(
@Body
Map
<
String
,
Object
>
vo
);
Observable
<
BaseResponse
<
RecommendBannerList
>>
vedio4Msg
(
@Body
Map
<
String
,
Object
>
vo
);
/**
/**
* Vip尊享剧场
* Vip尊享剧场
*/
*/
@POST
(
"api/vedio/vedio4List"
)
@POST
(
"api/vedio
V1
/vedio4List"
)
Observable
<
BaseResponse
<
BannerList
>>
vedio4List
(
@Body
Map
<
String
,
Object
>
vo
);
Observable
<
BaseResponse
<
BannerList
>>
vedio4List
(
@Body
Map
<
String
,
Object
>
vo
);
/**
/**
...
...
video/app/src/main/java/com/duben/miaoquplaylet/ui/fragment/MainFragment.kt
View file @
525cffb2
...
@@ -134,7 +134,7 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
...
@@ -134,7 +134,7 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
homePresenter
.
topTabs
()
homePresenter
.
topTabs
()
homePresenter
.
orders
()
homePresenter
.
orders
()
TrackManager
.
getInstance
().
getMyInfo
()
TrackManager
.
getInstance
().
getMyInfo
()
showRecommendAct
()
//
showRecommendAct()
}
}
}
}
}
}
...
@@ -379,11 +379,21 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
...
@@ -379,11 +379,21 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
override
fun
onHiddenChanged
(
hidden
:
Boolean
)
{
override
fun
onHiddenChanged
(
hidden
:
Boolean
)
{
super
.
onHiddenChanged
(
hidden
)
super
.
onHiddenChanged
(
hidden
)
if
(
isHidden
)
{
// if (isHidden) {
vpAdapter
?.
getFragments
()
?.
get
(
mSelectTabIndex
)
?.
onPause
()
// vpAdapter?.getFragments()?.get(mSelectTabIndex)?.onPause()
}
else
{
// } else {
vpAdapter
?.
getFragments
()
?.
get
(
mSelectTabIndex
)
?.
onResume
()
// vpAdapter?.getFragments()?.get(mSelectTabIndex)?.onResume()
}
// }
}
override
fun
onFragmentResume
(
firstResume
:
Boolean
)
{
super
.
onFragmentResume
(
firstResume
)
vpAdapter
?.
getFragments
()
?.
get
(
mSelectTabIndex
)
?.
onResume
()
}
override
fun
onPause
()
{
super
.
onPause
()
vpAdapter
?.
getFragments
()
?.
get
(
mSelectTabIndex
)
?.
onPause
()
}
}
/**
/**
...
...
video/app/src/main/java/com/duben/miaoquplaylet/video/tx/adapter/TxVideoAdapter.kt
View file @
525cffb2
...
@@ -87,16 +87,13 @@ class TxVideoAdapter : BaseMultiItemQuickAdapter<VideoMultiItemEntity, BaseViewH
...
@@ -87,16 +87,13 @@ class TxVideoAdapter : BaseMultiItemQuickAdapter<VideoMultiItemEntity, BaseViewH
if
(
it
.
isRecommendVedio
)
{
// 推荐剧集逻辑
if
(
it
.
isRecommendVedio
)
{
// 推荐剧集逻辑
if
(
holder
.
adapterPosition
<
it
.
unlockIndex
)
{
// 观看激励视频解锁
if
(
holder
.
adapterPosition
<
it
.
unlockIndex
)
{
// 观看激励视频解锁
vipBtn
.
visibility
=
View
.
GONE
adBtn
.
visibility
=
View
.
GONE
adBtn
.
visibility
=
View
.
VISIBLE
vipBtn
.
visibility
=
View
.
VISIBLE
holder
.
getView
<
TextView
>(
R
.
id
.
tv_title
).
text
=
String
.
format
(
"解锁%s·第%d集"
,
holder
.
getView
<
TextView
>(
R
.
id
.
tv_info
).
visibility
=
View
.
GONE
it
.
title
,
vipBtn
.
setBackgroundResource
(
R
.
mipmap
.
bg_detail_bottom_vip
)
holder
.
adapterPosition
+
1
holder
.
getView
<
TextView
>(
R
.
id
.
tv_title
).
text
=
)
String
.
format
(
"解锁%s·全集"
,
it
.
title
)
holder
.
getView
<
TextView
>(
R
.
id
.
tv_info
).
text
=
String
.
format
(
"看激励视频解锁1集剧情\n请按照顺序解锁"
)
}
else
{
// 开通会员解锁
}
else
{
// 开通会员解锁
adBtn
.
visibility
=
View
.
GONE
adBtn
.
visibility
=
View
.
GONE
vipBtn
.
visibility
=
View
.
VISIBLE
vipBtn
.
visibility
=
View
.
VISIBLE
...
@@ -108,18 +105,13 @@ class TxVideoAdapter : BaseMultiItemQuickAdapter<VideoMultiItemEntity, BaseViewH
...
@@ -108,18 +105,13 @@ class TxVideoAdapter : BaseMultiItemQuickAdapter<VideoMultiItemEntity, BaseViewH
}
}
}
else
{
}
else
{
adBtn
.
visibility
=
View
.
VISIBLE
adBtn
.
visibility
=
View
.
GONE
vipBtn
.
visibility
=
View
.
VISIBLE
holder
.
getView
<
TextView
>(
R
.
id
.
tv_title
).
text
=
String
.
format
(
"解锁%s·第%d-%d集"
,
holder
.
getView
<
TextView
>(
R
.
id
.
tv_info
).
visibility
=
View
.
GONE
it
.
title
,
vipBtn
.
setBackgroundResource
(
R
.
mipmap
.
bg_detail_bottom_vip
)
it
.
unlockIndex
+
1
,
holder
.
getView
<
TextView
>(
R
.
id
.
tv_title
).
text
=
it
.
unlockIndex
+
it
.
adGiveVedioNum
String
.
format
(
"解锁%s·全集"
,
it
.
title
)
)
holder
.
getView
<
TextView
>(
R
.
id
.
tv_info
).
text
=
String
.
format
(
"看激励视频解锁%d集剧情\n请按照顺序解锁"
,
it
.
adGiveVedioNum
)
}
}
holder
.
getView
<
TextView
>(
R
.
id
.
unlock
).
text
=
String
.
format
(
"查看激励视频"
)
holder
.
getView
<
TextView
>(
R
.
id
.
unlock
).
text
=
String
.
format
(
"查看激励视频"
)
holder
.
getView
<
View
>(
R
.
id
.
unlock
).
setOnClickListener
{
it2
->
holder
.
getView
<
View
>(
R
.
id
.
unlock
).
setOnClickListener
{
it2
->
...
...
video/app/src/main/java/com/duben/miaoquplaylet/video/tx/newrecommend/NewTxVideoAdapter.kt
View file @
525cffb2
...
@@ -59,16 +59,13 @@ class NewTxVideoAdapter : BaseMultiItemQuickAdapter<VideoMultiItemEntity4, BaseV
...
@@ -59,16 +59,13 @@ class NewTxVideoAdapter : BaseMultiItemQuickAdapter<VideoMultiItemEntity4, BaseV
vedioBean
?.
let
{
vedioBean
?.
let
{
when
(
type
)
{
when
(
type
)
{
VEDIO3DOS_AD
->
{
// 观看激励视频解锁
VEDIO3DOS_AD
->
{
// 观看激励视频解锁
vipBtn
.
visibility
=
View
.
GONE
adBtn
.
visibility
=
View
.
GONE
adBtn
.
visibility
=
View
.
VISIBLE
vipBtn
.
visibility
=
View
.
VISIBLE
holder
.
getView
<
TextView
>(
R
.
id
.
tv_title
).
text
=
String
.
format
(
"解锁%s·第%d集"
,
holder
.
getView
<
TextView
>(
R
.
id
.
tv_info
).
visibility
=
View
.
GONE
it
.
title
,
vipBtn
.
setBackgroundResource
(
R
.
mipmap
.
bg_detail_bottom_vip
)
holder
.
adapterPosition
+
1
holder
.
getView
<
TextView
>(
R
.
id
.
tv_title
).
text
=
)
String
.
format
(
"解锁%s·全集"
,
it
.
title
)
holder
.
getView
<
TextView
>(
R
.
id
.
tv_info
).
text
=
String
.
format
(
"看激励视频解锁1集剧情\n请按照顺序解锁"
)
}
}
VEDIO3DOS_PAY
->
{
// 开通会员解锁
VEDIO3DOS_PAY
->
{
// 开通会员解锁
adBtn
.
visibility
=
View
.
GONE
adBtn
.
visibility
=
View
.
GONE
...
@@ -80,18 +77,13 @@ class NewTxVideoAdapter : BaseMultiItemQuickAdapter<VideoMultiItemEntity4, BaseV
...
@@ -80,18 +77,13 @@ class NewTxVideoAdapter : BaseMultiItemQuickAdapter<VideoMultiItemEntity4, BaseV
String
.
format
(
"解锁%s·全集"
,
it
.
title
)
String
.
format
(
"解锁%s·全集"
,
it
.
title
)
}
}
else
->
{
else
->
{
adBtn
.
visibility
=
View
.
VISIBLE
adBtn
.
visibility
=
View
.
GONE
vipBtn
.
visibility
=
View
.
VISIBLE
holder
.
getView
<
TextView
>(
R
.
id
.
tv_title
).
text
=
String
.
format
(
"解锁%s·第%d-%d集"
,
holder
.
getView
<
TextView
>(
R
.
id
.
tv_info
).
visibility
=
View
.
GONE
it
.
title
,
vipBtn
.
setBackgroundResource
(
R
.
mipmap
.
bg_detail_bottom_vip
)
it
.
unlockIndex
+
1
,
holder
.
getView
<
TextView
>(
R
.
id
.
tv_title
).
text
=
it
.
unlockIndex
+
it
.
adGiveVedioNum
String
.
format
(
"解锁%s·全集"
,
it
.
title
)
)
holder
.
getView
<
TextView
>(
R
.
id
.
tv_info
).
text
=
String
.
format
(
"看激励视频解锁%d集剧情\n请按照顺序解锁"
,
it
.
adGiveVedioNum
)
}
}
}
}
...
...
video/app/src/main/res/layout/item_block_view.xml
View file @
525cffb2
...
@@ -44,6 +44,7 @@
...
@@ -44,6 +44,7 @@
android:textStyle=
"bold"
/>
android:textStyle=
"bold"
/>
<TextView
<TextView
android:visibility=
"invisible"
android:id=
"@+id/tv_info"
android:id=
"@+id/tv_info"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
@@ -52,6 +53,7 @@
...
@@ -52,6 +53,7 @@
android:text=
"试看已结束"
/>
android:text=
"试看已结束"
/>
<Button
<Button
android:visibility=
"invisible"
android:id=
"@+id/unlock"
android:id=
"@+id/unlock"
android:layout_width=
"230dp"
android:layout_width=
"230dp"
android:layout_height=
"40dp"
android:layout_height=
"40dp"
...
...
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