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
9e15f83d
Commit
9e15f83d
authored
Aug 10, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
推荐短剧弹窗
parent
a18f8964
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
62 additions
and
16 deletions
+62
-16
Constant.kt
.../app/src/main/java/com/mints/helivideo/common/Constant.kt
+1
-1
LocalVedioManager.kt
...ain/java/com/mints/helivideo/manager/LocalVedioManager.kt
+6
-0
RecommendActivity.kt
...ava/com/mints/helivideo/ui/activitys/RecommendActivity.kt
+7
-3
MainFragment.kt
...main/java/com/mints/helivideo/ui/fragment/MainFragment.kt
+5
-6
activity_recommend.xml
video/app/src/main/res/layout/activity_recommend.xml
+43
-6
ic_recommend_vedio.png
video/app/src/main/res/mipmap-xhdpi/ic_recommend_vedio.png
+0
-0
No files found.
video/app/src/main/java/com/mints/helivideo/common/Constant.kt
View file @
9e15f83d
...
...
@@ -5,9 +5,9 @@ object Constant {
const
val
PAGE_SIZE
=
12
const
val
LOCAL_VEDIO
=
"LOCAL_VEDIO"
const
val
VEDIO_BEAN
=
"VEDIO_BEAN"
const
val
RECOMMEND_BEAN
=
"RECOMMEND_BEAN"
const
val
VEDIO_NEXT
=
"VEDIO_NEXT"
const
val
VEDIO_THIRD
=
"VEDIO_THIRD"
const
val
VEDIO_SPLASH
=
"VEDIO_SPLASH"
/**
* 首次弹出权限声明
...
...
video/app/src/main/java/com/mints/helivideo/manager/LocalVedioManager.kt
View file @
9e15f83d
...
...
@@ -15,6 +15,7 @@ import com.mints.helivideo.ui.activitys.RecommendActivity
import
com.mints.helivideo.utils.AppPreferencesManager
import
com.mints.helivideo.utils.ToastUtil
import
com.mints.helivideo.video.csj.DramaApiDetailActivity
import
com.mints.helivideo.video.tx.NewTxVideoActivity
import
com.mints.helivideo.video.tx.TxVideoActivity
/**
...
...
@@ -106,6 +107,11 @@ object LocalVedioManager {
bundle
.
putBoolean
(
Constant
.
VEDIO_NEXT
,
isPlayNext
)
bundle
.
putBoolean
(
Constant
.
VEDIO_THIRD
,
isThirdId
)
readyGo
(
activity
,
TxVideoActivity
::
class
.
java
,
bundle
)
}
else
if
(
data
?.
createType
==
3
)
{
//推荐短剧
val
bundle
=
Bundle
()
bundle
.
putString
(
Constant
.
VEDIO_BEAN
,
JsonUtil
.
toJson
(
data
))
readyGo
(
activity
,
NewTxVideoActivity
::
class
.
java
,
bundle
)
}
else
{
requestDrama
(
activity
,
data
)
}
...
...
video/app/src/main/java/com/mints/helivideo/ui/activitys/RecommendActivity.kt
View file @
9e15f83d
...
...
@@ -41,7 +41,7 @@ class RecommendActivity : BaseActivity(), View.OnClickListener {
override
fun
getBundleExtras
(
extras
:
Bundle
?)
{
super
.
getBundleExtras
(
extras
)
extras
?.
let
{
val
json
=
extras
.
getString
(
Constant
.
VEDIO
_BEAN
)
val
json
=
extras
.
getString
(
Constant
.
RECOMMEND
_BEAN
)
recommendBean
=
Gson
().
fromJson
(
json
,
RecommendBean
::
class
.
java
)
}
}
...
...
@@ -74,11 +74,15 @@ class RecommendActivity : BaseActivity(), View.OnClickListener {
baseItemView
.
hideEmptyView
()
baseItemView
.
setTXVodPlayer
(
txVodPlayerWrapper
)
baseItemView
.
startPlay
()
tv_recommend_name
.
text
=
recommendBean
?.
vedioMsg
?.
title
tv_recommend_text
.
text
=
"${recommendBean?.vedioMsg?.title}热播中共${recommendBean?.vedioMsg?.vedioTotal}集"
}
private
fun
initListener
()
{
ic_recommend_quit
.
setOnClickListener
(
this
)
fl
_recommend_next
.
setOnClickListener
(
this
)
btn
_recommend_next
.
setOnClickListener
(
this
)
}
override
fun
onResume
()
{
...
...
@@ -112,7 +116,7 @@ class RecommendActivity : BaseActivity(), View.OnClickListener {
R
.
id
.
ic_recommend_quit
->
{
finish
()
}
R
.
id
.
fl
_recommend_next
->
{
R
.
id
.
btn
_recommend_next
->
{
val
bundle
=
Bundle
()
bundle
.
putString
(
Constant
.
VEDIO_BEAN
,
JsonUtil
.
toJson
(
recommendBean
?.
vedioMsg
))
readyGoThenKill
(
NewTxVideoActivity
::
class
.
java
,
bundle
)
...
...
video/app/src/main/java/com/mints/helivideo/ui/fragment/MainFragment.kt
View file @
9e15f83d
...
...
@@ -378,7 +378,7 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
* 展示推荐弹窗
*/
private
fun
showRecommendAct
(
data
:
RecoBean
?)
{
if
(
data
==
null
||
data
.
vedio3
==
null
)
return
if
(
data
==
null
||
data
.
vedio3
==
null
)
return
if
(
AppConfig
.
enterVipAct
)
{
AppConfig
.
enterVipAct
=
false
...
...
@@ -388,11 +388,12 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
val
mainFirstRecommend
=
AppPreferencesManager
.
get
().
getBoolean
(
Constant
.
MAIN_FIRST_RECOMMEND
,
false
)
if
(!
mainFirstRecommend
)
{
// if (mainFirstRecommend) {
AppPreferencesManager
.
get
().
put
(
Constant
.
MAIN_FIRST_RECOMMEND
,
true
)
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
val
bundle
=
Bundle
()
bundle
.
putString
(
Constant
.
VEDIO
_BEAN
,
JsonUtil
.
toJson
(
data
.
vedio3
))
bundle
.
putString
(
Constant
.
RECOMMEND
_BEAN
,
JsonUtil
.
toJson
(
data
.
vedio3
))
readyGo
(
RecommendActivity
::
class
.
java
,
bundle
)
},
300
)
return
...
...
@@ -402,16 +403,14 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
val
mainTwoRecommend
=
AppPreferencesManager
.
get
().
getBoolean
(
Constant
.
MAIN_TWO_RECOMMEND
,
false
)
val
adCount
=
AppPreferencesManager
.
get
().
getInt
(
Constant
.
VEDIO_AD_COUNT
,
0
)
if
(!
mainTwoRecommend
&&
adCount
>
data
!!
.
vedio3
.
adShowCount
)
{
if
(!
mainTwoRecommend
&&
adCount
>
data
.
vedio3
.
adShowCount
)
{
AppPreferencesManager
.
get
().
put
(
Constant
.
MAIN_TWO_RECOMMEND
,
true
)
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
val
bundle
=
Bundle
()
bundle
.
putString
(
Constant
.
VEDIO
_BEAN
,
JsonUtil
.
toJson
(
data
.
vedio3
))
bundle
.
putString
(
Constant
.
RECOMMEND
_BEAN
,
JsonUtil
.
toJson
(
data
.
vedio3
))
readyGo
(
RecommendActivity
::
class
.
java
,
bundle
)
},
300
)
}
// println("mcg -->>>>>: mainFirstRecommend=${mainFirstRecommend} , mainTwoRecommend=${mainTwoRecommend} , adCount=${adCount}")
}
}
}
...
...
video/app/src/main/res/layout/activity_recommend.xml
View file @
9e15f83d
...
...
@@ -12,11 +12,18 @@
android:layout_centerInParent=
"true"
android:orientation=
"vertical"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"2dp"
android:layout_marginBottom=
"8dp"
android:text=
"刚刚看的"
android:textColor=
"@color/white"
android:textSize=
"18sp"
/>
<RelativeLayout
android:layout_width=
"330dp"
android:layout_height=
"420dp"
>
android:layout_width=
"310dp"
android:layout_height=
"440dp"
>
<androidx.cardview.widget.CardView
android:layout_width=
"match_parent"
...
...
@@ -29,12 +36,40 @@
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
<TextView
android:id=
"@+id/tv_recommend_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:layout_marginLeft=
"14dp"
android:layout_marginRight=
"10dp"
android:layout_marginBottom=
"65dp"
android:singleLine=
"true"
android:textColor=
"@color/white"
android:textSize=
"14sp"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/tv_recommend_text"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:layout_marginLeft=
"14dp"
android:layout_marginRight=
"10dp"
android:layout_marginBottom=
"35dp"
android:drawableLeft=
"@mipmap/ic_recommend_vedio"
android:drawablePadding=
"2dp"
android:gravity=
"center_vertical"
android:singleLine=
"true"
android:textColor=
"@color/white"
android:textSize=
"12sp"
/>
</androidx.cardview.widget.CardView>
<ImageView
android:id=
"@+id/ic_recommend_quit"
android:layout_width=
"
6
0dp"
android:layout_height=
"
6
0dp"
android:layout_width=
"
5
0dp"
android:layout_height=
"
5
0dp"
android:layout_alignParentEnd=
"true"
android:layout_gravity=
"end"
android:layout_marginTop=
"2dp"
...
...
@@ -42,10 +77,11 @@
android:padding=
"10dp"
android:scaleType=
"centerCrop"
android:src=
"@mipmap/ic_quit_yuan"
/>
</RelativeLayout>
<RelativeLayout
android:id=
"@+id/fl_recommend_next"
android:layout_width=
"match_parent"
android:layout_height=
"100dp"
android:layout_marginTop=
"10dp"
>
...
...
@@ -58,6 +94,7 @@
android:scaleType=
"centerCrop"
/>
<Button
android:id=
"@+id/btn_recommend_next"
android:layout_width=
"260dp"
android:layout_height=
"50dp"
android:layout_centerInParent=
"true"
...
...
video/app/src/main/res/mipmap-xhdpi/ic_recommend_vedio.png
View replaced file @
a18f8964
View file @
9e15f83d
6.65 KB
|
W:
|
H:
1.24 KB
|
W:
|
H:
2-up
Swipe
Onion skin
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