Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_vediosocial
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_vediosocial
Commits
aed2f222
Commit
aed2f222
authored
Jan 08, 2025
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加穿山甲短剧sdk
parent
a15540eb
Changes
25
Show whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
1833 additions
and
36 deletions
+1833
-36
build.gradle
video/app/build.gradle
+5
-0
AndroidManifest.xml
video/app/src/main/AndroidManifest.xml
+4
-0
SDK_Setting_5458827.json
video/app/src/main/assets/SDK_Setting_5458827.json
+73
-0
MintsApplication.java
...src/main/java/com/duben/roseplaylet/MintsApplication.java
+6
-0
TTAdManagerHolder.java
...main/java/com/duben/roseplaylet/ad/TTAdManagerHolder.java
+4
-1
CsjDJXSdkManager.kt
...in/java/com/duben/roseplaylet/manager/CsjDJXSdkManager.kt
+180
-0
VedioBean.java
.../main/java/com/duben/roseplaylet/mvp/model/VedioBean.java
+10
-0
FirstPresenter.kt
...va/com/duben/roseplaylet/mvp/presenters/FirstPresenter.kt
+99
-0
FirstView.kt
...rc/main/java/com/duben/roseplaylet/mvp/views/FirstView.kt
+6
-0
CsjDetailActivity.kt
...a/com/duben/roseplaylet/ui/activitys/CsjDetailActivity.kt
+337
-0
MainActivity.kt
...n/java/com/duben/roseplaylet/ui/activitys/MainActivity.kt
+10
-13
CsjVideoPageAdapter.kt
...a/com/duben/roseplaylet/ui/adapter/CsjVideoPageAdapter.kt
+42
-0
CsjMovieFragment.kt
...ava/com/duben/roseplaylet/ui/fragment/CsjMovieFragment.kt
+277
-0
CsjVedioFragment.kt
...ava/com/duben/roseplaylet/ui/fragment/CsjVedioFragment.kt
+227
-0
FirstFragment.kt
...n/java/com/duben/roseplaylet/ui/fragment/FirstFragment.kt
+123
-0
MainFragment.kt
...in/java/com/duben/roseplaylet/ui/fragment/MainFragment.kt
+22
-15
UnlockDialog.kt
...ain/java/com/duben/roseplaylet/ui/widgets/UnlockDialog.kt
+57
-0
activity_csjdetail.xml
video/app/src/main/res/layout/activity_csjdetail.xml
+13
-0
dialog_unlock.xml
video/app/src/main/res/layout/dialog_unlock.xml
+102
-0
fragment_csjmovie.xml
video/app/src/main/res/layout/fragment_csjmovie.xml
+36
-0
fragment_csjvedio.xml
video/app/src/main/res/layout/fragment_csjvedio.xml
+165
-0
fragment_first.xml
video/app/src/main/res/layout/fragment_first.xml
+25
-0
item_recommend_tab.xml
video/app/src/main/res/layout/item_recommend_tab.xml
+2
-1
strings.xml
video/app/src/main/res/values/strings.xml
+2
-0
gradle.properties
video/gradle.properties
+6
-6
No files found.
video/app/build.gradle
View file @
aed2f222
...
@@ -223,6 +223,11 @@ dependencies {
...
@@ -223,6 +223,11 @@ dependencies {
// 穿山甲聚合 接入【穿山甲、快手】
// 穿山甲聚合 接入【穿山甲、快手】
implementation
"com.pangle.cn:mediation-sdk:6.4.1.5"
implementation
"com.pangle.cn:mediation-sdk:6.4.1.5"
// 穿山甲短剧
// implementation 'com.pangle.cn:ads-sdk-pro:6.4.1.5'
implementation
'com.pangle.cn:pangrowth-base:2.6.0.0'
implementation
'com.pangle.cn:pangrowth-djx-sdk-lite:2.6.0.0'
// 穿山甲Applog 上报组件(必须)
// 穿山甲Applog 上报组件(必须)
implementation
'com.bytedance.applog:RangersAppLog-Lite-cn:6.16.9'
implementation
'com.bytedance.applog:RangersAppLog-Lite-cn:6.16.9'
// 穿山甲商业化转化组件(必须)
// 穿山甲商业化转化组件(必须)
...
...
video/app/src/main/AndroidManifest.xml
View file @
aed2f222
...
@@ -138,6 +138,10 @@
...
@@ -138,6 +138,10 @@
android:name=
".ui.activitys.AboutusActivity"
android:name=
".ui.activitys.AboutusActivity"
android:exported=
"false"
android:exported=
"false"
android:screenOrientation=
"portrait"
/>
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.activitys.CsjDetailActivity"
android:exported=
"false"
android:screenOrientation=
"portrait"
/>
<activity
<activity
android:name=
".ui.activitys.OrderRecordActivity"
android:name=
".ui.activitys.OrderRecordActivity"
android:exported=
"false"
android:exported=
"false"
...
...
video/app/src/main/assets/SDK_Setting_5458827.json
0 → 100644
View file @
aed2f222
{
"init"
:
{
"site_id"
:
"5458827"
,
"app_id"
:
"568164"
,
"partner"
:
"pangle_568164"
,
"secure_key"
:
"647c996ce2f452df17ed73d77a808a6a"
,
"secure_key_d"
:
"410345d2ec668d63a1aea3c8a745d5bd"
},
"feed"
:
{
"news_list_ad_code_id"
:
""
,
"news_first_ad_code_id"
:
""
,
"news_second_ad_code_id"
:
""
,
"video_first_ad_code_id"
:
""
,
"video_second_ad_code_id"
:
""
,
"related_ad_code_id"
:
""
,
"news_draw_ad_code_id"
:
"954961061"
,
"news_draw_native_ad_code_id"
:
"954961062"
,
"news_outer_list_ad_code_id"
:
""
,
"news_outer_first_ad_code_id"
:
""
,
"news_outer_second_ad_code_id"
:
""
,
"outer_video_second_ad_code_id"
:
""
,
"outer_related_ad_code_id"
:
""
,
"news_outer_draw_ad_code_id"
:
"954961065"
,
"news_outer_draw_native_ad_code_id"
:
"954961069"
,
"news_interstitial_code_id"
:
""
},
"small_video"
:
{
"draw_ad_code_id"
:
"954961080"
,
"draw_native_ad_code_id"
:
"954961081"
,
"grid_ad_code_id"
:
"954961083"
,
"grid_draw_ad_code_id"
:
"954961085"
,
"grid_draw_native_ad_code_id"
:
"954961076"
,
"video_card_ad_code_id"
:
"954961072"
,
"video_card_draw_ad_code_id"
:
"954961067"
,
"video_card_draw_native_ad_code_id"
:
"954961075"
,
"interstitial_ad_code_id"
:
""
,
"interstitial_note_ad_code_id"
:
"954961071"
,
"staggered_grid_ad_code_id"
:
"954961078"
,
"staggered_grid_draw_ad_code_id"
:
"954961080"
,
"staggered_grid_draw_native_ad_code_id"
:
"954961081"
,
"draw_interstitial_ad_code_id"
:
"954961070"
,
"draw_fullscreen_interstitial_ad_code_id"
:
"954961082"
,
"draw_banner_code_id"
:
"954961066"
,
"drama_rewarded_ad_code_id"
:
"954961077"
,
"drama_rewarded_ad_code_id_02"
:
"954961063"
,
"drama_draw_ad_code_id"
:
"954961073"
,
"staggered_grid_ad_code_id_02"
:
"961667898"
},
"novel"
:
{
"status"
:
0
,
"pre_ad_code_id"
:
""
,
"mid_ad_code_id"
:
""
,
"exciting_ad_code_id"
:
""
,
"interstitial_code_id"
:
""
,
"banner_ad_code_id"
:
""
,
"end_ad_code_id"
:
""
},
"live"
:
null
,
"license_config"
:
[
{
"PackageName"
:
"com.duben.roseplaylet"
,
"BundleId"
:
"com.duben.roseplaylet"
,
"StartTime"
:
"20250108T090808Z"
,
"ExpireTime"
:
"20270108T090808Z"
,
"CreatedTime"
:
"20250108T090807Z"
,
"Signature"
:
"BfQIVvZw+lEBU4jTsn0G609hsXCRIaimSx09z2YWgn6QSdFU6XQcenbYbwyYR290usNAiV4FCuepcQtryfHAZYT2+yiYdRq3fjKuSGeVwm0vev8pHOfaSPPTywqVpnxk13deUQxAB6XW0lDX8oyg9hcaLFZgOjsMXMbremSYF6rBW51NX5sGFhbJ5ywSyJKA68Oi36ijgRmKZOCI44LyrbEtri5HPlUWjnAoulcD1GlzNumocWRfddzoCXbqpXsAQTGY/uEihke/2JN57fD8PCS9B4SPhVKsmRVMGEg5/fIIGUlYW+fp9/nu2QPj6quIFQY8ySdchiT/aV9WcrXdaQ=="
,
"Content"
:
"eyJJZCI6Ijk0MDIzMDY3MSIsICJWZXJzaW9uIjoyLCAiQ2hhbm5lbCI6ImFkX2NzaiIsICJUeXBlIjoyLCAiUGFja2FnZU5hbWUiOiJjb20uZHViZW4ucm9zZXBsYXlsZXQiLCAiQnVuZGxlSWQiOiJjb20uZHViZW4ucm9zZXBsYXlsZXQiLCAiTW9kdWxlcyI6W3siTmFtZSI6InZvZF9wbGF5IiwgIkVkaXRpb24iOiJwcmVtaXVtX2VkaXRpb24iLCAiU3RhcnRUaW1lIjoxNzM2MzI3Mjg3NzcwLCAiRXhwaXJlVGltZSI6MTc5OTM5OTI4Nzc3MCwgIkV4cGlyZUJ1ZmZlciI6MTU1NTIwMDAwMDB9XSwgIkZpbGVWZXJzaW9uIjoiMTczNjMyNzI4Nzc4NTE2MjAzNiJ9"
,
"MainURL"
:
"https://vod-license-b.volccdn.com/vod-license/l-940230671-ch-ad_csj-a-568164.lic?lk3s=0d9f7a7d
\u
0026x-expires=4889927287
\u
0026x-signature=v1R%2FDnmkTZl%2Bk%2B0AIseUC1abRFY%3D"
,
"BackupURL"
:
"https://vod-license-m.volccdn.com/vod-license/l-940230671-ch-ad_csj-a-568164.lic?lk3s=0d9f7a7d
\u
0026x-expires=4889927287
\u
0026x-signature=fQli%2FQNn4XF9Z1alH4qh5o84OLQ%3D"
,
"Id"
:
"940230671"
}
]
}
\ No newline at end of file
video/app/src/main/java/com/duben/roseplaylet/MintsApplication.java
View file @
aed2f222
package
com
.
duben
.
roseplaylet
;
package
com
.
duben
.
roseplaylet
;
import
android.app.Application
;
import
android.content.Context
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.content.Intent
;
...
@@ -12,6 +13,7 @@ import com.downloader.PRDownloaderConfig;
...
@@ -12,6 +13,7 @@ import com.downloader.PRDownloaderConfig;
import
com.duben.roseplaylet.ad.TTAdManagerHolder
;
import
com.duben.roseplaylet.ad.TTAdManagerHolder
;
import
com.duben.roseplaylet.common.Constant
;
import
com.duben.roseplaylet.common.Constant
;
import
com.duben.roseplaylet.manager.CsjAppLogManager
;
import
com.duben.roseplaylet.manager.CsjAppLogManager
;
import
com.duben.roseplaylet.manager.CsjDJXSdkManager
;
import
com.duben.roseplaylet.manager.TXCSDKService
;
import
com.duben.roseplaylet.manager.TXCSDKService
;
import
com.duben.roseplaylet.manager.TalkingDataManager
;
import
com.duben.roseplaylet.manager.TalkingDataManager
;
import
com.duben.roseplaylet.net.LoanService
;
import
com.duben.roseplaylet.net.LoanService
;
...
@@ -80,12 +82,16 @@ public class MintsApplication extends MultiDexApplication {
...
@@ -80,12 +82,16 @@ public class MintsApplication extends MultiDexApplication {
TTAdManagerHolder
.
init
(
this
);
TTAdManagerHolder
.
init
(
this
);
CsjDJXSdkManager
.
INSTANCE
.
init
(
this
);
TXCSDKService
.
init
(
this
);
TXCSDKService
.
init
(
this
);
CsjAppLogManager
.
INSTANCE
.
init
(
this
);
CsjAppLogManager
.
INSTANCE
.
init
(
this
);
TalkingDataManager
.
INSTANCE
.
init
(
this
);
TalkingDataManager
.
INSTANCE
.
init
(
this
);
// PR下载附件
// PR下载附件
initPRDownloader
();
initPRDownloader
();
...
...
video/app/src/main/java/com/duben/roseplaylet/ad/TTAdManagerHolder.java
View file @
aed2f222
package
com
.
duben
.
roseplaylet
.
ad
;
package
com
.
duben
.
roseplaylet
.
ad
;
import
android.app.Application
;
import
android.content.Context
;
import
android.content.Context
;
import
android.util.Log
;
import
android.util.Log
;
...
@@ -13,6 +14,7 @@ import com.bytedance.sdk.openadsdk.mediation.init.MediationPrivacyConfig;
...
@@ -13,6 +14,7 @@ import com.bytedance.sdk.openadsdk.mediation.init.MediationPrivacyConfig;
import
com.duben.roseplaylet.BuildConfig
;
import
com.duben.roseplaylet.BuildConfig
;
import
com.duben.roseplaylet.MintsApplication
;
import
com.duben.roseplaylet.MintsApplication
;
import
com.duben.roseplaylet.common.Constant
;
import
com.duben.roseplaylet.common.Constant
;
import
com.duben.roseplaylet.manager.CsjDJXSdkManager
;
import
com.duben.roseplaylet.utils.AppPreferencesManager
;
import
com.duben.roseplaylet.utils.AppPreferencesManager
;
import
com.duben.roseplaylet.utils.DeviceUuidFactory
;
import
com.duben.roseplaylet.utils.DeviceUuidFactory
;
import
com.duben.roseplaylet.utils.LogUtil
;
import
com.duben.roseplaylet.utils.LogUtil
;
...
@@ -54,7 +56,8 @@ public class TTAdManagerHolder {
...
@@ -54,7 +56,8 @@ public class TTAdManagerHolder {
TTAdSdk
.
start
(
new
TTAdSdk
.
Callback
()
{
TTAdSdk
.
start
(
new
TTAdSdk
.
Callback
()
{
@Override
@Override
public
void
success
()
{
public
void
success
()
{
Log
.
i
(
TAG
,
"success: "
+
TTAdSdk
.
isInitSuccess
());
LogUtil
.
d
(
TAG
,
"success: "
+
TTAdSdk
.
isInitSuccess
());
CsjDJXSdkManager
.
INSTANCE
.
start
((
Application
)
context
);
}
}
@Override
@Override
...
...
video/app/src/main/java/com/duben/roseplaylet/manager/CsjDJXSdkManager.kt
0 → 100644
View file @
aed2f222
package
com.duben.roseplaylet.manager
import
android.app.Application
import
android.widget.Toast
import
com.bytedance.sdk.djx.DJXSdk
import
com.bytedance.sdk.djx.DJXSdkConfig
import
com.bytedance.sdk.djx.IDJXService
import
com.bytedance.sdk.djx.model.DJXDrama
import
com.bytedance.sdk.djx.model.DJXError
import
com.bytedance.sdk.djx.model.DJXOthers
import
com.duben.library.utils.json.JsonUtil
import
com.duben.roseplaylet.BuildConfig
import
com.duben.roseplaylet.MintsApplication
import
com.duben.roseplaylet.mvp.model.HotStyleTypesBean
import
com.duben.roseplaylet.mvp.model.VedioBean
import
com.duben.roseplaylet.utils.LogUtil
/**
* 描述:穿山甲短剧
*
* 作者:孟崔广
*/
object
CsjDJXSdkManager
{
private
const
val
TAG
=
"CsjDJXSdkManager"
/**
* 短剧初始化
*
* 注意:穿山甲广告sdk初始成功后使用
*/
fun
init
(
application
:
Application
)
{
//初始化,最好放到application.onCreate()执行
val
config
=
DJXSdkConfig
.
Builder
().
build
()
DJXSdk
.
init
(
application
,
"SDK_Setting_5458827.json"
,
config
)
}
fun
start
(
application
:
Application
)
{
DJXSdk
.
start
(
object
:
DJXSdk
.
StartListener
{
override
fun
onStartComplete
(
p0
:
Boolean
,
p1
:
String
?,
p2
:
DJXError
?)
{
LogUtil
.
d
(
TAG
,
"p0 = $p0--p1 = $p1--p2 = ${JsonUtil.toJson(p2)}"
)
}
})
}
/**
* 短剧分类
*/
fun
requestDramaCategoryList
(
listener
:
CsjdramaCategoryListListener
)
{
if
(
DJXSdk
.
isStartSuccess
())
{
DJXSdk
.
service
()
.
requestDramaCategoryList
(
object
:
IDJXService
.
IDJXCallback
<
MutableList
<
String
>?>
{
override
fun
onError
(
error
:
DJXError
)
{
LogUtil
.
d
(
TAG
,
"request failed, code = $error"
)
listener
.
dramaCategoryListFail
()
}
override
fun
onSuccess
(
categoryList
:
MutableList
<
String
>?,
others
:
DJXOthers
?
)
{
val
hotStyleTypesBeanList
=
mutableListOf
<
HotStyleTypesBean
>()
categoryList
?.
let
{
list
->
list
?.
forEach
{
data
->
}
val
categoty
=
list
.
listIterator
()
while
(
categoty
.
hasNext
())
{
val
HotStyleTypesBean
=
HotStyleTypesBean
()
val
typeId
=
categoty
.
nextIndex
()
val
type
=
categoty
.
next
()
if
(
BuildConfig
.
DEBUG
)
{
LogUtil
.
d
(
TAG
,
"Index: ${typeId}, Category: ${type}"
)
}
HotStyleTypesBean
.
typeId
=
typeId
HotStyleTypesBean
.
type
=
type
HotStyleTypesBean
.
torder
=
typeId
hotStyleTypesBeanList
.
add
(
HotStyleTypesBean
)
}
listener
.
dramaCategoryListSuccess
(
hotStyleTypesBeanList
)
}
}
})
}
else
{
listener
.
dramaCategoryListFail
()
}
}
interface
CsjdramaCategoryListListener
{
fun
dramaCategoryListSuccess
(
list
:
MutableList
<
HotStyleTypesBean
>)
fun
dramaCategoryListFail
()
}
/**
* 按分类查询短剧
*/
fun
requestDramaByCategory
(
category
:
String
,
page
:
Int
,
size
:
Int
,
listener
:
CsjrequestDramaByCategoryListener
)
{
if
(
DJXSdk
.
isStartSuccess
())
{
val
order
=
0
// 0是正序 1是倒序
DJXSdk
.
service
().
requestDramaByCategory
(
category
,
page
,
size
,
order
,
object
:
IDJXService
.
IDJXCallback
<
MutableList
<
out
DJXDrama
>?>
{
override
fun
onError
(
error
:
DJXError
)
{
LogUtil
.
d
(
TAG
,
"drama category: request failed, code = $error"
)
listener
.
dramaCategoryListFail
()
}
override
fun
onSuccess
(
dataList
:
MutableList
<
out
DJXDrama
>?,
others
:
DJXOthers
?
)
{
val
vedioList
=
mutableListOf
<
VedioBean
>()
LogUtil
.
d
(
TAG
,
"request success, drama size = "
+
dataList
?.
size
)
dataList
?.
forEach
{
drama
->
LogUtil
.
d
(
TAG
,
"drama category: $drama"
)
//{freeSet=0, lockSet=1, reqId='202501071912576331796EC2409C457B02', groupId=0, providerId=2, channelId=0, rankId=1, visibility=false, id=1042, title='重回90年代', coverImage='https://p3-csj-sign.byteimg.com/tos-cn-i-4g66r8cj84/1c0eca384bef41569220a05b18b30976~tplv-4g66r8cj84-jpeg.image?rk3s=363bf5d8&x-expires=1736853177&x-signature=rCgxWR0dK60b2cLh9%2B527%2Be%2F7PA%3D', coverImages2='null', status=0, total=59, index=1, type='悬疑', typeId=4, desc='彭显光遭遇小人陷害,家破人亡,妻离子散;同时他意外穿越回1990年,遇到了已故的妻女,他发誓这辈子一定要好好守护妻女,抓住幕后的恶人,不会让历史重蹈覆辙!', scriptName='', scriptAuthor='', createTime=1693405348', actionTime=0', unlockIndex=0', episodeStatuses=null', icpNumber=1108324230306040}
val
vedioBean
=
VedioBean
()
vedioBean
.
completeStatus
=
0
vedioBean
.
title
=
drama
.
title
vedioBean
.
vedioDesc
=
drama
.
desc
vedioBean
.
coverImage
=
drama
.
coverImage
vedioBean
.
thirdId
=
drama
.
id
.
toString
()
// 设置短剧的免费集数
vedioBean
.
freeIndex
=
5
// 设置短剧广告解锁剧贪杯
vedioBean
.
unlockIndex
=
1
vedioList
.
add
(
vedioBean
)
}
listener
.
dramaCategoryListSuccess
(
vedioList
)
}
})
}
else
{
listener
.
dramaCategoryListFail
()
}
}
interface
CsjrequestDramaByCategoryListener
{
fun
dramaCategoryListSuccess
(
list
:
MutableList
<
VedioBean
>)
fun
dramaCategoryListFail
()
}
fun
requestDrama
(
id
:
Long
,
callback
:
(
DJXDrama
)
->
Unit
)
{
DJXSdk
.
service
().
requestDrama
(
listOf
(
id
),
object
:
IDJXService
.
IDJXCallback
<
MutableList
<
out
DJXDrama
>?>
{
override
fun
onError
(
error
:
DJXError
)
{
Toast
.
makeText
(
MintsApplication
.
getContext
(),
"请求失败"
,
Toast
.
LENGTH_SHORT
)
.
show
()
LogUtil
.
d
(
TAG
,
"request failed, code = $error"
)
}
override
fun
onSuccess
(
dataList
:
MutableList
<
out
DJXDrama
>?,
others
:
DJXOthers
?
)
{
dataList
?.
takeIf
{
it
.
isNotEmpty
()
}
?.
first
()
?.
let
{
//{freeSet=0, lockSet=1, reqId='20250108144948E0223379C7C0B34AB595', groupId=0, providerId=28, channelId=0, rankId=1, visibility=false, id=6187, title='荒楼诡事', coverImage='https://p6-csj-sign.byteimg.com/tos-cn-i-4g66r8cj84/650229886c2b4c44a0caf4342ccbe33e~tplv-4g66r8cj84-size:1000000.image?rk3s=363bf5d8&x-expires=1736923788&x-signature=c5Qnc%2F1KSmz5Hv2zzxSgvS5MFtk%3D', coverImages2='[DJXImage{url='https://p9-csj-sign.byteimg.com/tos-cn-i-4g66r8cj84/650229886c2b4c44a0caf4342ccbe33e~tplv-4g66r8cj84-image.image?rk3s=363bf5d8&x-expires=1736923788&x-signature=79ZTGJbUM7PclM3ZPkStGYj01%2BA%3D', backupUrl='https://p6-csj-sign.byteimg.com/tos-cn-i-4g66r8cj84/650229886c2b4c44a0caf4342ccbe33e~tplv-4g66r8cj84-image.image?rk3s=363bf5d8&x-expires=1736923788&x-signature=4TS9Xqs9PNM4ijwzudbNAKnkHSE%3D', definition='original'}, DJXImage{url='https://p9-csj-sign.byteimg.com/tos-cn-i-4g66r8cj84/650229886c2b4c44a0caf4342ccbe33e~tplv-4g66r8cj84-maxresize:540:10000:q80:1000000.image?rk3s=363bf5d8&x-expires=1736923788&x-signature=oSlF3QAC0R%2BpVlXM%2FSpj8tzWcXc%3D', backupUrl='https://p6-csj-sign.byteimg.com/tos-cn-i-4g66r8cj84/650229886c2b4c44a0caf4342ccbe33e~tplv-4g66r8cj84-maxresize:540:10000:q80:1000000.image?rk3s=363bf5d8&x-expires=1736923788&x-signature=Yt5nJhYdmE%2FyLrl4taZwLoJtVxo%3D', definition='540'}, DJXImage{url='https://p9-csj-sign.byteimg.com/tos-cn-i-4g66r8cj84/650229886c2b4c44a0caf4342ccbe33e~tplv-4g66r8cj84-maxresize:360:10000:q80:1000000.image?rk3s=363bf5d8&x-expires=1736923788&x-signature=4GNO43Mc4Ct%2FYhna%2FVgyCC6wADI%3D', backupUrl='https://p6-csj-sign.byteimg.com/tos-cn-i-4g66r8cj84/650229886c2b4c44a0caf4342ccbe33e~tplv-4g66r8cj84-maxresize:360:10000:q80:1000000.image?rk3s=363bf5d8&x-expires=1736923788&x-signature=TKJ%2FUqFGA6YUxDeMFupuUDoQ0R8%3D', definition='360'}]', status=0, total=100, index=1, type='悬疑', typeId=4, desc='西兰市近日发生3起女性奸杀的恶性连环杀人事件,近日的夜晚也因此而笼罩着诡异的氛围,一名长相靓丽的女人正走在偏僻的小道上,背后尾随着一位看起来人畜无害的纯情弟弟……', scriptName='', scriptAuthor='', createTime=1713952815', actionTime=0', unlockIndex=0', episodeStatuses=null', icpNumber=}
LogUtil
.
d
(
TAG
,
"request success, $it"
)
it
.
index
=
1
callback
.
invoke
(
it
)
}
}
})
}
}
\ No newline at end of file
video/app/src/main/java/com/duben/roseplaylet/mvp/model/VedioBean.java
View file @
aed2f222
...
@@ -30,6 +30,7 @@ public class VedioBean implements Serializable {
...
@@ -30,6 +30,7 @@ public class VedioBean implements Serializable {
private
String
recommendUrl
;
// 推荐视频地址
private
String
recommendUrl
;
// 推荐视频地址
private
int
recommendIndex
;
// 推荐视频第几集
private
int
recommendIndex
;
// 推荐视频第几集
private
long
seeUpdateTime
;
// 时间戳
private
long
seeUpdateTime
;
// 时间戳
private
long
groupId
;
//
private
boolean
checked
;
// 选中
private
boolean
checked
;
// 选中
private
boolean
isRecommendVedio
;
// 是否推荐剧
private
boolean
isRecommendVedio
;
// 是否推荐剧
private
int
tipMaxIndex
;
// 倒计时弹框
private
int
tipMaxIndex
;
// 倒计时弹框
...
@@ -259,6 +260,15 @@ public class VedioBean implements Serializable {
...
@@ -259,6 +260,15 @@ public class VedioBean implements Serializable {
}
}
public
void
setRecommendVedio
(
boolean
recommendVedio
)
{
public
void
setRecommendVedio
(
boolean
recommendVedio
)
{
isRecommendVedio
=
recommendVedio
;
isRecommendVedio
=
recommendVedio
;
}
}
public
long
getGroupId
()
{
return
groupId
;
}
public
void
setGroupId
(
long
groupId
)
{
this
.
groupId
=
groupId
;
}
}
}
video/app/src/main/java/com/duben/roseplaylet/mvp/presenters/FirstPresenter.kt
0 → 100644
View file @
aed2f222
package
com.duben.roseplaylet.mvp.presenters
import
com.duben.roseplaylet.MintsApplication
import
com.duben.roseplaylet.common.Constant
import
com.duben.roseplaylet.common.DeviceInfo
import
com.duben.roseplaylet.manager.AppHttpManager
import
com.duben.roseplaylet.manager.UserManager
import
com.duben.roseplaylet.mvp.model.*
import
com.duben.roseplaylet.mvp.views.HomeView
import
com.duben.roseplaylet.utils.AppPreferencesManager
import
com.duben.roseplaylet.utils.DeviceUuidFactory
import
com.duben.library.net.neterror.BaseSubscriber
import
com.duben.library.net.neterror.Throwable
import
com.duben.roseplaylet.common.AppConfig
import
com.duben.roseplaylet.mvp.views.FirstView
import
com.google.gson.JsonObject
import
java.util.HashMap
class
FirstPresenter
:
BasePresenter
<
FirstView
>()
{
/**
* 游客登录
*/
fun
userLogin
()
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"device"
]
=
DeviceUuidFactory
().
deviceUuid
.
toString
()
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
visitorlogin
(
vo
),
object
:
BaseSubscriber
<
BaseResponse
<
UserBean
>>()
{
override
fun
onCompleted
()
{
if
(
isLinkView
)
return
}
override
fun
onError
(
e
:
Throwable
)
{
if
(
isLinkView
)
return
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
UserBean
>)
{
if
(
isLinkView
)
return
view
.
hideLoading
()
val
code
=
baseResponse
.
getStatus
()
val
message
=
baseResponse
.
getMessage
()
val
data
:
UserBean
?
=
baseResponse
.
getData
()
when
(
code
)
{
200
->
if
(
data
!=
null
)
{
UserManager
.
getInstance
().
saveUserInfo
(
data
)
saveTerminalInfo
()
}
else
->
{
view
.
showToast
(
message
)
}
}
}
})
}
/**
* 提交设备信息
*
* @param context
*/
fun
saveTerminalInfo
()
{
val
vo
=
HashMap
<
String
,
Any
>()
val
deviceInfo
:
DeviceInfo
=
DeviceInfo
.
instance
val
macAddress
:
String
=
deviceInfo
.
getMacAddress
()
val
mac
=
macAddress
.
replace
(
":"
,
""
)
vo
[
"mac"
]
=
mac
vo
[
"mac1"
]
=
macAddress
vo
[
"androidid"
]
=
deviceInfo
.
getAndroidId
(
null
)
vo
[
"imei"
]
=
deviceInfo
.
iMEI
vo
[
"oaid"
]
=
MintsApplication
.
OAID
vo
[
"os"
]
=
if
(
deviceInfo
.
isHarmonyOS
())
"android-HarmonyOS"
else
"android"
vo
[
"model"
]
=
deviceInfo
.
newModel
vo
[
"uuid"
]
=
DeviceUuidFactory
().
deviceUuid
vo
[
"osversion"
]
=
deviceInfo
.
oSVersion
vo
[
"appversion"
]
=
deviceInfo
.
versionName
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
saveTerminalInfo
(
vo
),
object
:
BaseSubscriber
<
BaseResponse
<
Any
>>()
{
override
fun
onCompleted
()
{
if
(
isLinkView
)
return
}
override
fun
onError
(
e
:
Throwable
)
{
if
(
isLinkView
)
return
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
Any
>)
{
if
(
isLinkView
)
return
val
code
=
baseResponse
.
status
when
(
code
)
{
200
->
{
}
}
}
})
}
}
\ No newline at end of file
video/app/src/main/java/com/duben/roseplaylet/mvp/views/FirstView.kt
0 → 100644
View file @
aed2f222
package
com.duben.roseplaylet.mvp.views
interface
FirstView
:
BaseView
{
}
video/app/src/main/java/com/duben/roseplaylet/ui/activitys/CsjDetailActivity.kt
0 → 100644
View file @
aed2f222
package
com.duben.roseplaylet.ui.activitys
import
android.graphics.Color
import
android.os.Bundle
import
android.util.Log
import
android.view.Gravity
import
android.view.View
import
android.view.ViewGroup
import
android.widget.FrameLayout
import
android.widget.TextView
import
android.widget.Toast
import
com.bytedance.sdk.djx.DJXRewardAdResult
import
com.bytedance.sdk.djx.DJXSdk
import
com.bytedance.sdk.djx.IDJXWidget
import
com.bytedance.sdk.djx.interfaces.listener.IDJXAdListener
import
com.bytedance.sdk.djx.interfaces.listener.IDJXDramaListener
import
com.bytedance.sdk.djx.interfaces.listener.IDJXDramaUnlockListener
import
com.bytedance.sdk.djx.model.*
import
com.bytedance.sdk.djx.params.DJXWidgetDramaDetailParams
import
com.bytedance.sdk.openadsdk.*
import
com.duben.library.utils.nodoubleclick.AntiShake
import
com.duben.roseplaylet.BuildConfig
import
com.duben.roseplaylet.R
import
com.duben.roseplaylet.common.Constant
import
com.duben.roseplaylet.mvp.model.VedioBean
import
com.duben.roseplaylet.ui.activitys.base.BaseActivity
import
com.duben.roseplaylet.ui.widgets.UnlockDialog
import
com.duben.roseplaylet.utils.LogUtil
import
com.google.gson.Gson
/**
* 描述:穿山甲短剧详情
* 作者:孟崔广
* 时间:2025/1/26 18:39
*/
class
CsjDetailActivity
:
BaseActivity
(),
View
.
OnClickListener
{
companion
object
{
private
const
val
TAG
=
"CsjDetailActivity"
var
outerDrama
:
DJXDrama
?
=
null
var
enterFrom
:
DJXWidgetDramaDetailParams
.
DJXDramaEnterFrom
=
DJXWidgetDramaDetailParams
.
DJXDramaEnterFrom
.
DEFAULT
}
private
var
dpWidget
:
IDJXWidget
?
=
null
private
var
isInited
=
false
private
var
drama
:
DJXDrama
?
=
null
private
var
isRewardArrived
=
false
private
val
adPositions
=
mutableListOf
<
Int
>()
private
var
vedioBean
:
VedioBean
?
=
null
// 广告模式
private
val
adMode
by
lazy
{
DJXDramaUnlockAdMode
.
MODE_SPECIFIC
}
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_csjdetail
override
fun
isApplyKitKatTranslucency
()
=
false
override
fun
initViewsAndEvents
()
{
drama
=
outerDrama
if
(
DJXSdk
.
isStartSuccess
())
{
init
()
}
initListener
()
}
override
fun
getBundleExtras
(
extras
:
Bundle
?)
{
super
.
getBundleExtras
(
extras
)
val
json
=
extras
?.
getString
(
Constant
.
VEDIO_BEAN
)
vedioBean
=
Gson
().
fromJson
(
json
,
VedioBean
::
class
.
java
)
}
override
fun
onClick
(
v
:
View
?)
{
if
(
AntiShake
.
check
(
v
?.
id
))
return
when
(
v
?.
id
)
{
// R.id.tvAboutasPolicy -> {
// val bundle = Bundle()
// bundle.putString(WebActivity.WEB_TITLE, getString(R.string.privacy_name))
// bundle.putString(WebActivity.WEB_URL, Constant.PRIVACY_URL)
// readyGo(WebActivity::class.java, bundle)
// }
}
}
private
fun
initListener
()
{
}
private
fun
init
()
{
if
(
isInited
)
{
return
}
initWidget
()
dpWidget
?.
let
{
widget
->
supportFragmentManager
.
beginTransaction
().
replace
(
R
.
id
.
fl_container
,
widget
.
fragment
)
.
commit
()
}
isInited
=
true
}
private
fun
initWidget
()
{
vedioBean
?.
let
{
val
detailConfig
=
DJXDramaDetailConfig
.
obtain
(
adMode
,
it
.
freeIndex
,
object
:
IDJXDramaUnlockListener
{
override
fun
unlockFlowStart
(
drama
:
DJXDrama
,
callback
:
IDJXDramaUnlockListener
.
UnlockCallback
,
map
:
Map
<
String
,
Any
>?
)
{
// 解锁支持多种方式:支付、广告。根据业务需求自行定义
// 如果在其他时机已经购买会员可以设置 unlockInfo 中的 hasMember 为 true
// val info = DJXDramaUnlockInfo(drama.id, lockSet, DJXDramaUnlockMethod.METHOD_PAY_MEMBER, true)
// callback.onConfirm(info)
if
(
map
?.
get
(
"is_continuity_unlock"
)
as
?
Boolean
==
true
)
{
// showToast("123123")
// 连续解锁
// showContinuesDialog(this@CsjDetailActivity, vedioBean?.unlockIndex, drama, callback, map, drama.index, map?.get("first_unlock_index") as? Int)
}
else
{
//demo仅演示广告解锁
UnlockDialog
(
this
@CsjDetailActivity
).
apply
{
setListener
(
ad
=
{
val
unlockType
=
DJXUnlockModeType
.
UNLOCKTYPE_DEFAULT
//点击激励视频解锁
val
info
=
DJXDramaUnlockInfo
(
drama
.
id
,
vedioBean
!!
.
unlockIndex
,
DJXDramaUnlockMethod
.
METHOD_AD
,
false
,
unlockType
=
unlockType
)
callback
.
onConfirm
(
info
)
},
close
=
{
hide
()
val
info
=
DJXDramaUnlockInfo
(
drama
.
id
,
vedioBean
!!
.
unlockIndex
,
DJXDramaUnlockMethod
.
METHOD_AD
,
cancelUnlock
=
true
)
callback
.
onConfirm
(
info
)
}
)
show
()
}
}
}
override
fun
unlockFlowEnd
(
drama
:
DJXDrama
,
errCode
:
IDJXDramaUnlockListener
.
UnlockErrorStatus
?,
map
:
Map
<
String
,
Any
>?
)
{
LogUtil
.
d
(
TAG
,
"unlockFlowEnd: $drama, code: $errCode, map: $map"
)
}
override
fun
showCustomAd
(
drama
:
DJXDrama
,
callback
:
IDJXDramaUnlockListener
.
CustomAdCallback
)
{
val
adSlot
=
AdSlot
.
Builder
()
.
setCodeId
(
BuildConfig
.
GROMORE_VIDEO_CODE
)
// 广告代码位Id
.
setAdLoadType
(
TTAdLoadType
.
LOAD
)
// 本次广告用途:TTAdLoadType.LOAD实时;TTAdLoadType.PRELOAD预请求
.
build
()
TTAdSdk
.
getAdManager
().
createAdNative
(
this
@CsjDetailActivity
)
.
loadRewardVideoAd
(
adSlot
,
object
:
TTAdNative
.
RewardVideoAdListener
{
override
fun
onError
(
p0
:
Int
,
p1
:
String
?)
{
callback
.
onError
()
}
override
fun
onRewardVideoAdLoad
(
ad
:
TTRewardVideoAd
?)
{
ad
?.
apply
{
setRewardAdInteractionListener
(
object
:
TTRewardVideoAd
.
RewardAdInteractionListener
{
override
fun
onAdShow
()
{
Toast
.
makeText
(
this
@CsjDetailActivity
,
"自定义广告展示"
,
Toast
.
LENGTH_LONG
).
show
()
callback
.
onShow
(
""
)
// CSJ cpm 不对外,可以参考 GroMore getShowEcpm 方法获取
}
override
fun
onAdVideoBarClick
()
{
// 广告点击
}
override
fun
onAdClose
()
{
// 广告关闭
}
override
fun
onVideoComplete
()
{
// 广告素材播放完成,例如视频未跳过,完整的播放了
}
override
fun
onVideoError
()
{
// 广告展示时出错
callback
.
onRewardVerify
(
DJXRewardAdResult
(
false
))
}
override
fun
onRewardVerify
(
rewardVerify
:
Boolean
,
rewardAmount
:
Int
,
rewardName
:
String
,
errorCode
:
Int
,
errorMsg
:
String
)
{
// 已废弃 请使用 onRewardArrived 替代
}
override
fun
onRewardArrived
(
isRewardValid
:
Boolean
,
rewardType
:
Int
,
extraInfo
:
Bundle
)
{
val
result
=
DJXRewardAdResult
(
isRewardValid
)
isRewardArrived
=
isRewardValid
callback
.
onRewardVerify
(
result
)
}
override
fun
onSkippedVideo
()
{
// 用户在观看时点击了跳过
if
(!
isRewardArrived
)
{
callback
.
onRewardVerify
(
DJXRewardAdResult
(
false
))
}
}
})
showRewardVideoAd
(
this
@CsjDetailActivity
)
}
}
override
fun
onRewardVideoCached
()
{}
override
fun
onRewardVideoCached
(
p0
:
TTRewardVideoAd
?)
{}
})
}
}).
apply
{
infiniteScrollEnabled
(
true
)
listener
(
dramaDetailListener
)
adListener
(
object
:
IDJXAdListener
()
{
})
// hideLikeButton(intent.getBooleanExtra(DramaDetailConfigActivity.KEY_DRAMA_HIDE_LIKE_BUTTON, false))
// hideFavorButton(intent.getBooleanExtra(DramaDetailConfigActivity.KEY_DRAMA_HIDE_FAVOR_BUTTON, false))
// hideRewardDialog(intent.getBooleanExtra(DramaDetailConfigActivity.KEY_DRAMA_HIDE_REWARD_DIALOG, false))
// hideBack(intent.getBooleanExtra(DramaDetailConfigActivity.KEY_DRAMA_HIDE_BACK, false), null)
// hideTopInfo(intent.getBooleanExtra(DramaDetailConfigActivity.KEY_DRAMA_HIDE_TOP_INFO, false))
// hideBottomInfo(intent.getBooleanExtra(DramaDetailConfigActivity.KEY_DRAMA_HIDE_BOTTOM_INFO, false))
// hideMore(intent.getBooleanExtra(DramaDetailConfigActivity.KEY_DRAMA_HIDE_MORE, false))
// hideCellularToast(intent.getBooleanExtra(DramaDetailConfigActivity.KEY_DRAMA_HIDE_CELLULAR_TOAST, false))
// scriptTipsTopMargin = intent.getIntExtra(DramaDetailConfigActivity.KEY_DRAMA_SCRIPT_TOP_MARGIN, -1)
// icpTipsBottomMargin = intent.getIntExtra(DramaDetailConfigActivity.KEY_DRAMA_ICP_BOTTOM_MARGIN, -1)
// topOffset = intent.getIntExtra(DramaDetailConfigActivity.KEY_DRAMA_TOP_OFFSET, -1)
// bottomOffset = intent.getIntExtra(DramaDetailConfigActivity.KEY_DRAMA_BOTTOM_OFFSET, -1)
//
// if (enableCustomReport) {
// setCustomReport { context, id ->
// enterCustomReport(context, id)
// }
// }
// if (insertDrawAd) {
// adCustomProvider(object : IDJXDramaAdCustomProvider() {
// override fun getDetailDrawAdPositions(): List<Int>? {
// return insertDrawAdConfigStr?.toNumberList()
// }
//
// override fun getDetailAdDrawView(): IDJXCustomView {
// return DramaDrawAdView(this@CsjDetailActivity)
// }
// })
// }
}
drama
?.
let
{
drama
->
dpWidget
=
DJXSdk
.
factory
().
createDramaDetail
(
DJXWidgetDramaDetailParams
.
obtain
(
drama
.
id
,
drama
.
index
,
detailConfig
)
.
currentDuration
(
0
)
.
fromGid
(
vedioBean
!!
.
groupId
.
toString
())
// 必传,否则影响推荐效果
.
from
(
enterFrom
)
// 必传,否则影响推荐效果
)
}
}
}
// private val dramaAdListener: IDJXAdListener by lazy {
//
// }
private
val
dramaDetailListener
:
IDJXDramaListener
by
lazy
{
object
:
IDJXDramaListener
()
{
override
fun
createCustomView
(
container
:
ViewGroup
?,
map
:
MutableMap
<
String
,
Any
>?
):
View
?
{
return
if
(
false
)
{
container
?:
return
null
map
?:
return
null
Log
.
d
(
TAG
,
"createCustomView: map=$map"
)
val
label
=
TextView
(
container
.
context
)
label
.
text
=
map
[
"title"
]
?.
toString
()
?:
""
label
.
setTextColor
(
Color
.
parseColor
(
"#f1f1f1"
))
label
.
textSize
=
20f
val
labelParams
=
FrameLayout
.
LayoutParams
(
FrameLayout
.
LayoutParams
.
WRAP_CONTENT
,
FrameLayout
.
LayoutParams
.
WRAP_CONTENT
)
labelParams
.
topMargin
=
300
labelParams
.
gravity
=
Gravity
.
CENTER_HORIZONTAL
label
.
layoutParams
=
labelParams
val
customView
=
FrameLayout
(
container
.
context
)
customView
.
layoutParams
=
ViewGroup
.
LayoutParams
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
MATCH_PARENT
)
customView
.
addView
(
label
)
return
customView
}
else
{
super
.
createCustomView
(
container
,
map
)
}
}
}
}
}
video/app/src/main/java/com/duben/roseplaylet/ui/activitys/MainActivity.kt
View file @
aed2f222
...
@@ -17,10 +17,7 @@ import com.duben.roseplaylet.R
...
@@ -17,10 +17,7 @@ import com.duben.roseplaylet.R
import
com.duben.roseplaylet.common.AppConfig
import
com.duben.roseplaylet.common.AppConfig
import
com.duben.roseplaylet.common.Constant
import
com.duben.roseplaylet.common.Constant
import
com.duben.roseplaylet.ui.activitys.base.BaseActivity
import
com.duben.roseplaylet.ui.activitys.base.BaseActivity
import
com.duben.roseplaylet.ui.fragment.MainFragment
import
com.duben.roseplaylet.ui.fragment.*
import
com.duben.roseplaylet.ui.fragment.MyFragment
import
com.duben.roseplaylet.ui.fragment.RecommendFragment
import
com.duben.roseplaylet.ui.fragment.VipEnjoyFragment
import
com.duben.roseplaylet.ui.widgets.DialogListener
import
com.duben.roseplaylet.ui.widgets.DialogListener
import
com.duben.roseplaylet.ui.widgets.PhoneDialog
import
com.duben.roseplaylet.ui.widgets.PhoneDialog
import
kotlinx.android.synthetic.main.activity_main.*
import
kotlinx.android.synthetic.main.activity_main.*
...
@@ -42,7 +39,7 @@ class MainActivity : BaseActivity(), View.OnClickListener {
...
@@ -42,7 +39,7 @@ class MainActivity : BaseActivity(), View.OnClickListener {
private
var
mShowBlack
=
false
private
var
mShowBlack
=
false
// 底部标签切换的Fragment
// 底部标签切换的Fragment
private
var
main
Fragment
:
Fragment
?
=
null
private
var
first
Fragment
:
Fragment
?
=
null
private
var
recommendFragment
:
Fragment
?
=
null
private
var
recommendFragment
:
Fragment
?
=
null
private
var
myFragment
:
Fragment
?
=
null
private
var
myFragment
:
Fragment
?
=
null
private
var
vipEnjoyFragment
:
Fragment
?
=
null
private
var
vipEnjoyFragment
:
Fragment
?
=
null
...
@@ -75,16 +72,16 @@ class MainActivity : BaseActivity(), View.OnClickListener {
...
@@ -75,16 +72,16 @@ class MainActivity : BaseActivity(), View.OnClickListener {
}
}
AppConfig
.
fragmentClickFlag
=
Constant
.
FRAGMENT_CLICK_ONE
AppConfig
.
fragmentClickFlag
=
Constant
.
FRAGMENT_CLICK_ONE
if
(
main
Fragment
==
null
)
{
if
(
first
Fragment
==
null
)
{
mainFragment
=
Main
Fragment
()
firstFragment
=
First
Fragment
()
}
}
if
(!
main
Fragment
!!
.
isAdded
)
{
if
(!
first
Fragment
!!
.
isAdded
)
{
// 提交事务
// 提交事务
supportFragmentManager
.
beginTransaction
()
supportFragmentManager
.
beginTransaction
()
.
add
(
R
.
id
.
content_layout
,
main
Fragment
!!
).
commitAllowingStateLoss
()
.
add
(
R
.
id
.
content_layout
,
first
Fragment
!!
).
commitAllowingStateLoss
()
// 记录当前Fragment
// 记录当前Fragment
currentFragment
=
main
Fragment
currentFragment
=
first
Fragment
}
}
if
(
tabIvLoan
!=
null
)
{
if
(
tabIvLoan
!=
null
)
{
tabIvLoan
!!
.
isSelected
=
true
tabIvLoan
!!
.
isSelected
=
true
...
@@ -158,10 +155,10 @@ class MainActivity : BaseActivity(), View.OnClickListener {
...
@@ -158,10 +155,10 @@ class MainActivity : BaseActivity(), View.OnClickListener {
*/
*/
fun
clickTab1Layout
()
{
fun
clickTab1Layout
()
{
AppConfig
.
fragmentClickFlag
=
Constant
.
FRAGMENT_CLICK_ONE
AppConfig
.
fragmentClickFlag
=
Constant
.
FRAGMENT_CLICK_ONE
if
(
main
Fragment
==
null
)
{
if
(
first
Fragment
==
null
)
{
mainFragment
=
Main
Fragment
()
firstFragment
=
First
Fragment
()
}
}
addOrShowFragment
(
supportFragmentManager
.
beginTransaction
(),
main
Fragment
!!
)
addOrShowFragment
(
supportFragmentManager
.
beginTransaction
(),
first
Fragment
!!
)
tabIvLoan
!!
.
isSelected
=
true
tabIvLoan
!!
.
isSelected
=
true
tabIvRecommend
!!
.
isSelected
=
false
tabIvRecommend
!!
.
isSelected
=
false
// tabIvEnjoy!!.isSelected = false
// tabIvEnjoy!!.isSelected = false
...
...
video/app/src/main/java/com/duben/roseplaylet/ui/adapter/CsjVideoPageAdapter.kt
0 → 100644
View file @
aed2f222
package
com.duben.roseplaylet.ui.adapter
import
androidx.fragment.app.Fragment
import
androidx.viewpager2.adapter.FragmentStateAdapter
import
com.duben.roseplaylet.mvp.model.HotStyleTypesBean
import
com.duben.roseplaylet.ui.fragment.CsjMovieFragment
import
com.duben.roseplaylet.ui.fragment.MovieFragment
class
CsjVideoPageAdapter
(
private
val
data
:
List
<
HotStyleTypesBean
>,
fragment
:
Fragment
)
:
FragmentStateAdapter
(
fragment
)
{
private
val
fragments
=
mutableMapOf
<
Int
,
Fragment
>()
override
fun
getItemId
(
position
:
Int
):
Long
{
return
data
[
position
].
torder
.
toLong
()
}
override
fun
getItemCount
()
=
data
.
size
override
fun
createFragment
(
position
:
Int
):
Fragment
{
val
newFragment
=
CsjMovieFragment
.
newInstance
(
data
[
position
].
type
,
position
)
fragments
[
position
]
=
newFragment
return
newFragment
}
override
fun
containsItem
(
itemId
:
Long
):
Boolean
{
data
.
forEach
{
if
(
it
.
torder
.
toLong
()
==
itemId
)
{
return
true
}
}
return
false
}
fun
getFragments
():
MutableMap
<
Int
,
Fragment
>
{
return
fragments
}
}
\ No newline at end of file
video/app/src/main/java/com/duben/roseplaylet/ui/fragment/CsjMovieFragment.kt
0 → 100644
View file @
aed2f222
package
com.duben.roseplaylet.ui.fragment
import
android.os.Bundle
import
android.view.LayoutInflater
import
android.view.View
import
android.widget.FrameLayout
import
androidx.fragment.app.Fragment
import
androidx.recyclerview.widget.LinearLayoutManager
import
com.bytedance.sdk.djx.DJXSdk
import
com.bytedance.sdk.djx.model.DJXDramaUnlockAdMode
import
com.bytedance.sdk.djx.params.DJXWidgetDramaDetailParams
import
com.duben.library.utils.json.JsonUtil
import
com.duben.roseplaylet.R
import
com.duben.roseplaylet.ad.express.ExpressAdCallback
import
com.duben.roseplaylet.ad.express.MainExpressManager
import
com.duben.roseplaylet.common.AppConfig
import
com.duben.roseplaylet.common.Constant
import
com.duben.roseplaylet.manager.CsjDJXSdkManager
import
com.duben.roseplaylet.manager.LocalVedioManager
import
com.duben.roseplaylet.mvp.model.MULTI_ITEM_1
import
com.duben.roseplaylet.mvp.model.MULTI_ITEM_3
import
com.duben.roseplaylet.mvp.model.VedioBean
import
com.duben.roseplaylet.mvp.model.VideoMultiItemEntity3
import
com.duben.roseplaylet.ui.activitys.CsjDetailActivity
import
com.duben.roseplaylet.ui.adapter.NewHotStyleAdapter
import
com.duben.roseplaylet.ui.fragment.base.LazyLoadBaseFragment
import
com.duben.roseplaylet.utils.CommonUtils
import
com.duben.roseplaylet.video.tx.newrecommend.NewTxVideoActivity
import
com.scwang.smartrefresh.layout.api.RefreshLayout
import
com.scwang.smartrefresh.layout.listener.OnLoadMoreListener
import
kotlinx.android.synthetic.main.fragment_csjmovie.*
class
CsjMovieFragment
:
LazyLoadBaseFragment
(),
OnLoadMoreListener
{
private
var
mType
=
""
private
var
mPosition
=
0
// 首页-第一个tab-第一个recyclerview Item
companion
object
{
private
const
val
VIDEO_TYPE
=
"VIDEO_TYPE"
private
const
val
VIDEO_POSITION
=
"VIDEO_POSITION"
fun
newInstance
(
type
:
String
,
position
:
Int
):
Fragment
{
val
args
=
Bundle
()
args
.
putString
(
VIDEO_TYPE
,
type
)
args
.
putInt
(
VIDEO_POSITION
,
position
)
val
fragment
=
CsjMovieFragment
()
fragment
.
arguments
=
args
return
fragment
}
}
private
var
hotPage
=
1
// 分页
private
var
hotPageSize
=
Constant
.
PAGE_SIZE
// 分页
private
lateinit
var
hotStyleAdapter
:
NewHotStyleAdapter
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
fragment_csjmovie
override
fun
initViewsAndEvents
()
{
initView
()
initListener
()
arguments
?.
let
{
mType
=
it
.
getString
(
VIDEO_TYPE
,
mType
)
mPosition
=
it
.
getInt
(
VIDEO_POSITION
,
mPosition
)
}
}
override
fun
onResume
()
{
super
.
onResume
()
// hotPageSize = if (UserManager.getInstance().vipFlag) 12 else 9
onRefresh
()
}
override
fun
onDestroy
()
{
super
.
onDestroy
()
}
fun
onRefresh
()
{
if
(
AppConfig
.
fragmentClickFlag
==
Constant
.
FRAGMENT_CLICK_ONE
)
{
println
(
"mcg _______"
)
hotPage
=
1
srlMainPage
.
resetNoMoreData
()
MainExpressManager
.
instance
.
destroy
()
loadAd
()
requestDramaByCategory
()
}
}
fun
requestDramaByCategory
()
{
CsjDJXSdkManager
.
requestDramaByCategory
(
mType
,
hotPage
,
hotPageSize
,
object
:
CsjDJXSdkManager
.
CsjrequestDramaByCategoryListener
{
override
fun
dramaCategoryListSuccess
(
list
:
MutableList
<
VedioBean
>)
{
if
(
activity
==
null
||
requireActivity
().
isFinishing
)
{
srlMainPage
?.
finishRefresh
(
true
)
return
}
if
(
::
hotStyleAdapter
.
isInitialized
)
{
if
(
hotPage
==
1
)
{
srlMainPage
.
finishRefresh
(
true
)
hotStyleAdapter
.
setNewInstance
(
getAdapterData
(
list
))
}
else
{
if
(
list
.
size
<
hotPageSize
)
{
srlMainPage
.
finishLoadMoreWithNoMoreData
()
}
else
{
loadAd
()
srlMainPage
.
finishLoadMore
()
}
hotStyleAdapter
.
addData
(
getAdapterData
(
list
))
}
}
}
override
fun
dramaCategoryListFail
()
{
}
})
}
override
fun
onLoadMore
(
refreshLayout
:
RefreshLayout
)
{
hotPage
=
++
hotPage
requestDramaByCategory
()
}
private
fun
initView
()
{
rv_pic_list
.
layoutManager
=
LinearLayoutManager
(
context
)
hotStyleAdapter
=
NewHotStyleAdapter
()
hotStyleAdapter
.
animationEnable
=
false
rv_pic_list
.
adapter
=
hotStyleAdapter
val
emptyView
=
LayoutInflater
.
from
(
requireContext
()).
inflate
(
R
.
layout
.
item_empty_data
,
null
)
hotStyleAdapter
.
setEmptyView
(
emptyView
)
hotStyleAdapter
.
setOnCustomChildClickListener
(
object
:
NewHotStyleAdapter
.
OnCustomChildClickListener
{
override
fun
onCustomChildClick
(
view
:
View
,
vedioBean
:
VedioBean
)
{
requestDrama
(
vedioBean
)
}
})
}
fun
requestDrama
(
data
:
VedioBean
)
{
CsjDJXSdkManager
.
requestDrama
(
data
.
thirdId
.
toLong
())
{
// val intent = Intent(this@DramaDetailConfigActivity, DramaDetailActivity::class.java)
// DramaDetailActivity.outerDrama = it
// DramaDetailActivity.enterFrom =
// DJXWidgetDramaDetailParams.DJXDramaEnterFrom.DEFAULT // todo 加一下入口枚举
// intent.putExtra(
// KEY_DRAMA_AD_MODE,
// if (item_btn_ad_mode.isChecked) DJXDramaUnlockAdMode.MODE_SPECIFIC else DJXDramaUnlockAdMode.MODE_COMMON
// )
// intent.putExtra(KEY_DRAMA_FREE_SET, item_et_free_set.text.toString().toInt())
// intent.putExtra(KEY_DRAMA_LOCK_SET, item_et_lock_set.text.toString().toInt())
// intent.putExtra(
// KEY_DRAMA_PLAY_DURATION,
// item_et_play_duration.text.toString().toInt()
// )
// intent.putExtra(KEY_DRAMA_ENABLE_INFINITY, item_btn_infinity_scroll.isChecked)
// intent.putExtra(KEY_DRAMA_ENABLE_CONTINUES_UNLOCK, item_btn_enable_unlock.isChecked)
// intent.putExtra(KEY_CUSTOM_REPORT_PAGE, item_btn_custom_report_page.isChecked)
// intent.putExtra(KEY_DRAMA_INSERT_DRAW_AD, item_btn_insert_draw_ad.isChecked)
// intent.putExtra(
// KEY_DRAMA_INSERT_DRAW_AD_CONFIG,
// item_et_insert_draw_ad_config.text.toString()
// )
//
// intent.putExtra(KEY_DRAMA_HIDE_LIKE_BUTTON, item_btn_hide_like_button.isChecked)
// intent.putExtra(KEY_DRAMA_HIDE_FAVOR_BUTTON, item_btn_hide_favor_button.isChecked)
// intent.putExtra(KEY_DRAMA_HIDE_REWARD_DIALOG, item_btn_hide_reward_dialog.isChecked)
// intent.putExtra(KEY_DRAMA_HIDE_BACK, item_btn_hide_back.isChecked)
// intent.putExtra(KEY_DRAMA_HIDE_TOP_INFO, item_btn_hide_top_info.isChecked)
// intent.putExtra(KEY_DRAMA_HIDE_BOTTOM_INFO, item_btn_hide_bottom_info.isChecked)
// intent.putExtra(KEY_DRAMA_HIDE_MORE, item_btn_hide_more.isChecked)
// intent.putExtra(KEY_DRAMA_HIDE_CELLULAR_TOAST, item_btn_hide_toast.isChecked)
// intent.putExtra(KEY_DRAMA_INSERT_CUSTOM_VIEW, item_btn_insert_custom_view.isChecked)
// intent.putExtra(
// KEY_DRAMA_SCRIPT_TOP_MARGIN,
// item_et_script_margin.text.toString().toInt()
// )
// intent.putExtra(
// KEY_DRAMA_ICP_BOTTOM_MARGIN,
// item_et_icp_margin.text.toString().toInt()
// )
// intent.putExtra(
// KEY_DRAMA_TOP_OFFSET,
// item_et_top_info_offset.text.toString().let { offset ->
// if (offset.isEmpty()) 0 else offset.toInt()
// })
// intent.putExtra(
// KEY_DRAMA_BOTTOM_OFFSET,
// item_et_bottom_info_offset.text.toString().toInt()
// )
// DJXSdk.service()
// .setGlobalSpeedPlay(item_global_speed.text.toString().toFloat())
// this@DramaDetailConfigActivity.startActivity(intent)
val
bundle
=
Bundle
()
val
vedioBean
=
VedioBean
()
vedioBean
.
title
=
it
.
title
vedioBean
.
vedioDesc
=
it
.
desc
vedioBean
.
coverImage
=
it
.
coverImage
vedioBean
.
thirdId
=
it
.
id
.
toString
()
vedioBean
.
freeIndex
=
it
.
freeSet
vedioBean
.
unlockIndex
=
it
.
lockSet
vedioBean
.
groupId
=
it
.
groupId
bundle
.
putString
(
Constant
.
VEDIO_BEAN
,
JsonUtil
.
toJson
(
vedioBean
))
CsjDetailActivity
.
outerDrama
=
it
CsjDetailActivity
.
enterFrom
=
DJXWidgetDramaDetailParams
.
DJXDramaEnterFrom
.
DEFAULT
// todo 加一下入口枚举
readyGo
(
CsjDetailActivity
::
class
.
java
,
bundle
)
}
}
private
fun
initListener
()
{
srlMainPage
.
setEnableRefresh
(
false
)
srlMainPage
.
setOnLoadMoreListener
(
this
)
}
private
fun
getAdapterData
(
list
:
List
<
VedioBean
>):
MutableList
<
VideoMultiItemEntity3
>
{
val
data
=
mutableListOf
<
VideoMultiItemEntity3
>()
val
subList
=
CommonUtils
.
getSubList
(
3
,
list
)
for
(
itemEntity3s
in
subList
)
{
data
.
add
(
VideoMultiItemEntity3
(
MULTI_ITEM_1
,
itemEntity3s
,
null
))
}
return
data
}
private
fun
loadAd
()
{
MainExpressManager
.
instance
.
loadAd
(
object
:
ExpressAdCallback
{
override
fun
loadSuccess
(
adView
:
FrameLayout
?)
{
}
override
fun
renderSuccess
(
adView
:
FrameLayout
?):
Boolean
{
adView
?.
let
{
addAdView
(
it
)
}
return
false
}
override
fun
loadFail
()
{
}
})
}
private
fun
addAdView
(
adView
:
FrameLayout
)
{
// 默认每各9个加1个
var
insertIndex
=
3
val
allData
=
hotStyleAdapter
.
data
if
(
allData
!=
null
&&
allData
.
size
>
0
)
{
for
(
i
in
allData
.
size
-
1
downTo
0
)
{
if
(
allData
[
i
].
itemType
==
MULTI_ITEM_3
)
{
insertIndex
+=
4
}
}
if
(
insertIndex
>=
allData
.
size
)
{
insertIndex
=
allData
.
size
}
if
(
allData
[
allData
.
lastIndex
].
itemType
==
MULTI_ITEM_3
)
return
val
data
=
VideoMultiItemEntity3
(
MULTI_ITEM_3
,
null
,
adView
)
hotStyleAdapter
.
addData
(
insertIndex
,
data
)
}
}
override
fun
onDestroyView
()
{
super
.
onDestroyView
()
MainExpressManager
.
instance
.
destroy
()
}
}
\ No newline at end of file
video/app/src/main/java/com/duben/roseplaylet/ui/fragment/CsjVedioFragment.kt
0 → 100644
View file @
aed2f222
package
com.duben.roseplaylet.ui.fragment
import
android.os.Bundle
import
android.os.Handler
import
android.os.Looper
import
android.text.TextUtils
import
android.view.LayoutInflater
import
android.view.View
import
android.widget.TextView
import
androidx.core.content.ContextCompat
import
androidx.fragment.app.Fragment
import
androidx.recyclerview.widget.RecyclerView
import
androidx.viewpager2.widget.ViewPager2
import
com.duben.library.utils.json.JsonUtil
import
com.duben.library.utils.nodoubleclick.AntiShake
import
com.duben.roseplaylet.R
import
com.duben.roseplaylet.common.AppConfig
import
com.duben.roseplaylet.common.Constant
import
com.duben.roseplaylet.manager.CsjDJXSdkManager
import
com.duben.roseplaylet.manager.LocalVedioManager
import
com.duben.roseplaylet.manager.UserManager
import
com.duben.roseplaylet.mvp.model.HotStyleTypesBean
import
com.duben.roseplaylet.ui.adapter.CsjVideoPageAdapter
import
com.duben.roseplaylet.ui.fragment.base.LazyLoadBaseFragment
import
com.duben.roseplaylet.utils.LogUtil
import
com.google.android.material.tabs.TabLayout
import
com.google.android.material.tabs.TabLayoutMediator
import
com.scwang.smartrefresh.layout.api.RefreshLayout
import
com.scwang.smartrefresh.layout.listener.OnRefreshListener
import
kotlinx.android.synthetic.main.fragment_csjvedio.*
import
java.lang.reflect.Field
import
java.util.*
import
kotlin.concurrent.schedule
/**
* 描述:首页
* 作者:孟崔广
* 时间:2023/6/29 11:30
*/
class
CsjVedioFragment
:
LazyLoadBaseFragment
(),
View
.
OnClickListener
,
OnRefreshListener
{
companion
object
{
fun
newInstance
():
Fragment
{
val
args
=
Bundle
()
val
fragment
=
CsjVedioFragment
()
fragment
.
arguments
=
args
return
fragment
}
}
var
mSelectTabIndex
=
-
1
private
val
tabsData
=
mutableListOf
<
HotStyleTypesBean
>()
private
var
vpAdapter
:
CsjVideoPageAdapter
?
=
null
private
var
alipayTime
=
0
private
val
userManager
by
lazy
{
UserManager
.
getInstance
()
}
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
fragment_csjvedio
override
fun
initViewsAndEvents
()
{
}
override
fun
onFragmentFirstVisible
()
{
initVp
()
initListener
()
loadData
()
}
override
fun
onDestroy
()
{
super
.
onDestroy
()
}
override
fun
onFragmentResume
()
{
if
(
AppConfig
.
fragmentClickFlag
==
Constant
.
FRAGMENT_CLICK_ONE
)
{
if
(
AppConfig
.
exitLoginMainRefresh
)
{
AppConfig
.
exitLoginMainRefresh
=
false
loadData
()
}
}
}
override
fun
onFragmentPause
()
{
}
private
fun
initListener
()
{
srlMainPage
.
setOnRefreshListener
(
this
)
iv_main_watching_close
.
setOnClickListener
(
this
)
tv_main_watching_goto
.
setOnClickListener
(
this
)
}
override
fun
onClick
(
v
:
View
?)
{
if
(
AntiShake
.
check
(
v
?.
id
))
return
when
(
v
?.
id
)
{
R
.
id
.
iv_main_watching_close
->
{
LocalVedioManager
.
closeCacheVedio
()
ll_main_watching_root
.
visibility
=
View
.
GONE
}
R
.
id
.
tv_main_watching_goto
->
{
val
cacheVedio
=
LocalVedioManager
.
getCacheVedio
()
if
(
cacheVedio
!=
null
)
{
LocalVedioManager
.
startVedioDetailActivityForType
(
requireActivity
(),
cacheVedio
)
}
}
}
}
private
fun
loadData
()
{
Timer
().
schedule
(
200
)
{
requireActivity
().
runOnUiThread
{
if
(!
TextUtils
.
isEmpty
(
userManager
?.
userID
))
{
CsjDJXSdkManager
.
requestDramaCategoryList
(
object
:
CsjDJXSdkManager
.
CsjdramaCategoryListListener
{
override
fun
dramaCategoryListSuccess
(
list
:
MutableList
<
HotStyleTypesBean
>)
{
tabsData
.
clear
()
tabsData
.
addAll
(
list
)
LogUtil
.
d
(
"mcg--->"
+
JsonUtil
.
toJson
(
list
))
if
(
tabsData
.
isNotEmpty
())
{
mSelectTabIndex
=
0
vpAdapter
?.
run
{
notifyDataSetChanged
()
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
if
(
getFragments
().
isNotEmpty
())
{
val
fragment
=
getFragments
()[
mSelectTabIndex
]
if
(
fragment
!=
null
)
{
(
fragment
as
CsjMovieFragment
).
onRefresh
()
}
}
},
200
)
}
}
}
override
fun
dramaCategoryListFail
()
{
}
})
}
}
}
}
private
fun
initVp
()
{
vpAdapter
=
CsjVideoPageAdapter
(
tabsData
,
this
)
vp2
.
adapter
=
vpAdapter
vp2
.
desensitization
()
TabLayoutMediator
(
tablayout
,
vp2
)
{
tab
,
position
->
// 初始化Tab
tab
.
id
=
position
if
(
tabsData
.
size
>
0
)
{
tab
.
customView
=
getTabView
(
tabsData
[
position
].
type
)
}
}.
attach
()
tablayout
.
addOnTabSelectedListener
(
object
:
TabLayout
.
OnTabSelectedListener
{
override
fun
onTabSelected
(
tab
:
TabLayout
.
Tab
?)
{
updateTab
(
tab
,
true
)
mSelectTabIndex
=
tab
!!
.
id
}
override
fun
onTabUnselected
(
tab
:
TabLayout
.
Tab
?)
{
updateTab
(
tab
,
false
)
}
override
fun
onTabReselected
(
tab
:
TabLayout
.
Tab
?)
{
}
})
vp2
.
offscreenPageLimit
=
100
}
private
fun
updateTab
(
tab
:
TabLayout
.
Tab
?,
isSelected
:
Boolean
)
{
tab
?.
customView
?.
let
{
val
text
=
it
.
findViewById
<
TextView
>(
R
.
id
.
item_tv
)
if
(
isSelected
)
{
text
.
setTextColor
(
ContextCompat
.
getColor
(
requireContext
(),
R
.
color
.
red
))
}
else
{
text
.
setTextColor
(
ContextCompat
.
getColor
(
requireContext
(),
R
.
color
.
color_8D8F90
))
}
}
}
private
fun
getTabView
(
text
:
String
):
View
{
val
view
=
LayoutInflater
.
from
(
requireContext
()).
inflate
(
R
.
layout
.
item_video_tab
,
null
)
view
.
findViewById
<
TextView
>(
R
.
id
.
item_tv
).
text
=
text
return
view
}
override
fun
onRefresh
(
refreshLayout
:
RefreshLayout
)
{
vpAdapter
?.
run
{
if
(
getFragments
().
isNotEmpty
())
{
val
fragment
=
getFragments
()[
mSelectTabIndex
]
if
(
fragment
!=
null
)
{
(
fragment
as
CsjMovieFragment
).
onRefresh
()
refreshLayout
.
finishRefresh
()
}
}
}
}
override
fun
onFragmentResume
(
firstResume
:
Boolean
)
{
super
.
onFragmentResume
(
firstResume
)
vpAdapter
?.
getFragments
()
?.
get
(
mSelectTabIndex
)
?.
onResume
()
}
override
fun
onPause
()
{
super
.
onPause
()
vpAdapter
?.
getFragments
()
?.
get
(
mSelectTabIndex
)
?.
onPause
()
}
fun
ViewPager2
.
desensitization
()
{
//动态设置ViewPager2 灵敏度
try
{
val
recyclerViewField
:
Field
=
ViewPager2
::
class
.
java
.
getDeclaredField
(
"mRecyclerView"
)
recyclerViewField
.
isAccessible
=
true
val
recyclerView
=
recyclerViewField
.
get
(
this
)
as
RecyclerView
val
touchSlopField
:
Field
=
RecyclerView
::
class
.
java
.
getDeclaredField
(
"mTouchSlop"
)
touchSlopField
.
isAccessible
=
true
val
touchSlop
=
touchSlopField
.
get
(
recyclerView
)
as
Int
touchSlopField
.
set
(
recyclerView
,
touchSlop
*
3
)
//6 is empirical value
}
catch
(
ignore
:
java
.
lang
.
Exception
)
{
}
}
}
\ No newline at end of file
video/app/src/main/java/com/duben/roseplaylet/ui/fragment/FirstFragment.kt
0 → 100644
View file @
aed2f222
package
com.duben.roseplaylet.ui.fragment
import
android.text.TextUtils
import
android.view.LayoutInflater
import
android.view.View
import
android.widget.TextView
import
androidx.core.content.ContextCompat
import
androidx.fragment.app.Fragment
import
com.duben.roseplaylet.R
import
com.duben.roseplaylet.common.AppConfig
import
com.duben.roseplaylet.common.Constant
import
com.duben.roseplaylet.manager.UserManager
import
com.duben.roseplaylet.mvp.presenters.FirstPresenter
import
com.duben.roseplaylet.mvp.views.FirstView
import
com.duben.roseplaylet.ui.adapter.RecommendPageAdapter
import
com.duben.roseplaylet.ui.fragment.base.LazyLoadBaseFragment
import
com.google.android.material.tabs.TabLayout
import
com.google.android.material.tabs.TabLayoutMediator
import
kotlinx.android.synthetic.main.fragment_first.*
/**
* 短剧首页
*
* 孟崔广
*/
class
FirstFragment
:
LazyLoadBaseFragment
(),
FirstView
{
private
var
mSelectTabIndex
=
0
private
val
tabsData
=
mutableListOf
<
String
>()
private
val
fragments
=
mutableListOf
<
Fragment
>()
private
var
vpAdapter
:
RecommendPageAdapter
?
=
null
private
val
firstPresenter
by
lazy
{
FirstPresenter
()
}
private
val
userManager
by
lazy
{
UserManager
.
getInstance
()
}
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
fragment_first
override
fun
initViewsAndEvents
()
{
firstPresenter
.
attachView
(
this
)
initVp2
()
}
override
fun
onFragmentFirstVisible
()
{
}
override
fun
onFragmentResume
()
{
if
(
AppConfig
.
fragmentClickFlag
==
Constant
.
FRAGMENT_CLICK_ONE
)
{
if
(
TextUtils
.
isEmpty
(
userManager
?.
userID
))
{
firstPresenter
.
userLogin
()
}
}
}
override
fun
onDestroy
()
{
super
.
onDestroy
()
firstPresenter
.
detachView
()
}
private
fun
initVp2
()
{
tabsData
.
add
(
"推 荐"
)
tabsData
.
add
(
"VIP专享"
)
fragments
.
clear
()
fragments
.
add
(
CsjVedioFragment
.
newInstance
())
fragments
.
add
(
MainFragment
.
newInstance
())
vpAdapter
=
RecommendPageAdapter
(
fragments
,
this
)
vp2_recommend
.
adapter
=
vpAdapter
TabLayoutMediator
(
tab_recommend
,
vp2_recommend
)
{
tab
,
position
->
tab
.
id
=
position
tab
.
customView
=
getTabView
(
position
)
}.
attach
()
tab_recommend
.
addOnTabSelectedListener
(
object
:
TabLayout
.
OnTabSelectedListener
{
override
fun
onTabSelected
(
tab
:
TabLayout
.
Tab
?)
{
mSelectTabIndex
=
tab
!!
.
id
updateTab
(
tab
,
true
,
mSelectTabIndex
)
}
override
fun
onTabUnselected
(
tab
:
TabLayout
.
Tab
?)
{
updateTab
(
tab
,
false
,
mSelectTabIndex
)
}
override
fun
onTabReselected
(
tab
:
TabLayout
.
Tab
?)
{
}
})
tab_recommend
.
getTabAt
(
0
)
?.
select
()
vp2_recommend
.
setCurrentItem
(
0
,
false
)
vp2_recommend
.
offscreenPageLimit
=
1
vp2_recommend
.
isUserInputEnabled
=
false
}
private
fun
getTabView
(
position
:
Int
):
View
{
val
view
=
LayoutInflater
.
from
(
requireContext
()).
inflate
(
R
.
layout
.
item_recommend_tab
,
null
)
view
.
findViewById
<
TextView
>(
R
.
id
.
item_tv
).
text
=
tabsData
[
position
]
if
(
position
==
0
)
{
view
.
findViewById
<
View
>(
R
.
id
.
item_line
).
background
=
ContextCompat
.
getDrawable
(
requireContext
(),
R
.
drawable
.
shape_line_corner_red
)
}
return
view
}
private
fun
updateTab
(
tab
:
TabLayout
.
Tab
?,
isSelected
:
Boolean
,
position
:
Int
)
{
tab
?.
customView
?.
let
{
val
text
=
it
.
findViewById
<
TextView
>(
R
.
id
.
item_tv
)
val
line
=
it
.
findViewById
<
View
>(
R
.
id
.
item_line
)
if
(
isSelected
)
{
line
.
visibility
=
View
.
VISIBLE
text
.
setTextColor
(
ContextCompat
.
getColor
(
requireContext
(),
R
.
color
.
black
))
}
else
{
text
.
setTextColor
(
ContextCompat
.
getColor
(
requireContext
(),
R
.
color
.
black
)
)
line
.
visibility
=
View
.
INVISIBLE
}
line
.
background
=
ContextCompat
.
getDrawable
(
requireContext
(),
R
.
drawable
.
shape_line_corner_red
)
}
}
}
\ No newline at end of file
video/app/src/main/java/com/duben/roseplaylet/ui/fragment/MainFragment.kt
View file @
aed2f222
...
@@ -8,6 +8,7 @@ import android.view.LayoutInflater
...
@@ -8,6 +8,7 @@ import android.view.LayoutInflater
import
android.view.View
import
android.view.View
import
android.widget.TextView
import
android.widget.TextView
import
androidx.core.content.ContextCompat
import
androidx.core.content.ContextCompat
import
androidx.fragment.app.Fragment
import
androidx.recyclerview.widget.LinearLayoutManager
import
androidx.recyclerview.widget.LinearLayoutManager
import
androidx.recyclerview.widget.RecyclerView
import
androidx.recyclerview.widget.RecyclerView
import
androidx.viewpager2.widget.ViewPager2
import
androidx.viewpager2.widget.ViewPager2
...
@@ -50,9 +51,15 @@ import kotlin.concurrent.schedule
...
@@ -50,9 +51,15 @@ import kotlin.concurrent.schedule
class
MainFragment
:
LazyLoadBaseFragment
(),
HomeView
,
View
.
OnClickListener
,
OnRefreshListener
{
class
MainFragment
:
LazyLoadBaseFragment
(),
HomeView
,
View
.
OnClickListener
,
OnRefreshListener
{
companion
object
{
companion
object
{
var
mSelectTabIndex
=
-
1
}
fun
newInstance
():
Fragment
{
val
args
=
Bundle
()
val
fragment
=
MainFragment
()
fragment
.
arguments
=
args
return
fragment
}
}
var
mSelectTabIndex
=
-
1
private
val
tabsData
=
mutableListOf
<
HotStyleTypesBean
>()
private
val
tabsData
=
mutableListOf
<
HotStyleTypesBean
>()
private
val
bannerList
=
mutableListOf
<
BannerBean
>()
private
val
bannerList
=
mutableListOf
<
BannerBean
>()
private
val
topList
=
mutableListOf
<
VedioBean
>()
private
val
topList
=
mutableListOf
<
VedioBean
>()
...
@@ -343,19 +350,19 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
...
@@ -343,19 +350,19 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
}
}
override
fun
getSoltVedioSuc
(
data
:
IndexList
?)
{
override
fun
getSoltVedioSuc
(
data
:
IndexList
?)
{
val
firstVedio
=
AppPreferencesManager
.
get
().
getBoolean
(
Constant
.
IS_FIRST_VEDIO
,
true
)
//
val firstVedio = AppPreferencesManager.get().getBoolean(Constant.IS_FIRST_VEDIO, true)
if
(
data
!=
null
&&
data
.
vedioMsg
!=
null
&&
firstVedio
)
{
//
if (data != null && data.vedioMsg != null && firstVedio) {
AppPreferencesManager
.
get
().
put
(
Constant
.
IS_FIRST_VEDIO
,
false
)
//
AppPreferencesManager.get().put(Constant.IS_FIRST_VEDIO, false)
LocalVedioManager
.
startVedioDetailActivityForType
(
requireActivity
(),
data
.
vedioMsg
)
//
LocalVedioManager.startVedioDetailActivityForType(requireActivity(), data.vedioMsg)
}
else
{
//
} else {
if
(
UserManager
.
getInstance
().
newFlag
&&
!
UserManager
.
getInstance
().
vipFlag
)
{
//
if (UserManager.getInstance().newFlag && !UserManager.getInstance().vipFlag) {
// homePresenter.getRecommendVedio()
//
//
homePresenter.getRecommendVedio()
//
//
//
val
bundle
=
Bundle
()
//
val bundle = Bundle()
bundle
.
putBoolean
(
VipActivity
.
IS_MAIN
,
true
)
//
bundle.putBoolean(VipActivity.IS_MAIN, true)
readyGo
(
VipActivity
::
class
.
java
,
bundle
)
//
readyGo(VipActivity::class.java, bundle)
}
//
}
}
//
}
}
}
override
fun
getRecommendVedioSuc
(
data
:
RecoBean
?)
{
override
fun
getRecommendVedioSuc
(
data
:
RecoBean
?)
{
...
...
video/app/src/main/java/com/duben/roseplaylet/ui/widgets/UnlockDialog.kt
0 → 100644
View file @
aed2f222
package
com.duben.roseplaylet.ui.widgets
import
android.app.Dialog
import
android.content.Context
import
android.os.Bundle
import
android.view.Gravity
import
android.view.View
import
android.view.Window
import
android.view.WindowManager
import
com.duben.roseplaylet.R
/**
* create by hanweiwei on 10/6/23
*/
class
UnlockDialog
(
context
:
Context
)
:
Dialog
(
context
,
R
.
style
.
dialog
)
{
private
val
btnAd
by
lazy
{
findViewById
<
View
>(
R
.
id
.
btn_unlock_by_ad
)
}
private
var
adListener
:
View
.
OnClickListener
?
=
null
private
var
closeListener
:
View
.
OnClickListener
?
=
null
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
window
?.
requestFeature
(
Window
.
FEATURE_NO_TITLE
)
setContentView
(
R
.
layout
.
dialog_unlock
)
setCanceledOnTouchOutside
(
false
)
findViewById
<
View
>(
R
.
id
.
iv_unlock_close
)
?.
setOnClickListener
{
dismiss
()
closeListener
?.
onClick
(
it
)
}
btnAd
.
setOnClickListener
{
dismiss
()
adListener
?.
onClick
(
it
)
}
}
fun
setListener
(
ad
:
View
.
OnClickListener
?,
close
:
View
.
OnClickListener
?):
UnlockDialog
{
adListener
=
ad
closeListener
=
close
return
this
}
override
fun
show
()
{
super
.
show
()
window
?.
let
{
it
.
decorView
.
setPadding
(
0
,
0
,
0
,
0
)
it
.
setGravity
(
Gravity
.
CENTER
)
it
.
attributes
?.
apply
{
this
.
width
=
WindowManager
.
LayoutParams
.
MATCH_PARENT
this
.
height
=
WindowManager
.
LayoutParams
.
WRAP_CONTENT
window
?.
attributes
=
this
}
}
}
}
\ No newline at end of file
video/app/src/main/res/layout/activity_csjdetail.xml
0 → 100644
View file @
aed2f222
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/white"
>
<FrameLayout
android:id=
"@+id/fl_container"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
</FrameLayout>
video/app/src/main/res/layout/dialog_unlock.xml
0 → 100644
View file @
aed2f222
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<View
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_weight=
"1"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/shape_bg_write"
android:orientation=
"vertical"
android:paddingLeft=
"12dp"
android:paddingTop=
"24dp"
android:paddingRight=
"12dp"
android:paddingBottom=
"24dp"
>
<ImageView
android:id=
"@+id/iv_unlock_close"
android:layout_width=
"14dp"
android:layout_height=
"14dp"
android:layout_gravity=
"end"
android:scaleType=
"centerInside"
android:src=
"@mipmap/ic_close"
tools:ignore=
"ContentDescription"
/>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:paddingBottom=
"22dp"
android:text=
"精彩剧情等你来解锁"
android:textColor=
"#E7601F"
android:textSize=
"20sp"
tools:ignore=
"HardcodedText"
/>
<RelativeLayout
android:id=
"@+id/btn_unlock_by_ad"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"9dp"
android:background=
"@drawable/shape_vip_btn"
android:gravity=
"center"
android:paddingLeft=
"24dp"
android:paddingTop=
"10dp"
android:paddingRight=
"24dp"
android:paddingBottom=
"10dp"
>
<ImageView
android:layout_width=
"26dp"
android:layout_height=
"26dp"
android:layout_centerVertical=
"true"
android:scaleType=
"centerInside"
android:src=
"@mipmap/icon_settings_about"
tools:ignore=
"ContentDescription"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"38dp"
android:orientation=
"vertical"
>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"看广告解锁"
android:textColor=
"#161823"
android:textSize=
"16sp"
tools:ignore=
"HardcodedText"
/>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"3dp"
android:alpha=
"0.5"
android:text=
"看完即可解锁1集剧集"
android:textColor=
"#161823"
android:textSize=
"12sp"
tools:ignore=
"HardcodedText"
/>
</LinearLayout>
<ImageView
android:layout_width=
"26dp"
android:layout_height=
"26dp"
android:layout_alignParentEnd=
"true"
android:layout_centerVertical=
"true"
android:scaleType=
"centerInside"
android:src=
"@drawable/ksad_arrow_left"
tools:ignore=
"ContentDescription"
/>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
video/app/src/main/res/layout/fragment_csjmovie.xml
0 → 100755
View file @
aed2f222
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<com.scwang.smartrefresh.layout.SmartRefreshLayout
android:id=
"@+id/srlMainPage"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
app:srlAccentColor=
"@color/black"
app:srlPrimaryColor=
"#f0f2f5"
>
<FrameLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv_pic_list"
android:layout_width=
"match_parent"
android:layout_marginLeft=
"14dp"
android:layout_marginRight=
"14dp"
android:minHeight=
"800dp"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:overScrollMode=
"never"
/>
</FrameLayout>
<com.scwang.smartrefresh.layout.footer.ClassicsFooter
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
app:srlAccentColor=
"@color/black"
app:srlPrimaryColor=
"#f0f2f5"
/>
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
</FrameLayout>
\ No newline at end of file
video/app/src/main/res/layout/fragment_csjvedio.xml
0 → 100644
View file @
aed2f222
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#f0f2f5"
>
<ImageView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:scaleType=
"fitXY"
android:src=
"@mipmap/bg_main"
app:layout_constraintTop_toTopOf=
"parent"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<com.scwang.smartrefresh.layout.SmartRefreshLayout
android:id=
"@+id/srlMainPage"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_weight=
"1"
app:srlAccentColor=
"@color/black"
>
<com.scwang.smartrefresh.header.MaterialHeader
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<com.google.android.material.appbar.AppBarLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@android:color/transparent"
android:theme=
"@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:layout_behavior=
".ui.widgets.AppBarLayoutBehavior"
>
<com.google.android.material.tabs.TabLayout
android:id=
"@+id/tablayout"
android:layout_width=
"wrap_content"
android:layout_height=
"38dp"
android:layout_marginLeft=
"10dp"
android:layout_marginRight=
"10dp"
android:paddingTop=
"-10dp"
app:tabBackground=
"@null"
app:tabIndicatorHeight=
"0dp"
app:tabMaxWidth=
"200dp"
app:tabMinWidth=
"20dp"
app:tabMode=
"scrollable"
app:tabPaddingEnd=
"6dp"
app:tabPaddingStart=
"6dp"
app:tabRippleColor=
"@null"
/>
</com.google.android.material.appbar.AppBarLayout>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
app:layout_behavior=
"@string/appbar_scrolling_view_behavior"
>
<androidx.viewpager2.widget.ViewPager2
android:id=
"@+id/vp2"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
</LinearLayout>
<LinearLayout
android:visibility=
"gone"
android:id=
"@+id/ll_main_watching_root"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_alignParentBottom=
"true"
android:layout_marginLeft=
"10dp"
android:layout_marginRight=
"10dp"
android:layout_marginBottom=
"10dp"
android:background=
"@drawable/shape_bg_black"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
>
<ImageView
android:id=
"@+id/iv_main_watching_pic"
android:layout_width=
"60dp"
android:layout_height=
"70dp"
android:layout_margin=
"5dp"
android:scaleType=
"fitXY"
/>
<LinearLayout
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"4dp"
android:layout_weight=
"1"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/tv_main_watching_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"8dp"
android:singleLine=
"true"
android:text=
"我去平行时空我去平行时空"
android:textColor=
"@color/white"
android:textSize=
"15sp"
/>
<TextView
android:id=
"@+id/tv_main_watching_text1"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:layout_marginBottom=
"2dp"
android:singleLine=
"true"
android:textColor=
"@color/white"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_main_watching_text2"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:singleLine=
"true"
android:textColor=
"@color/graya"
android:textSize=
"10sp"
/>
</LinearLayout>
<RelativeLayout
android:layout_width=
"110dp"
android:layout_height=
"match_parent"
>
<ImageView
android:id=
"@+id/iv_main_watching_close"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:padding=
"6dp"
android:src=
"@mipmap/ic_quit_white"
/>
<TextView
android:id=
"@+id/tv_main_watching_goto"
android:layout_width=
"110dp"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:layout_marginRight=
"15dp"
android:background=
"@drawable/shape_red"
android:gravity=
"center"
android:paddingTop=
"8dp"
android:paddingBottom=
"10dp"
android:text=
"继续观看"
android:textColor=
"@color/white"
android:textSize=
"14sp"
android:textStyle=
"bold"
/>
</RelativeLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
video/app/src/main/res/layout/fragment_first.xml
0 → 100644
View file @
aed2f222
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
>
<com.google.android.material.tabs.TabLayout
android:id=
"@+id/tab_recommend"
android:layout_marginTop=
"20dp"
android:layout_width=
"match_parent"
android:layout_height=
"48dp"
android:layout_gravity=
"left"
app:tabBackground=
"@null"
app:tabIndicatorHeight=
"0dp"
app:tabMode=
"scrollable"
app:tabRippleColor=
"@null"
/>
<androidx.viewpager2.widget.ViewPager2
android:id=
"@+id/vp2_recommend"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:overScrollMode=
"never"
/>
</LinearLayout>
video/app/src/main/res/layout/item_recommend_tab.xml
View file @
aed2f222
...
@@ -10,11 +10,12 @@
...
@@ -10,11 +10,12 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"@color/color_8D8F90"
android:textColor=
"@color/color_8D8F90"
android:textStyle=
"bold"
android:textStyle=
"bold"
android:gravity=
"center_horizontal"
android:textSize=
"16sp"
/>
android:textSize=
"16sp"
/>
<View
<View
android:id=
"@+id/item_line"
android:id=
"@+id/item_line"
android:layout_width=
"
20dp
"
android:layout_width=
"
match_parent
"
android:layout_height=
"2dp"
android:layout_height=
"2dp"
android:layout_gravity=
"center_horizontal"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"6dp"
/>
android:layout_marginTop=
"6dp"
/>
...
...
video/app/src/main/res/values/strings.xml
View file @
aed2f222
...
@@ -62,6 +62,8 @@
...
@@ -62,6 +62,8 @@
本公司有权对用户使用自动续费服务相关行为进行不定期监督,一旦发现用户涉及上述违反国家法律法规及社会公序良俗之道德保留之行为,本公司有权收回用户对自动续费服务的使用权而不对用户作出任何的赔偿。且本公司将依法向国家机关就用户之行为进行举报并保留进一步追究用户行为而导致本公司损失之权利。\n\n
本公司有权对用户使用自动续费服务相关行为进行不定期监督,一旦发现用户涉及上述违反国家法律法规及社会公序良俗之道德保留之行为,本公司有权收回用户对自动续费服务的使用权而不对用户作出任何的赔偿。且本公司将依法向国家机关就用户之行为进行举报并保留进一步追究用户行为而导致本公司损失之权利。\n\n
七、商业化禁止\n
七、商业化禁止\n
用户认可并同意:在未获得本公司正式书面公开许可之前,用户不得就其所获得之自动续费服务用于非本公司服务的其它领域,也不得直接或间接地对自动续费服务进行任何商业化(包括但不限于:转售、贩卖、等价置换等)的行为。一旦发现用户涉及上述之行为,本公司有权收回用户对自动续费服务的使用权而不对用户作出任何的赔偿,并保留进一步追究用户行为而导致本公司损失之权利。
</string>
用户认可并同意:在未获得本公司正式书面公开许可之前,用户不得就其所获得之自动续费服务用于非本公司服务的其它领域,也不得直接或间接地对自动续费服务进行任何商业化(包括但不限于:转售、贩卖、等价置换等)的行为。一旦发现用户涉及上述之行为,本公司有权收回用户对自动续费服务的使用权而不对用户作出任何的赔偿,并保留进一步追究用户行为而导致本公司损失之权利。
</string>
<!-- TODO: Remove or change this placeholder text -->
<string
name=
"hello_blank_fragment"
>
Hello blank fragment
</string>
<!--内存页-->
<!--内存页-->
...
...
video/gradle.properties
View file @
aed2f222
...
@@ -47,11 +47,11 @@ RELEASE_UMENG_KEY=64b8de13a1a164591b5133df
...
@@ -47,11 +47,11 @@ RELEASE_UMENG_KEY=64b8de13a1a164591b5133df
RELEASE_TALKING_DATA_KEY
=
"51E408B7C0FE404F97A4F80B0BDC3C06"
RELEASE_TALKING_DATA_KEY
=
"51E408B7C0FE404F97A4F80B0BDC3C06"
GROMORE_APP_ID="5
5666
27"
GROMORE_APP_ID="5
4588
27"
GROMORE_SPLASH_CODE
=
"10
2967449
"
GROMORE_SPLASH_CODE
=
"10
3327151
"
GROMORE_VIDEO_CODE="10
2968309
"
GROMORE_VIDEO_CODE="10
3327050
"
GROMORE_EXPRESS_CODE
=
"10
2967730
"
GROMORE_EXPRESS_CODE
=
"10
3326968
"
GROMORE_MY_EXPRESS_CODE="10
2967730
"
GROMORE_MY_EXPRESS_CODE="10
3326968
"
GROMORE_MAIN_EXPRESS_CODE
=
"10
2967730
"
GROMORE_MAIN_EXPRESS_CODE
=
"10
3326968
"
GROMORE_DRAW_CODE="aa"
GROMORE_DRAW_CODE="aa"
GROMORE_BANNER_CODE
=
"102967255"
GROMORE_BANNER_CODE
=
"102967255"
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